/* Generated by Cython 3.2.1 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "NPY_1_7_API_VERSION"
            ]
        ],
        "depends": [],
        "extra_compile_args": [
            "-Wno-unreachable-code"
        ],
        "include_dirs": [
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include"
        ],
        "name": "cytimes.pydt",
        "sources": [
            "src/cytimes/pydt.py"
        ]
    },
    "module_name": "cytimes.pydt"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_1"
#define CYTHON_HEX_VERSION 0x030201F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

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

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

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

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cytimes__pydt
#define __PYX_HAVE_API__cytimes__pydt
/* Early includes */
#include <string.h>
#include <stdio.h>

    #if PY_MAJOR_VERSION >= 3
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj)
    #else
      #define __Pyx_PyFloat_FromString(obj)  PyFloat_FromString(obj, NULL)
    #endif
    
#include <stddef.h>

    #if PY_MAJOR_VERSION <= 2
    #define PyDict_GetItemWithError _PyDict_GetItemWithError
    #endif
    

    #if PY_VERSION_HEX < 0x030d0000
    static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
    {
        PyObject *obj = PyWeakref_GetObject(ref);
        if (obj == NULL) {
            // SystemError if ref is NULL
            *pobj = NULL;
            return -1;
        }
        if (obj == Py_None) {
            *pobj = NULL;
            return 0;
        }
        Py_INCREF(obj);
        *pobj = obj;
        return 1;
    }
    #else
    #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef
    #endif
    
#include "pythread.h"

    #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get)
    #define PyContextVar_Get(var, d, v)         ((d) ?             ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) :             ((v)[0] = NULL, 0)         )
    #endif
    

    #if CYTHON_COMPILING_IN_LIMITED_API
    #ifdef _MSC_VER
    #pragma message ("This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.")
    #else
    #warning This module uses CPython specific internals of 'datetime.datetime', which are not available in the limited API.
    #endif
    #endif
    
#include "datetime.h"

    #define __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, minute, second,             microsecond, tz, fold, PyDateTimeAPI->DateTimeType)
    #define __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)         PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, microsecond, tz, fold, PyDateTimeAPI->TimeType)

    #define __Pyx_TimeZone_UTC PyDateTime_TimeZone_UTC
    #define __Pyx_TimeZone_FromOffsetAndName(offset, name) PyTimeZone_FromOffsetAndName(offset, name)

    /* Backport for Python < 3.10 */
    #if PY_VERSION_HEX < 0x030a00a1
        #ifndef PyDateTime_TIME_GET_TZINFO
            #define PyDateTime_TIME_GET_TZINFO(o)                 ((((PyDateTime_Time*)o)->hastzinfo) ? ((PyDateTime_Time*)o)->tzinfo : Py_None)
        #endif
        #ifndef PyDateTime_DATE_GET_TZINFO
            #define PyDateTime_DATE_GET_TZINFO(o)                 ((((PyDateTime_DateTime*)o)->hastzinfo) ? ((PyDateTime_DateTime*)o)->tzinfo : Py_None)
        #endif
    #endif
    

    /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_t)
        #define __Pyx_PyTime_t PyTime_t
    #else
        #define __Pyx_PyTime_t _PyTime_t
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_TimeRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_TimeRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_TimeRaw(&tic);
            return tic;
        }
    #else
        #define __Pyx_PyTime_TimeRaw()  _PyTime_GetSystemClock()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_MonotonicRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_MonotonicRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_MonotonicRaw(&tic);
            return tic;
        }
    #elif CYTHON_COMPILING_IN_PYPY && !defined(_PyTime_GetMonotonicClock)
        #define __Pyx_PyTime_MonotonicRaw()  _PyTime_GetSystemClock()
    #else
        #define __Pyx_PyTime_MonotonicRaw()  _PyTime_GetMonotonicClock()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_PerfCounterRaw)
        static CYTHON_INLINE __Pyx_PyTime_t __Pyx_PyTime_PerfCounterRaw(void) {
            __Pyx_PyTime_t tic;
            (void) PyTime_PerfCounterRaw(&tic);
            return tic;
        }
    #elif CYTHON_COMPILING_IN_PYPY && !defined(_PyTime_GetPerfCounter)
        #define __Pyx_PyTime_PerfCounterRaw()  __Pyx_PyTime_MonotonicRaw()
    #else
        #define __Pyx_PyTime_PerfCounterRaw()  _PyTime_GetPerfCounter()
    #endif

    #if PY_VERSION_HEX >= 0x030d00b1 || defined(PyTime_AsSecondsDouble)
        #define __Pyx_PyTime_AsSecondsDouble(t)  PyTime_AsSecondsDouble(t)
    #else
        #define __Pyx_PyTime_AsSecondsDouble(t)  _PyTime_AsSecondsDouble(t)
    #endif
    
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


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

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    #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

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

static const char* const __pyx_f[] = {
  "src/cytimes/pydt.py",
  "cpython/contextvars.pxd",
  "datetime.pxd",
  "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd",
  "cpython/time.pxd",
  "src/cytimes/utils.pxd",
  "src/cytimes/parser.pxd",
  "cpython/type.pxd",
  "cpython/bool.pxd",
  "cpython/complex.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

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

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

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

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

/* #### Code section: numeric_typedefs ### */

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":743
 * # 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":744
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":745
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * 
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":746
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_uint8      uint8_t
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":748
 * ctypedef npy_int64      int64_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":749
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":750
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * 
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":751
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_float32    float32_t
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":753
 * ctypedef npy_uint64     uint64_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":754
 * 
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":761
 * ctypedef double complex complex128_t
 * 
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":762
 * 
 * ctypedef npy_longlong   longlong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":764
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
*/
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":765
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":767
 * 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;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":768
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
*/
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef float complex       cfloat_t
*/
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* #### Code section: complex_type_declarations ### */
/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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 && (1) && (!0 || __cplusplus)
  #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);

/* Declarations.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    typedef ::std::complex< long double > __pyx_t_long_double_complex;
  #else
    typedef long double _Complex __pyx_t_long_double_complex;
  #endif
#else
    typedef struct { long double real, imag; } __pyx_t_long_double_complex;
#endif
static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);

/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_7cytimes_6parser_Configs;
struct __pyx_obj_7cytimes_6parser_Result;
struct __pyx_obj_7cytimes_6parser_Parser;
struct __pyx_obj_7cytimes_4pydt__Pydt;
struct __pyx_opt_args_7cpython_11contextvars_get_value;
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;

/* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value {
  int __pyx_n;
  PyObject *default_value;
};

/* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
  int __pyx_n;
  PyObject *default_value;
};
struct __pyx_opt_args_7cpython_8datetime_time_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_new;
struct __pyx_opt_args_7cpython_8datetime_timezone_new;
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp;

/* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_time_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_new {
  int __pyx_n;
  int fold;
};

/* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/
struct __pyx_opt_args_7cpython_8datetime_timezone_new {
  int __pyx_n;
  PyObject *name;
};

/* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/
struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp {
  int __pyx_n;
  PyObject *tz;
};
struct __pyx_t_7cytimes_5utils_ymd;
typedef struct __pyx_t_7cytimes_5utils_ymd __pyx_t_7cytimes_5utils_ymd;
struct __pyx_t_7cytimes_5utils_hmsf;
typedef struct __pyx_t_7cytimes_5utils_hmsf __pyx_t_7cytimes_5utils_hmsf;
struct __pyx_t_7cytimes_5utils_sf;
typedef struct __pyx_t_7cytimes_5utils_sf __pyx_t_7cytimes_5utils_sf;
struct __pyx_t_7cytimes_5utils_dtm;
typedef struct __pyx_t_7cytimes_5utils_dtm __pyx_t_7cytimes_5utils_dtm;
struct __pyx_t_7cytimes_5utils_iso;
typedef struct __pyx_t_7cytimes_5utils_iso __pyx_t_7cytimes_5utils_iso;
struct __pyx_opt_args_7cytimes_5utils_math_mod;
struct __pyx_opt_args_7cytimes_5utils_math_div_even;
struct __pyx_opt_args_7cytimes_5utils_math_div_up;
struct __pyx_opt_args_7cytimes_5utils_math_div_down;
struct __pyx_opt_args_7cytimes_5utils_math_div_ceil;
struct __pyx_opt_args_7cytimes_5utils_math_div_floor;
struct __pyx_opt_args_7cytimes_5utils_math_div_trunc;
struct __pyx_opt_args_7cytimes_5utils_is_str_dot;
struct __pyx_opt_args_7cytimes_5utils_is_str_comma;
struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower;
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters;
struct __pyx_opt_args_7cytimes_5utils_is_str_alphas;
struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind;
struct __pyx_opt_args_7cytimes_5utils_parse_isoyear;
struct __pyx_opt_args_7cytimes_5utils_parse_isomonth;
struct __pyx_opt_args_7cytimes_5utils_parse_isoday;
struct __pyx_opt_args_7cytimes_5utils_parse_isoweek;
struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday;
struct __pyx_opt_args_7cytimes_5utils_parse_isodoy;
struct __pyx_opt_args_7cytimes_5utils_parse_isohour;
struct __pyx_opt_args_7cytimes_5utils_parse_isominute;
struct __pyx_opt_args_7cytimes_5utils_parse_isosecond;
struct __pyx_opt_args_7cytimes_5utils_parse_isofraction;
struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction;
struct __pyx_opt_args_7cytimes_5utils_slice_to_uint;
struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat;
struct __pyx_opt_args_7cytimes_5utils_date_new;
struct __pyx_opt_args_7cytimes_5utils_date_now;
struct __pyx_opt_args_7cytimes_5utils_date_fr_us;
struct __pyx_opt_args_7cytimes_5utils_date_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_date_fr_ord;
struct __pyx_opt_args_7cytimes_5utils_date_fr_iso;
struct __pyx_opt_args_7cytimes_5utils_date_fr_doy;
struct __pyx_opt_args_7cytimes_5utils_date_fr_ts;
struct __pyx_opt_args_7cytimes_5utils_date_fr_date;
struct __pyx_opt_args_7cytimes_5utils_date_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_date_replace;
struct __pyx_opt_args_7cytimes_5utils_date_add_delta;
struct __pyx_opt_args_7cytimes_5utils_dt_new;
struct __pyx_opt_args_7cytimes_5utils_dt_now;
struct __pyx_opt_args_7cytimes_5utils_dt_isoformat;
struct __pyx_opt_args_7cytimes_5utils_dt_to_tm;
struct __pyx_opt_args_7cytimes_5utils_dt_to_us;
struct __pyx_opt_args_7cytimes_5utils_dt_to_sec;
struct __pyx_opt_args_7cytimes_5utils_dt_to_ord;
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch;
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_us;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_date;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_dt_fr_time;
struct __pyx_opt_args_7cytimes_5utils_dt_combine;
struct __pyx_opt_args_7cytimes_5utils_dt_add;
struct __pyx_opt_args_7cytimes_5utils_dt_add_delta;
struct __pyx_opt_args_7cytimes_5utils_dt_replace;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz;
struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold;
struct __pyx_opt_args_7cytimes_5utils_dt_compare;
struct __pyx_opt_args_7cytimes_5utils_dt_astimezone;
struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz;
struct __pyx_opt_args_7cytimes_5utils_time_new;
struct __pyx_opt_args_7cytimes_5utils_time_now;
struct __pyx_opt_args_7cytimes_5utils_time_isoformat;
struct __pyx_opt_args_7cytimes_5utils_time_fr_us;
struct __pyx_opt_args_7cytimes_5utils_time_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_time_fr_time;
struct __pyx_opt_args_7cytimes_5utils_time_fr_dt;
struct __pyx_opt_args_7cytimes_5utils_td_new;
struct __pyx_opt_args_7cytimes_5utils_td_fr_us;
struct __pyx_opt_args_7cytimes_5utils_td_fr_sec;
struct __pyx_opt_args_7cytimes_5utils_td_fr_td;
struct __pyx_opt_args_7cytimes_5utils_tz_new;
struct __pyx_opt_args_7cytimes_5utils_tz_local;
struct __pyx_opt_args_7cytimes_5utils_tz_local_sec;
struct __pyx_opt_args_7cytimes_5utils_tz_name;
struct __pyx_opt_args_7cytimes_5utils_tz_dst;
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset;
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec;
struct __pyx_opt_args_7cytimes_5utils_tz_utcformat;
struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt;
struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_td64_to_td;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like;
struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64;
struct __pyx_opt_args_7cytimes_5utils_arr_clamp;
struct __pyx_opt_args_7cytimes_5utils_arr_min;
struct __pyx_opt_args_7cytimes_5utils_arr_max;
struct __pyx_opt_args_7cytimes_5utils_arr_min_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_max_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_abs;
struct __pyx_opt_args_7cytimes_5utils_arr_neg;
struct __pyx_opt_args_7cytimes_5utils_arr_add;
struct __pyx_opt_args_7cytimes_5utils_arr_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_mod;
struct __pyx_opt_args_7cytimes_5utils_arr_div_even;
struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_up;
struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_down;
struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil;
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor;
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc;
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul;
struct __pyx_opt_args_7cytimes_5utils_arr_add_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr;
struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr;
struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_second;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_times;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta;
struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_round;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil;
struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor;
struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us;
struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D;
struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D;

/* "utils.pxd":151
 *         int  tm_isdst
 * 
 * ctypedef struct ymd:             # <<<<<<<<<<<<<<
 *     int year
 *     int month
*/
struct __pyx_t_7cytimes_5utils_ymd {
  int year;
  int month;
  int day;
};

/* "utils.pxd":156
 *     int day
 * 
 * ctypedef struct hmsf:             # <<<<<<<<<<<<<<
 *     int hour
 *     int minute
*/
struct __pyx_t_7cytimes_5utils_hmsf {
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "utils.pxd":162
 *     int microsecond
 * 
 * ctypedef struct sf:             # <<<<<<<<<<<<<<
 *     int second
 *     int microsecond
*/
struct __pyx_t_7cytimes_5utils_sf {
  int second;
  int microsecond;
};

/* "utils.pxd":166
 *     int microsecond
 * 
 * ctypedef struct dtm:             # <<<<<<<<<<<<<<
 *     int year
 *     int month
*/
struct __pyx_t_7cytimes_5utils_dtm {
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "utils.pxd":175
 *     int microsecond
 * 
 * ctypedef struct iso:             # <<<<<<<<<<<<<<
 *     int year
 *     int week
*/
struct __pyx_t_7cytimes_5utils_iso {
  int year;
  int week;
  int weekday;
};

/* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_mod {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_even {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_up {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_down {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_ceil {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_floor {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_math_div_trunc {
  int __pyx_n;
  PY_LONG_LONG offset;
};

/* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_dot {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_comma {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_str_alphas {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoyear {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isomonth {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoday {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoweek {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isodoy {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isohour {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isominute {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isosecond {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_parse_isofraction {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_slice_to_uint {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_new {
  int __pyx_n;
  int year;
  int month;
  int day;
  PyObject *dclass;
};

/* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dclass;
};

/* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_us {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_sec {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_ord {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_iso {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_doy {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_ts {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_date {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_fr_dt {
  int __pyx_n;
  PyObject *dclass;
};

/* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_date_replace {
  int __pyx_n;
  int year;
  int month;
  int day;
  PyObject *dclass;
};

/* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_date_add_delta {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  PY_LONG_LONG days;
  PY_LONG_LONG hours;
  PY_LONG_LONG minutes;
  PY_LONG_LONG seconds;
  PY_LONG_LONG milliseconds;
  PY_LONG_LONG microseconds;
  int year;
  int month;
  int day;
  int weekday;
  int hour;
  int minute;
  int second;
  int millisecond;
  int microsecond;
  PyObject *dclass;
};

/* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_new {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *dtclass;
};

/* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_isoformat {
  int __pyx_n;
  PyObject *sep;
  int utc;
};

/* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_tm {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_us {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_sec {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_to_ord {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/
struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_us {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_date {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_fr_time {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_combine {
  int __pyx_n;
  PyDateTime_Date *date;
  PyDateTime_Time *time;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_add {
  int __pyx_n;
  int days;
  int seconds;
  int microseconds;
  PyObject *dtclass;
};

/* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_add_delta {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  PY_LONG_LONG days;
  PY_LONG_LONG hours;
  PY_LONG_LONG minutes;
  PY_LONG_LONG seconds;
  PY_LONG_LONG milliseconds;
  PY_LONG_LONG microseconds;
  int year;
  int month;
  int day;
  int weekday;
  int hour;
  int minute;
  int second;
  int millisecond;
  int microsecond;
  PyObject *dtclass;
};

/* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *dtclass;
};

/* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_compare {
  int __pyx_n;
  int allow_mixed;
};

/* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_astimezone {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz {
  int __pyx_n;
  PyObject *dtclass;
};

/* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/
struct __pyx_opt_args_7cytimes_5utils_time_new {
  int __pyx_n;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
  PyObject *tclass;
};

/* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_now {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_isoformat {
  int __pyx_n;
  int utc;
};

/* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_us {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_sec {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *tclass;
};

/* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_time {
  int __pyx_n;
  PyObject *tclass;
};

/* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_time_fr_dt {
  int __pyx_n;
  PyObject *tclass;
};

/* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_new {
  int __pyx_n;
  int days;
  int seconds;
  int microseconds;
  PyObject *tdclass;
};

/* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_us {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_sec {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td_fr_td {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_new {
  int __pyx_n;
  int hours;
  int minites;
  int seconds;
};

/* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_local {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_local_sec {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_name {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_dst {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_tz_utcformat {
  int __pyx_n;
  PyDateTime_DateTime *dt;
};

/* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
};

/* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
};

/* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt {
  int __pyx_n;
  PyObject *tzinfo;
  PyObject *dtclass;
};

/* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/
struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/
struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
};

/* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64_to_td {
  int __pyx_n;
  PyObject *tdclass;
};

/* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_clamp {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_min {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_max {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_min_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_max_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_abs {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_neg {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_add {
  int __pyx_n;
  int copy;
};

/* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mod {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_even {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_up {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_down {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/
struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_add_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_year {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_month {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_second {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_times {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D {
  int __pyx_n;
  npy_int64 factor;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit {
  int __pyx_n;
  int arr_reso;
  int limit;
  int copy;
};

/* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta {
  int __pyx_n;
  npy_int64 years;
  npy_int64 quarters;
  npy_int64 months;
  npy_int64 weeks;
  npy_int64 days;
  npy_int64 hours;
  npy_int64 minutes;
  npy_int64 seconds;
  npy_int64 milliseconds;
  npy_int64 microseconds;
  npy_int64 nanoseconds;
  int arr_reso;
};

/* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times {
  int __pyx_n;
  int arr_reso;
};

/* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_round {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor {
  int __pyx_n;
  int arr_reso;
  int copy;
};

/* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/
struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us {
  int __pyx_n;
  int arr_reso;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/
struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};

/* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/
struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D {
  int __pyx_n;
  npy_int64 offset;
  int copy;
};
struct __pyx_opt_args_7cytimes_6parser__timelex;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc;
struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms;
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm;
struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str;
struct __pyx_opt_args_7cytimes_6parser_6Parser_parse;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token;
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token;
struct __pyx_opt_args_7cytimes_6parser_parse;
struct __pyx_opt_args_7cytimes_6parser_parse_obj;
struct __pyx_opt_args_7cytimes_6parser_parse_month;
struct __pyx_opt_args_7cytimes_6parser_parse_weekday;

/* "cytimes/parser.pxd":13
 * 
 * # Timelex
 * ctypedef enum State:             # <<<<<<<<<<<<<<
 *     START     = 0
 *     DIGIT     = 1
*/
enum __pyx_t_7cytimes_6parser_State {
  __pyx_e_7cytimes_6parser_START = 0,
  __pyx_e_7cytimes_6parser_DIGIT = 1,
  __pyx_e_7cytimes_6parser_DIGIT_DOT = 2,
  __pyx_e_7cytimes_6parser_ALPHA = 3,
  __pyx_e_7cytimes_6parser_ALPHA_DOT = 4
};
typedef enum __pyx_t_7cytimes_6parser_State __pyx_t_7cytimes_6parser_State;

/* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/
struct __pyx_opt_args_7cytimes_6parser__timelex {
  int __pyx_n;
  Py_ssize_t length;
};

/* "cytimes/parser.pxd":266
 *     cpdef bint add_jump(self, str token) except -1
 *     cpdef bint remove_jump(self, str token) except -1
 *     cpdef bint replace_jump(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_jump(self, str token) except -1
 *     # Pertain
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":271
 *     cpdef bint add_pertain(self, str token) except -1
 *     cpdef bint remove_pertain(self, str token) except -1
 *     cpdef bint replace_pertain(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_pertain(self, str token) except -1
 *     # UTC
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":276
 *     cpdef bint add_utc(self, str token) except -1
 *     cpdef bint remove_utc(self, str token) except -1
 *     cpdef bint replace_utc(self, set tokens=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_utc(self, str token) except -1
 *     # Timezone
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc {
  int __pyx_n;
  PyObject *tokens;
};

/* "cytimes/parser.pxd":279
 *     cpdef bint is_utc(self, str token) except -1
 *     # Timezone
 *     cpdef bint add_tz(self, str token, int hours=?, int minutes=?, int seconds=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint remove_tz(self, str token) except -1
 *     cpdef bint replace_tz(self, dict mapping=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz {
  int __pyx_n;
  int hours;
  int minutes;
  int seconds;
};

/* "cytimes/parser.pxd":281
 *     cpdef bint add_tz(self, str token, int hours=?, int minutes=?, int seconds=?) except -1
 *     cpdef bint remove_tz(self, str token) except -1
 *     cpdef bint replace_tz(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_tz(self, str token) except -1
 *     cpdef int get_tz_offset(self, str token) except -200_000
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":287
 *     cpdef bint add_month(self, str token, int month) except -1
 *     cpdef bint remove_month(self, str token) except -1
 *     cpdef bint replace_month(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_month(self, str token) except -1
 *     cpdef int get_month(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":293
 *     cpdef bint add_weekday(self, str token, int weekday) except -1
 *     cpdef bint remove_weekday(self, str token) except -1
 *     cpdef bint replace_weekday(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_weekday(self, str token) except -1
 *     cpdef int get_weekday(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":299
 *     cpdef bint add_hms(self, str token, int flag) except -1
 *     cpdef bint remove_hms(self, str token) except -1
 *     cpdef bint replace_hms(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_hms(self, str token) except -1
 *     cpdef int get_hms(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":305
 *     cpdef bint add_ampm(self, str token, int flag) except -1
 *     cpdef bint remove_ampm(self, str token) except -1
 *     cpdef bint replace_ampm(self, dict mapping=?) except -1             # <<<<<<<<<<<<<<
 *     cpdef bint is_ampm(self, str token) except -1
 *     cpdef int get_ampm(self, str token) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm {
  int __pyx_n;
  PyObject *mapping;
};

/* "cytimes/parser.pxd":351
 *     # Y/M/D
 *     cdef inline bint set_ymd_int(self, int flag, long long value) except -1
 *     cdef inline bint set_ymd_str(self, int flag, str token, Py_ssize_t token_len=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline int ymd_slots_filled(self) noexcept
 *     cdef inline int ymd_roles_resolved(self) noexcept
*/
struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str {
  int __pyx_n;
  Py_ssize_t token_len;
};

/* "cytimes/parser.pxd":385
 *         object __cls
 *     # Parse
 *     cpdef datetime.datetime parse(self, str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, object dtclass=?)             # <<<<<<<<<<<<<<
 *     cdef inline bint _process(self, str dtstr, bint isoformat) except -1
 *     # Build
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser_parse {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":413
 *     cdef inline bint _reset_token_peeks(self) noexcept
 *     # . setters
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":414
 *     # . setters
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":415
 *     cdef inline bint _set_ymd_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":416
 *     cdef inline bint _set_hms_by_token(self, int flag, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline int _adjust_hour_by_ampm(self, int hour, int flag) except -1
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":417
 *     cdef inline bint _set_hour_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_minute_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1
 *     cdef inline bint _set_second_by_token(self, str token=?, Py_ssize_t token_len=?, int token_kind=?) except -1             # <<<<<<<<<<<<<<
 *     cdef inline int _adjust_hour_by_ampm(self, int hour, int flag) except -1
 *     # Internal
*/
struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token {
  int __pyx_n;
  PyObject *token;
  Py_ssize_t token_len;
  int token_kind;
};

/* "cytimes/parser.pxd":425
 * 
 * # Parse
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)             # <<<<<<<<<<<<<<
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":426
 * # Parse
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)             # <<<<<<<<<<<<<<
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse_obj {
  int __pyx_n;
  PyObject *__pyx_default;
  PyObject *yearfirst;
  PyObject *dayfirst;
  int ignoretz;
  int isoformat;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  PyObject *dtclass;
};

/* "cytimes/parser.pxd":427
 * cpdef datetime.datetime parse(str dtstr, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2             # <<<<<<<<<<<<<<
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2
*/
struct __pyx_opt_args_7cytimes_6parser_parse_month {
  int __pyx_n;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  int raise_error;
};

/* "cytimes/parser.pxd":428
 * cpdef datetime.datetime parse_obj(object dtobj, object default=?, object yearfirst=?, object dayfirst=?, bint ignoretz=?, bint isoformat=?, Configs cfg=?, object dtclass=?)
 * cpdef int parse_month(object token, Configs cfg=?, bint raise_error=?) except -2
 * cpdef int parse_weekday(object token, Configs cfg=?, bint raise_error=?) except -2             # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_7cytimes_6parser_parse_weekday {
  int __pyx_n;
  struct __pyx_obj_7cytimes_6parser_Configs *cfg;
  int raise_error;
};
struct __pyx_opt_args_7cytimes_6errors_raise_error;
struct __pyx_opt_args_7cytimes_6errors_raise_configs_token_error;
struct __pyx_opt_args_7cytimes_6errors_raise_configs_value_error;
struct __pyx_opt_args_7cytimes_6errors_raise_parser_failed_error;
struct __pyx_opt_args_7cytimes_6errors_raise_argument_error;
struct __pyx_opt_args_7cytimes_6errors_raise_type_error;

/* "errors.pxd":4
 * 
 * # Raise error helpers
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":5
 * # Raise error helpers
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_configs_token_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":6
 * cpdef bint raise_error(object exc, object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_configs_value_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":7
 * cpdef bint raise_configs_token_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_parser_failed_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":8
 * cpdef bint raise_configs_value_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
*/
struct __pyx_opt_args_7cytimes_6errors_raise_argument_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};

/* "errors.pxd":9
 * cpdef bint raise_parser_failed_error(object cls=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_argument_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)
 * cpdef bint raise_type_error(object cls=?, str input_msg=?, str error_msg=?, Exception tb_exc=?)             # <<<<<<<<<<<<<<
*/
struct __pyx_opt_args_7cytimes_6errors_raise_type_error {
  int __pyx_n;
  PyObject *cls;
  PyObject *input_msg;
  PyObject *error_msg;
  PyObject *tb_exc;
};
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub;
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff;

/* "cytimes/pydt.pxd":12
 *     cpdef str ctime(self)
 *     cpdef str strftime(self, str format)
 *     cpdef str isoformat(self, str sep=?)             # <<<<<<<<<<<<<<
 *     cpdef dict timedict(self)
 *     cpdef dict utctimedict(self)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat {
  int __pyx_n;
  PyObject *sep;
};

/* "cytimes/pydt.pxd":18
 *     cpdef object utctimetuple(self)
 *     cpdef int toordinal(self) except -1
 *     cpdef double toseconds(self, bint utc=?)             # <<<<<<<<<<<<<<
 *     cpdef long long tomicroseconds(self, bint utc=?)
 *     cpdef double timestamp(self)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds {
  int __pyx_n;
  int utc;
};

/* "cytimes/pydt.pxd":19
 *     cpdef int toordinal(self) except -1
 *     cpdef double toseconds(self, bint utc=?)
 *     cpdef long long tomicroseconds(self, bint utc=?)             # <<<<<<<<<<<<<<
 *     cpdef double timestamp(self)
 *     cpdef datetime.date date(self)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds {
  int __pyx_n;
  int utc;
};

/* "cytimes/pydt.pxd":27
 *     cdef inline object _cls(self)
 *     # Manipulator
 *     cpdef _Pydt replace(             # <<<<<<<<<<<<<<
 *         self, int year=?, int month=?, int day=?,
 *         int hour=?, int minute=?, int second=?,
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  PyObject *tzinfo;
  int fold;
};

/* "cytimes/pydt.pxd":33
 *     )
 *     # . year
 *     cpdef _Pydt to_curr_year(self, object month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_prev_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_next_year(self, object month=?, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year {
  int __pyx_n;
  PyObject *month;
  int day;
};

/* "cytimes/pydt.pxd":34
 *     # . year
 *     cpdef _Pydt to_curr_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_prev_year(self, object month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_next_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_year(self, int offset, object month=?, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year {
  int __pyx_n;
  PyObject *month;
  int day;
};

/* "cytimes/pydt.pxd":35
 *     cpdef _Pydt to_curr_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_prev_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_next_year(self, object month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_year(self, int offset, object month=?, int day=?)
 *     # . quarter
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year {
  int __pyx_n;
  PyObject *month;
  int day;
};

/* "cytimes/pydt.pxd":36
 *     cpdef _Pydt to_prev_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_next_year(self, object month=?, int day=?)
 *     cpdef _Pydt to_year(self, int offset, object month=?, int day=?)             # <<<<<<<<<<<<<<
 *     # . quarter
 *     cpdef _Pydt to_curr_quarter(self, int month=?, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year {
  int __pyx_n;
  PyObject *month;
  int day;
};

/* "cytimes/pydt.pxd":38
 *     cpdef _Pydt to_year(self, int offset, object month=?, int day=?)
 *     # . quarter
 *     cpdef _Pydt to_curr_quarter(self, int month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_prev_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_next_quarter(self, int month=?, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter {
  int __pyx_n;
  int month;
  int day;
};

/* "cytimes/pydt.pxd":39
 *     # . quarter
 *     cpdef _Pydt to_curr_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_prev_quarter(self, int month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_next_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_quarter(self, int offset, int month=?, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter {
  int __pyx_n;
  int month;
  int day;
};

/* "cytimes/pydt.pxd":40
 *     cpdef _Pydt to_curr_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_prev_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_next_quarter(self, int month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_quarter(self, int offset, int month=?, int day=?)
 *     # . month
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter {
  int __pyx_n;
  int month;
  int day;
};

/* "cytimes/pydt.pxd":41
 *     cpdef _Pydt to_prev_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_next_quarter(self, int month=?, int day=?)
 *     cpdef _Pydt to_quarter(self, int offset, int month=?, int day=?)             # <<<<<<<<<<<<<<
 *     # . month
 *     cpdef _Pydt to_curr_month(self, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter {
  int __pyx_n;
  int month;
  int day;
};

/* "cytimes/pydt.pxd":43
 *     cpdef _Pydt to_quarter(self, int offset, int month=?, int day=?)
 *     # . month
 *     cpdef _Pydt to_curr_month(self, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_prev_month(self, int day=?)
 *     cpdef _Pydt to_next_month(self, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month {
  int __pyx_n;
  int day;
};

/* "cytimes/pydt.pxd":44
 *     # . month
 *     cpdef _Pydt to_curr_month(self, int day=?)
 *     cpdef _Pydt to_prev_month(self, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_next_month(self, int day=?)
 *     cpdef _Pydt to_month(self, int offset, int day=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month {
  int __pyx_n;
  int day;
};

/* "cytimes/pydt.pxd":45
 *     cpdef _Pydt to_curr_month(self, int day=?)
 *     cpdef _Pydt to_prev_month(self, int day=?)
 *     cpdef _Pydt to_next_month(self, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_month(self, int offset, int day=?)
 *     # . weekday
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month {
  int __pyx_n;
  int day;
};

/* "cytimes/pydt.pxd":46
 *     cpdef _Pydt to_prev_month(self, int day=?)
 *     cpdef _Pydt to_next_month(self, int day=?)
 *     cpdef _Pydt to_month(self, int offset, int day=?)             # <<<<<<<<<<<<<<
 *     # . weekday
 *     cpdef _Pydt to_monday(self)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month {
  int __pyx_n;
  int day;
};

/* "cytimes/pydt.pxd":55
 *     cpdef _Pydt to_saturday(self)
 *     cpdef _Pydt to_sunday(self)
 *     cpdef _Pydt to_curr_weekday(self, object weekday=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_prev_weekday(self, object weekday=?)
 *     cpdef _Pydt to_next_weekday(self, object weekday=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday {
  int __pyx_n;
  PyObject *weekday;
};

/* "cytimes/pydt.pxd":56
 *     cpdef _Pydt to_sunday(self)
 *     cpdef _Pydt to_curr_weekday(self, object weekday=?)
 *     cpdef _Pydt to_prev_weekday(self, object weekday=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_next_weekday(self, object weekday=?)
 *     cpdef _Pydt to_weekday(self, int offset, object weekday=?)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday {
  int __pyx_n;
  PyObject *weekday;
};

/* "cytimes/pydt.pxd":57
 *     cpdef _Pydt to_curr_weekday(self, object weekday=?)
 *     cpdef _Pydt to_prev_weekday(self, object weekday=?)
 *     cpdef _Pydt to_next_weekday(self, object weekday=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_weekday(self, int offset, object weekday=?)
 *     cdef inline _Pydt _to_curr_weekday(self, int weekday)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday {
  int __pyx_n;
  PyObject *weekday;
};

/* "cytimes/pydt.pxd":58
 *     cpdef _Pydt to_prev_weekday(self, object weekday=?)
 *     cpdef _Pydt to_next_weekday(self, object weekday=?)
 *     cpdef _Pydt to_weekday(self, int offset, object weekday=?)             # <<<<<<<<<<<<<<
 *     cdef inline _Pydt _to_curr_weekday(self, int weekday)
 *     # . day
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday {
  int __pyx_n;
  PyObject *weekday;
};

/* "cytimes/pydt.pxd":66
 *     # . date&time
 *     cpdef _Pydt normalize(self)
 *     cpdef _Pydt to_datetime(             # <<<<<<<<<<<<<<
 *         self, int year=?, int month=?, int day=?,
 *         int hour=?, int minute=?, int second=?, int microsecond=?,
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime {
  int __pyx_n;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "cytimes/pydt.pxd":70
 *         int hour=?, int minute=?, int second=?, int microsecond=?,
 *     )
 *     cpdef _Pydt to_date(self, int year=?, int month=?, int day=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_time(self, int hour=?, int minute=?, int second=?, int microsecond=?)
 *     cpdef _Pydt to_first_of(self, str unit)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date {
  int __pyx_n;
  int year;
  int month;
  int day;
};

/* "cytimes/pydt.pxd":71
 *     )
 *     cpdef _Pydt to_date(self, int year=?, int month=?, int day=?)
 *     cpdef _Pydt to_time(self, int hour=?, int minute=?, int second=?, int microsecond=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt to_first_of(self, str unit)
 *     cpdef _Pydt to_last_of(self, str unit)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time {
  int __pyx_n;
  int hour;
  int minute;
  int second;
  int microsecond;
};

/* "cytimes/pydt.pxd":113
 *     cpdef int days_bf_month(self) noexcept
 *     cpdef int day_of_month(self) noexcept
 *     cpdef str month_name(self, object locale=?)             # <<<<<<<<<<<<<<
 *     # . weekday
 *     cpdef int access_weekday(self) noexcept
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name {
  int __pyx_n;
  PyObject *locale;
};

/* "cytimes/pydt.pxd":117
 *     cpdef int access_weekday(self) noexcept
 *     cpdef bint is_weekday(self, object weekday) noexcept
 *     cpdef str weekday_name(self, object locale=?)             # <<<<<<<<<<<<<<
 *     # . day
 *     cpdef int access_day(self) noexcept
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name {
  int __pyx_n;
  PyObject *locale;
};

/* "cytimes/pydt.pxd":137
 *     cpdef object utcoffset_seconds(self)
 *     cpdef datetime.timedelta dst(self)
 *     cpdef _Pydt astimezone(self, object tz=?)             # <<<<<<<<<<<<<<
 *     cpdef _Pydt tz_localize(self, object tz)
 *     cpdef _Pydt tz_convert(self, object tz)
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone {
  int __pyx_n;
  PyObject *tz;
};

/* "cytimes/pydt.pxd":140
 *     cpdef _Pydt tz_localize(self, object tz)
 *     cpdef _Pydt tz_convert(self, object tz)
 *     cpdef _Pydt tz_switch(self, object targ_tz, object base_tz=?, bint naive=?)             # <<<<<<<<<<<<<<
 *     # Arithmetic
 *     cpdef _Pydt add(
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch {
  int __pyx_n;
  PyObject *base_tz;
  int naive;
};

/* "cytimes/pydt.pxd":142
 *     cpdef _Pydt tz_switch(self, object targ_tz, object base_tz=?, bint naive=?)
 *     # Arithmetic
 *     cpdef _Pydt add(             # <<<<<<<<<<<<<<
 *         self, int years=?, int quarters=?, int months=?,
 *         int weeks=?, int days=?, int hours=?, int minutes=?,
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  int days;
  int hours;
  int minutes;
  int seconds;
  int milliseconds;
  int microseconds;
};

/* "cytimes/pydt.pxd":147
 *         int seconds=?, int milliseconds=?, int microseconds=?
 *     )
 *     cpdef _Pydt sub(             # <<<<<<<<<<<<<<
 *         self, int years=?, int quarters=?, int months=?,
 *         int weeks=?, int days=?, int hours=?, int minutes=?,
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub {
  int __pyx_n;
  int years;
  int quarters;
  int months;
  int weeks;
  int days;
  int hours;
  int minutes;
  int seconds;
  int milliseconds;
  int microseconds;
};

/* "cytimes/pydt.pxd":152
 *         int seconds=?, int milliseconds=?, int microseconds=?
 *     )
 *     cpdef long long diff(self, object dtobj, str unit, bint absolute=?, str inclusive=?)             # <<<<<<<<<<<<<<
 *     # Comparison
 *     cpdef bint is_past(self) except -1
*/
struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff {
  int __pyx_n;
  int absolute;
  PyObject *inclusive;
};

/* "cytimes/parser.pxd":246
 *     dict _DEFAULT_AMPM
 * 
 * cdef class Configs:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . settings
*/
struct __pyx_obj_7cytimes_6parser_Configs {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Configs *__pyx_vtab;
  int _yearfirst;
  int _dayfirst;
  PyObject *_jump;
  PyObject *_jump_ext;
  PyObject *_pertain;
  PyObject *_pertain_ext;
  PyObject *_utc;
  PyObject *_utc_ext;
  PyObject *_tz;
  PyObject *_tz_ext;
  PyObject *_month;
  PyObject *_month_ext;
  PyObject *_weekday;
  PyObject *_weekday_ext;
  PyObject *_hms;
  PyObject *_hms_ext;
  PyObject *_ampm;
  PyObject *_ampm_ext;
  PyObject *_Configs__cls;
};


/* "cytimes/parser.pxd":326
 * 
 * # Parser
 * cdef class Result:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . Y/M/D
*/
struct __pyx_obj_7cytimes_6parser_Result {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Result *__pyx_vtab;
  int _ymd[3];
  int _idx;
  int _yidx;
  int _midx;
  int _didx;
  int _resolved;
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
  int microsecond;
  int weekday;
  int doy;
  int ampm;
  int tzoffset;
  int tzoffset_finalized;
  int century_specified;
};


/* "cytimes/parser.pxd":374
 *     cdef inline bint _reset(self) noexcept
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     cdef:
 *         bint _ignoretz
*/
struct __pyx_obj_7cytimes_6parser_Parser {
  PyObject_HEAD
  struct __pyx_vtabstruct_7cytimes_6parser_Parser *__pyx_vtab;
  int _ignoretz;
  struct __pyx_obj_7cytimes_6parser_Configs *_cfg;
  struct __pyx_obj_7cytimes_6parser_Result *_res;
  Py_ssize_t _pos;
  Py_ssize_t _length;
  PyObject *_tokens;
  PyObject *_token1;
  PyObject *_Parser__cls;
};


/* "cytimes/pydt.pxd":6
 * 
 * # Pydt (Python Datetime)
 * cdef class _Pydt(datetime.datetime):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object __cls
*/
struct __pyx_obj_7cytimes_4pydt__Pydt {
  PyDateTime_DateTime __pyx_base;
  struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *__pyx_vtab;
  PyObject *_Pydt__cls;
};



/* "cytimes/parser.pxd":246
 *     dict _DEFAULT_AMPM
 * 
 * cdef class Configs:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . settings
*/

struct __pyx_vtabstruct_7cytimes_6parser_Configs {
  PyObject *(*order_hint)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  int (*add_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_jump *__pyx_optional_args);
  int (*is_jump)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_pertain *__pyx_optional_args);
  int (*is_pertain)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*remove_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_utc *__pyx_optional_args);
  int (*is_utc)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_add_tz *__pyx_optional_args);
  int (*remove_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_tz *__pyx_optional_args);
  int (*is_tz)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_tz_offset)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_month)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_month *__pyx_optional_args);
  int (*is_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_month)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_weekday *__pyx_optional_args);
  int (*is_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_weekday)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_hms *__pyx_optional_args);
  int (*is_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_hms)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*add_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int __pyx_skip_dispatch);
  int (*remove_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*replace_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_7Configs_replace_ampm *__pyx_optional_args);
  int (*is_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*get_ampm)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int __pyx_skip_dispatch);
  int (*clear_settings)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  int (*reset_settings)(struct __pyx_obj_7cytimes_6parser_Configs *, int __pyx_skip_dispatch);
  PyObject *(*_ensure_str_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_validate_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_lowercase_token)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  PyObject *(*_gen_token_case_variants)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *);
  int (*_ensure_int_value)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, PyObject *);
  int (*_validate_value)(struct __pyx_obj_7cytimes_6parser_Configs *, PyObject *, int, int, int);
  PyObject *(*_cls)(struct __pyx_obj_7cytimes_6parser_Configs *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Configs *__pyx_vtabptr_7cytimes_6parser_Configs;


/* "cytimes/parser.pxd":326
 * 
 * # Parser
 * cdef class Result:             # <<<<<<<<<<<<<<
 *     cdef:
 *         # . Y/M/D
*/

struct __pyx_vtabstruct_7cytimes_6parser_Result {
  int (*set_ymd_int)(struct __pyx_obj_7cytimes_6parser_Result *, int, PY_LONG_LONG);
  int (*set_ymd_str)(struct __pyx_obj_7cytimes_6parser_Result *, int, PyObject *, struct __pyx_opt_args_7cytimes_6parser_6Result_set_ymd_str *__pyx_optional_args);
  int (*ymd_slots_filled)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*ymd_roles_resolved)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*could_be_day)(struct __pyx_obj_7cytimes_6parser_Result *, PY_LONG_LONG);
  int (*could_be_doy)(struct __pyx_obj_7cytimes_6parser_Result *, PY_LONG_LONG);
  int (*resolve)(struct __pyx_obj_7cytimes_6parser_Result *, int, int);
  int (*valid)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_year_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_month_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_day_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_hour_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_minute_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_second_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_microsecond_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_weekday_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_doy_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_ampm_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*is_tzoffset_set)(struct __pyx_obj_7cytimes_6parser_Result *);
  int (*_record_ymd)(struct __pyx_obj_7cytimes_6parser_Result *, int, int);
  int (*_reset)(struct __pyx_obj_7cytimes_6parser_Result *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Result *__pyx_vtabptr_7cytimes_6parser_Result;


/* "cytimes/parser.pxd":374
 *     cdef inline bint _reset(self) noexcept
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     cdef:
 *         bint _ignoretz
*/

struct __pyx_vtabstruct_7cytimes_6parser_Parser {
  PyDateTime_DateTime *(*parse)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_6Parser_parse *__pyx_optional_args);
  int (*_process)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, int);
  PyDateTime_DateTime *(*_build)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, PyObject *, PyObject *);
  PyDateTime_DateTime *(*_gen_dt)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *, PyObject *, PyObject *);
  int (*_process_iso_format)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_date)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_time)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_extra)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_process_timelex_tokens)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_numeric)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_month)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_iso_week)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_weekday)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_ampm)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_tzname)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_parse_token_tzoffset)(struct __pyx_obj_7cytimes_6parser_Parser *, PyObject *);
  int (*_has_token)(struct __pyx_obj_7cytimes_6parser_Parser *, Py_ssize_t);
  PyObject *(*_get_token)(struct __pyx_obj_7cytimes_6parser_Parser *, Py_ssize_t);
  PyObject *(*_get_token1)(struct __pyx_obj_7cytimes_6parser_Parser *);
  PyObject *(*_get_next_token)(struct __pyx_obj_7cytimes_6parser_Parser *);
  int (*_reset_token_peeks)(struct __pyx_obj_7cytimes_6parser_Parser *);
  int (*_set_ymd_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, int, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_ymd_by_token *__pyx_optional_args);
  int (*_set_hms_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, int, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hms_by_token *__pyx_optional_args);
  int (*_set_hour_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_hour_by_token *__pyx_optional_args);
  int (*_set_minute_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_minute_by_token *__pyx_optional_args);
  int (*_set_second_by_token)(struct __pyx_obj_7cytimes_6parser_Parser *, struct __pyx_opt_args_7cytimes_6parser_6Parser__set_second_by_token *__pyx_optional_args);
  int (*_adjust_hour_by_ampm)(struct __pyx_obj_7cytimes_6parser_Parser *, int, int);
  PyObject *(*_cls)(struct __pyx_obj_7cytimes_6parser_Parser *);
};
static struct __pyx_vtabstruct_7cytimes_6parser_Parser *__pyx_vtabptr_7cytimes_6parser_Parser;


/* "cytimes/pydt.py":98
 * # Pydt (Python Datetime) ----------------------------------------------------------------------
 * @cython.cclass
 * class _Pydt(datetime.datetime):             # <<<<<<<<<<<<<<
 *     """The base class for `<'Pydt'>`, a subclass of the cpython `<'datetime.datetime'>`.
 * 
*/

struct __pyx_vtabstruct_7cytimes_4pydt__Pydt {
  PyObject *(*ctime)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*strftime)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*isoformat)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat *__pyx_optional_args);
  PyObject *(*timedict)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*utctimedict)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*timetuple)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*utctimetuple)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*toordinal)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  double (*toseconds)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds *__pyx_optional_args);
  PY_LONG_LONG (*tomicroseconds)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds *__pyx_optional_args);
  double (*timestamp)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyDateTime_Date *(*date)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyDateTime_Time *(*time)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyDateTime_Time *(*timetz)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*_cls)(struct __pyx_obj_7cytimes_4pydt__Pydt *);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*replace)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_curr_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_prev_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_next_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_curr_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_prev_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_next_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_curr_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_prev_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_next_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_monday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_tuesday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_wednesday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_thursday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_friday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_saturday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_sunday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_curr_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_prev_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_next_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*_to_curr_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_yesterday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_tomorrow)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_day)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*normalize)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_datetime)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_date)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_time)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_first_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_last_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_start_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*to_end_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  int (*is_first_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  int (*is_last_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  int (*is_start_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  int (*is_end_of)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*round)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*ceil)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*floor)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*fsp)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  PyObject *(*isocalendar)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*isoyear)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*isoweek)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*isoweekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  int (*is_leap_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_long_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*leap_bt_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  int (*days_in_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*days_bf_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*day_of_year)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  int (*days_in_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*days_bf_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*day_of_quarter)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  int (*days_in_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*days_bf_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*day_of_month)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*month_name)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name *__pyx_optional_args);
  int (*access_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_weekday)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*weekday_name)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name *__pyx_optional_args);
  int (*access_day)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_day)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch);
  int (*access_hour)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_minute)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_second)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_millisecond)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_microsecond)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*access_tzinfo)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*access_fold)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_local)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_utc)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_dst)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*tzname)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyDateTime_Delta *(*utcoffset)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyObject *(*utcoffset_seconds)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  PyDateTime_Delta *(*dst)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*astimezone)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*tz_localize)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*tz_convert)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*tz_switch)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*add)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add *__pyx_optional_args);
  struct __pyx_obj_7cytimes_4pydt__Pydt *(*sub)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub *__pyx_optional_args);
  PY_LONG_LONG (*diff)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff *__pyx_optional_args);
  int (*is_past)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
  int (*is_future)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *__pyx_vtabptr_7cytimes_4pydt__Pydt;
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_4pydt_5_Pydt__cls(struct __pyx_obj_7cytimes_4pydt__Pydt *);
static CYTHON_INLINE struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *, int);
/* #### Code section: utility_code_proto ### */

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

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

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

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

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

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

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

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

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

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

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

/* PyImportError_Check.proto */
#define __Pyx_PyExc_ImportError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ImportError)

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

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

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

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

/* PyRuntimeError_Check.proto */
#define __Pyx_PyExc_RuntimeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_RuntimeError)

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

/* PyZeroDivisionError_Check.proto */
#define __Pyx_PyExc_ZeroDivisionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_ZeroDivisionError)

/* PyOverflowError_Check.proto */
#define __Pyx_PyExc_OverflowError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_OverflowError)

/* py_unicode_predicate.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_Py_UNICODE_ISALPHA(Py_UCS4 uchar);
#else
#define __Pyx_Py_UNICODE_ISALPHA(u)  Py_UNICODE_ISALPHA(u)
#endif

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

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

/* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value);
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char);

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

/* IncludeStdlibH.proto (used by CIntToPyUnicode) */
#include <stdlib.h>

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

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

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

/* PyUnicode_Substring.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop);

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

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

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

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

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

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

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

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

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

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

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

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

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

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

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

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

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

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

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))

/* PyMemoryError_Check.proto */
#define __Pyx_PyExc_MemoryError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_MemoryError)

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

/* ModInt[PY_LONG_LONG].proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG, PY_LONG_LONG, int b_is_constant);

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

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

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_int(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_int(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_int(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

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

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

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

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

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char, char format_char);

/* PyAssertionError_Check.proto */
#define __Pyx_PyExc_AssertionError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_AssertionError)

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_npy_intp(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_npy_intp(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char, char format_char);

/* ModInt[npy_int64].proto */
static CYTHON_INLINE npy_int64 __Pyx_mod_npy_int64(npy_int64, npy_int64, int b_is_constant);

/* DivInt[npy_int64].proto */
static CYTHON_INLINE npy_int64 __Pyx_div_npy_int64(npy_int64, npy_int64, int b_is_constant);

/* PyObject_Unicode.proto */
#define __Pyx_PyObject_Unicode(obj)\
    (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared)
    #endif
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique)
    #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference)
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right))
#define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\
    ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right))

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

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

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

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

/* pybytes_as_double.proto (used by pyobject_as_double) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyBytes_AS_STRING(obj);
    size = PyBytes_GET_SIZE(obj);
#else
    if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
        return (double)-1;
    }
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}
static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    char* as_c_string;
    Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    as_c_string = PyByteArray_AS_STRING(obj);
    size = PyByteArray_GET_SIZE(obj);
#else
    as_c_string = PyByteArray_AsString(obj);
    if (as_c_string == NULL) {
        return (double)-1;
    }
    size = PyByteArray_Size(obj);
#endif
    return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
}

/* pyunicode_as_double.proto (used by pyobject_as_double) */
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    int last_was_punctuation;
    Py_ssize_t i;
    last_was_punctuation = 1;
    for (i=start; i <= end; i++) {
        Py_UCS4 chr = PyUnicode_READ(kind, data, i);
        int is_punctuation = (chr == '_') | (chr == '.');
        *buffer = (char)chr;
        buffer += (chr != '_');
        if (unlikely(chr > 127)) goto parse_failure;
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    int matches = 1;
    Py_UCS4 chr;
    Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    int is_signed = (sign == '-') | (sign == '+');
    start += is_signed;
    length -= is_signed;
    switch (PyUnicode_READ(kind, data, start)) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'a') | (chr == 'A');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'n') | (chr == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+1);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+2);
            matches &= (chr == 'f') | (chr == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            chr = PyUnicode_READ(kind, data, start+3);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+4);
            matches &= (chr == 'n') | (chr == 'N');
            chr = PyUnicode_READ(kind, data, start+5);
            matches &= (chr == 'i') | (chr == 'I');
            chr = PyUnicode_READ(kind, data, start+6);
            matches &= (chr == 't') | (chr == 'T');
            chr = PyUnicode_READ(kind, data, start+7);
            matches &= (chr == 'y') | (chr == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    double value;
    const char *last;
    char *end;
    Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    const int kind = PyUnicode_KIND(obj);
    const void* data = PyUnicode_DATA(obj);
    start = 0;
    while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
        start++;
    while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
        length--;
    length -= start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    if (length < 40) {
        char number[40];
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}
#endif
static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
#if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
        return (double)-1;
    if (likely(PyUnicode_IS_ASCII(obj))) {
        const char *s;
        Py_ssize_t length;
        s = PyUnicode_AsUTF8AndSize(obj, &length);
        return __Pyx__PyBytes_AsDouble(obj, s, length);
    }
    return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
#else
    return __Pyx_SlowPyString_AsDouble(obj);
#endif
}

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

/* FloatExceptionCheck.proto */
#define __PYX_CHECK_FLOAT_EXCEPTION(value, error_value)\
    ((error_value) == (error_value) ?\
     (value) == (error_value) :\
     (value) != (value))

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

/* pyint_simplify.proto */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none);

/* CallNextTpDealloc.proto */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

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

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_1
#define __PYX_HAVE_RT_ImportType_proto_3_2_1
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_1(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_1(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_1 {
   __Pyx_ImportType_CheckSize_Error_3_2_1 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_1 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_1 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_1(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_1 check_size);
#endif

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

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

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

/* FormatTypeName.proto (used by ValidateExternBase) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* ValidateExternBase.proto */
static int __Pyx_validate_extern_base(PyTypeObject *base);

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

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

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

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

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

/* SetVTable.proto */
static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);

/* GetVTable.proto (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* MergeVTables.proto */
static int __Pyx_MergeVtables(PyTypeObject *type);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ListPack.proto */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...);

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

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

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

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

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

/* SetNewInClass.proto */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);

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

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

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

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

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

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

/* 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 && (1) && (!0 || __cplusplus)
    #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 && (1) && (!0 || __cplusplus)
    #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

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    #define __Pyx_c_eq_long__double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_long__double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
    #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
    #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
    #define __Pyx_c_neg_long__double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
    #define __Pyx_c_conj_long__double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_long__double(z)     (::std::abs(z))
        #define __Pyx_c_pow_long__double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_long__double(z) ((z)==0)
    #define __Pyx_c_conj_long__double(z)    (conjl(z))
    #if 1
        #define __Pyx_c_abs_long__double(z)     (cabsl(z))
        #define __Pyx_c_pow_long__double(a, b)  (cpowl(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
    #if 1
        static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
        static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    #endif
#endif

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

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_intp(npy_intp value);

/* CIntFromPy.proto */
static CYTHON_INLINE npy_intp __Pyx_PyLong_As_npy_intp(PyObject *);

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

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

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

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

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

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

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

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

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
#endif
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_ctime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_strftime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_isoformat(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_timedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utctimedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_timetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utctimetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_toordinal(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static double __pyx_f_7cytimes_4pydt_5_Pydt_toseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds *__pyx_optional_args); /* proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pydt_5_Pydt_tomicroseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds *__pyx_optional_args); /* proto*/
static double __pyx_f_7cytimes_4pydt_5_Pydt_timestamp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyDateTime_Date *__pyx_f_7cytimes_4pydt_5_Pydt_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyDateTime_Time *__pyx_f_7cytimes_4pydt_5_Pydt_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyDateTime_Time *__pyx_f_7cytimes_4pydt_5_Pydt_timetz(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_4pydt_5_Pydt__cls(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_replace(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_monday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_tuesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_wednesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_thursday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_friday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_saturday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_sunday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday *__pyx_optional_args); /* proto*/
static CYTHON_INLINE struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_weekday); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_yesterday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_tomorrow(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_normalize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_datetime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_round(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_ceil(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_floor(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_fsp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_precision, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_isocalendar(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoyear(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoweek(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoweekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_leap_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_long_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_leap_bt_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_quarter, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_month_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name *__pyx_optional_args); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_weekday_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name *__pyx_optional_args); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_hour(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_minute(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_second(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_millisecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_microsecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_access_tzinfo(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_fold(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_local(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_utc(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_tzname(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyDateTime_Delta *__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset_seconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyDateTime_Delta *__pyx_f_7cytimes_4pydt_5_Pydt_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_astimezone(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_localize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_convert(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_switch(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_targ_tz, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_add(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add *__pyx_optional_args); /* proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_sub(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub *__pyx_optional_args); /* proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pydt_5_Pydt_diff(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_unit, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff *__pyx_optional_args); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_past(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_future(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

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

/* Module declarations from "__builtin__" */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "__builtin__" */

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

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

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

/* Module declarations from "cython" */

/* Module declarations from "__builtin__" */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "cpython" */

/* Module declarations from "datetime" */

/* Module declarations from "cpython.datetime" */
static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int, int, int); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cpython_8datetime_time_new(int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_new(int, int, int, int, int, int, int, PyObject *, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int, int, int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *); /*proto*/

/* Module declarations from "numpy" */

/* Module declarations from "numpy" */
static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *); /*proto*/
static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *); /*proto*/
static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *); /*proto*/
static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *); /*proto*/

/* Module declarations from "cytimes" */

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

/* Module declarations from "libc" */

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

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

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

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

/* Module declarations from "cpython.time" */
static CYTHON_INLINE double __pyx_f_7cpython_4time_time(void); /*proto*/
static CYTHON_INLINE int __pyx_f_7cpython_4time__raise_from_errno(void); /*proto*/

/* Module declarations from "cytimes.utils" */
static int (*__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH)[13] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_BR_MONTH (*__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH)
static int (*__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH)[13] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_IN_MONTH (*__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH)
static int (*__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER)[5] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_BR_QUARTER (*__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER)
static int (*__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER)[5] = 0;
#define __pyx_v_7cytimes_5utils_DAYS_IN_QUARTER (*__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER)
static PyObject **__pyx_vp_7cytimes_5utils_NAT = 0;
#define __pyx_v_7cytimes_5utils_NAT (*__pyx_vp_7cytimes_5utils_NAT)
static int *__pyx_vp_7cytimes_5utils_ORDINAL_MAX = 0;
#define __pyx_v_7cytimes_5utils_ORDINAL_MAX (*__pyx_vp_7cytimes_5utils_ORDINAL_MAX)
static PyDateTime_DateTime **__pyx_vp_7cytimes_5utils_EPOCH_DT = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_DT (*__pyx_vp_7cytimes_5utils_EPOCH_DT)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_YEAR = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_YEAR (*__pyx_vp_7cytimes_5utils_EPOCH_YEAR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MONTH = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MONTH (*__pyx_vp_7cytimes_5utils_EPOCH_MONTH)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_DAY = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_DAY (*__pyx_vp_7cytimes_5utils_EPOCH_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_HOUR = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_HOUR (*__pyx_vp_7cytimes_5utils_EPOCH_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MINUTE (*__pyx_vp_7cytimes_5utils_EPOCH_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_SECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_SECOND (*__pyx_vp_7cytimes_5utils_EPOCH_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MILLISECOND (*__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_MICROSECOND (*__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C4 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C4 (*__pyx_vp_7cytimes_5utils_EPOCH_C4)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C100 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C100 (*__pyx_vp_7cytimes_5utils_EPOCH_C100)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_C400 = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_C400 (*__pyx_vp_7cytimes_5utils_EPOCH_C400)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_EPOCH_CBASE = 0;
#define __pyx_v_7cytimes_5utils_EPOCH_CBASE (*__pyx_vp_7cytimes_5utils_EPOCH_CBASE)
static PyDateTime_TZInfo **__pyx_vp_7cytimes_5utils_UTC = 0;
#define __pyx_v_7cytimes_5utils_UTC (*__pyx_vp_7cytimes_5utils_UTC)
static PyObject **__pyx_vp_7cytimes_5utils_T_TIMEZONE = 0;
#define __pyx_v_7cytimes_5utils_T_TIMEZONE (*__pyx_vp_7cytimes_5utils_T_TIMEZONE)
static PyObject **__pyx_vp_7cytimes_5utils_T_ZONEINFO = 0;
#define __pyx_v_7cytimes_5utils_T_ZONEINFO (*__pyx_vp_7cytimes_5utils_T_ZONEINFO)
static int *__pyx_vp_7cytimes_5utils_NULL_TZOFFSET = 0;
#define __pyx_v_7cytimes_5utils_NULL_TZOFFSET (*__pyx_vp_7cytimes_5utils_NULL_TZOFFSET)
static PyObject **__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE = 0;
#define __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE (*__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE)
static PyObject **__pyx_vp_7cytimes_5utils__UTC_ALIASES = 0;
#define __pyx_v_7cytimes_5utils__UTC_ALIASES (*__pyx_vp_7cytimes_5utils__UTC_ALIASES)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_SS_MINUTE (*__pyx_vp_7cytimes_5utils_SS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_SS_HOUR (*__pyx_vp_7cytimes_5utils_SS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_SS_DAY = 0;
#define __pyx_v_7cytimes_5utils_SS_DAY (*__pyx_vp_7cytimes_5utils_SS_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_SECOND = 0;
#define __pyx_v_7cytimes_5utils_MS_SECOND (*__pyx_vp_7cytimes_5utils_MS_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_MS_MINUTE (*__pyx_vp_7cytimes_5utils_MS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_MS_HOUR (*__pyx_vp_7cytimes_5utils_MS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_MS_DAY = 0;
#define __pyx_v_7cytimes_5utils_MS_DAY (*__pyx_vp_7cytimes_5utils_MS_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_US_MILLISECOND (*__pyx_vp_7cytimes_5utils_US_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_SECOND = 0;
#define __pyx_v_7cytimes_5utils_US_SECOND (*__pyx_vp_7cytimes_5utils_US_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_US_MINUTE (*__pyx_vp_7cytimes_5utils_US_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_HOUR = 0;
#define __pyx_v_7cytimes_5utils_US_HOUR (*__pyx_vp_7cytimes_5utils_US_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_US_DAY = 0;
#define __pyx_v_7cytimes_5utils_US_DAY (*__pyx_vp_7cytimes_5utils_US_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_MICROSECOND (*__pyx_vp_7cytimes_5utils_NS_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_MILLISECOND (*__pyx_vp_7cytimes_5utils_NS_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_SECOND = 0;
#define __pyx_v_7cytimes_5utils_NS_SECOND (*__pyx_vp_7cytimes_5utils_NS_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_MINUTE = 0;
#define __pyx_v_7cytimes_5utils_NS_MINUTE (*__pyx_vp_7cytimes_5utils_NS_MINUTE)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_HOUR = 0;
#define __pyx_v_7cytimes_5utils_NS_HOUR (*__pyx_vp_7cytimes_5utils_NS_HOUR)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_NS_DAY = 0;
#define __pyx_v_7cytimes_5utils_NS_DAY (*__pyx_vp_7cytimes_5utils_NS_DAY)
static double *__pyx_vp_7cytimes_5utils_TD64_YY_DAY = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_DAY (*__pyx_vp_7cytimes_5utils_TD64_YY_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_SECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_SECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND (*__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND)
static double *__pyx_vp_7cytimes_5utils_TD64_MM_DAY = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_DAY (*__pyx_vp_7cytimes_5utils_TD64_MM_DAY)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_SECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_SECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_SECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND = 0;
#define __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND (*__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_US_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN (*__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_US_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX)
static PY_LONG_LONG *__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX = 0;
#define __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX (*__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_YY (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MM (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_WW (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_DD (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_HH (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MI (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_SS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_MS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_US = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_US (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_US)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_NS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_PS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_FS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS)
static PyObject **__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS = 0;
#define __pyx_v_7cytimes_5utils_DT64_DTYPE_AS (*__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_US (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_PS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_FS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS)
static int *__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS = 0;
#define __pyx_v_7cytimes_5utils_DT_NPY_UNIT_AS (*__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS)
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_even(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_even *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_ceil(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_ceil *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_floor(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_floor *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dot(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_comma(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_sign(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_minus_sign(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_iso_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_isoweek_sep(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_digit(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_upper(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_lower(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_alpha(Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isominute(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isominute *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_scale_fraction_to_us(int, int); /*proto*/
static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_slice_to_uint(PyObject *, Py_ssize_t, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_slice_to_uint *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_parse_to_int(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_parse_to_float(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_gmtime(double); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_localtime(double); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_localtime(double); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_sec_to_us(double); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tm_strformat(struct tm, PyObject *); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_leap_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_long_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leap_years(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leaps_bt_years(PY_LONG_LONG, PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_days_bf_year(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_year(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_quarter_of_month(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_quarter(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_quarter(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_quarter(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_month(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_month(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_weekday(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_iso __pyx_f_7cytimes_5utils_ymd_isocalendar(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_isoyear(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweek(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweekday(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_to_ord(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_ord(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_sec(double); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_iso(PY_LONG_LONG, int, int); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_doy(PY_LONG_LONG, int); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_iso_week1_mon_ord(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_combine_absolute_ms_us(int, int); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_new(struct __pyx_opt_args_7cytimes_5utils_date_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_now(struct __pyx_opt_args_7cytimes_5utils_date_now *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date(PyObject *); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_date_to_tm(PyDateTime_Date *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_ord(PyDateTime_Date *); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_date(PyDateTime_Date *, struct __pyx_opt_args_7cytimes_5utils_date_fr_date *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_date_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_new(struct __pyx_opt_args_7cytimes_5utils_dt_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_now(struct __pyx_opt_args_7cytimes_5utils_dt_now *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt(PyObject *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_local_mktime(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_strformat(PyDateTime_DateTime *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_isoformat(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_isoformat *__pyx_optional_args); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_dt_to_tm(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_tm *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_to_ctime(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_us(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_sec(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_ord(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_to_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_ts(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch(PyDateTime_DateTime *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch_W_iso(PyDateTime_DateTime *, int, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_dt_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_sec(double, struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ord(int, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_iso(int, int, int, struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_doy(int, int, struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ts(double, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_date(PyDateTime_Date *, struct __pyx_opt_args_7cytimes_5utils_dt_fr_date *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_combine(struct __pyx_opt_args_7cytimes_5utils_dt_combine *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_add *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add_delta(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_add_delta *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_replace *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz(PyDateTime_DateTime *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_fold(PyDateTime_DateTime *, int, struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doy(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doy(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doq(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doq(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_dom(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_dom(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_start_of_time(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_end_of_time(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_tzname(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_dst(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_utcoffset(PyDateTime_DateTime *); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_astimezone(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_astimezone *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_normalize_tz(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_new(struct __pyx_opt_args_7cytimes_5utils_time_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time(PyObject *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_time_to_us(PyDateTime_Time *); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_time_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_dt(PyDateTime_DateTime *, struct __pyx_opt_args_7cytimes_5utils_time_fr_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_new(struct __pyx_opt_args_7cytimes_5utils_td_new *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_utcformat(PyDateTime_Delta *); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_td_to_us(PyDateTime_Delta *); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_td_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_local(struct __pyx_opt_args_7cytimes_5utils_tz_local *__pyx_optional_args); /*proto*/
static PyObject *(*__pyx_f_7cytimes_5utils_tz_parse)(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_name(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_name *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_dst(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_dst *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_utcoffset(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_utcoffset_sec(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_utcformat(PyObject *, struct __pyx_opt_args_7cytimes_5utils_tz_utcformat *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2str(int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2dt64(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_nptime_unit_str2int(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_str2dt64(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_get_arr_nptime_unit(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(int); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64(PyObject *); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_dt64_as_int64_us(PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt64_to_dt(PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64(PyObject *); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_td64_as_int64_us(PyObject *, struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(npy_int64, int, struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_M_as_int64_D(npy_int64, int, struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td64_to_td(PyObject *, struct __pyx_opt_args_7cytimes_5utils_td64_to_td *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_1dim_arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64_like(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_zero_int64(npy_intp); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_fill_int64(npy_int64, npy_intp); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_min *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min_arr(PyArrayObject *, PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_min_arr *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_neg(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_neg *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_add *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mod(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_mod *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_even *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_up *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_down *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc(PyArrayObject *, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add_arr(PyArrayObject *, PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_arr_add_arr *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_month(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_month *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_hour(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_minute(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_second(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_second *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_millisecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_microsecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_nanosecond(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_times(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_times *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_month(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(PyArrayObject *, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(PyArrayObject *, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64, npy_int64); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(PyArrayObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(PyArrayObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(PyObject *, int, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64arr(PyArrayObject *); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(PyArrayObject *, int, struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(PyArrayObject *, int, struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.parser" */
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_PERTAIN (*__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_JUMP = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_JUMP (*__pyx_vp_7cytimes_6parser__DEFAULT_JUMP)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_UTC = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_UTC (*__pyx_vp_7cytimes_6parser__DEFAULT_UTC)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_TZ = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_TZ (*__pyx_vp_7cytimes_6parser__DEFAULT_TZ)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_MONTH = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_MONTH (*__pyx_vp_7cytimes_6parser__DEFAULT_MONTH)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_WEEKDAY (*__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_HMS = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_HMS (*__pyx_vp_7cytimes_6parser__DEFAULT_HMS)
static PyObject **__pyx_vp_7cytimes_6parser__DEFAULT_AMPM = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_AMPM (*__pyx_vp_7cytimes_6parser__DEFAULT_AMPM)
static struct __pyx_obj_7cytimes_6parser_Configs **__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_CONFIGS (*__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS)
static struct __pyx_obj_7cytimes_6parser_Parser **__pyx_vp_7cytimes_6parser__DEFAULT_PARSER = 0;
#define __pyx_v_7cytimes_6parser__DEFAULT_PARSER (*__pyx_vp_7cytimes_6parser__DEFAULT_PARSER)
static PyDateTime_DateTime *(*__pyx_f_7cytimes_6parser_parse_obj)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_obj *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6parser_parse_month)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_month *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6parser_parse_weekday)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_weekday *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.errors" */
static int (*__pyx_f_7cytimes_6errors_raise_error)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_error *__pyx_optional_args); /*proto*/
static int (*__pyx_f_7cytimes_6errors_raise_argument_error)(int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_argument_error *__pyx_optional_args); /*proto*/

/* Module declarations from "cytimes.pydt" */
static PY_LONG_LONG __pyx_f_7cytimes_4pydt__parse_unit_factor(PyObject *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "cytimes.pydt"
extern int __pyx_module_is_main_cytimes__pydt;
int __pyx_module_is_main_cytimes__pydt = 0;

/* Implementation of "cytimes.pydt" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_NotImplemented;
/* #### Code section: string_decls ### */
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7cytimes_5utils_parse_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_2parse_to_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt__new(PyTypeObject *__pyx_v_cls, 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_tzinfo, int __pyx_v_fold); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_2parse(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_default, PyObject *__pyx_v_yearfirst, PyObject *__pyx_v_dayfirst, int __pyx_v_ignoretz, int __pyx_v_isoformat, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4now(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6utcnow(PyTypeObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_8today(PyTypeObject *__pyx_v_cls); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_10combine(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_date, PyObject *__pyx_v_time, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_12fromordinal(PyTypeObject *__pyx_v_cls, int __pyx_v_ordinal, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_14fromseconds(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_seconds, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_16frommicroseconds(PyTypeObject *__pyx_v_cls, PY_LONG_LONG __pyx_v_us, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_18fromtimestamp(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_20utcfromtimestamp(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_ts); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_22fromisoformat(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtstr); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_24fromisocalendar(PyTypeObject *__pyx_v_cls, int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_26fromdayofyear(PyTypeObject *__pyx_v_cls, int __pyx_v_year, int __pyx_v_doy, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_28fromdate(PyTypeObject *__pyx_v_cls, PyDateTime_Date *__pyx_v_date, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_30fromdatetime(PyTypeObject *__pyx_v_cls, PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_32fromdatetime64(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dt64, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_34strptime(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_fmt); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_36ctime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_38strftime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_40isoformat(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_sep); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_42timedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_44utctimedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_46timetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_48utctimetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_50toordinal(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_52toseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_utc); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_54tomicroseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_utc); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_56timestamp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_58date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_60time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_62timetz(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_64replace(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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_tzinfo, int __pyx_v_fold); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_66to_curr_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_68to_prev_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_70to_next_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_72to_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_74to_curr_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_76to_prev_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_78to_next_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_80to_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_82to_curr_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_84to_prev_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_86to_next_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_88to_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_90to_monday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_92to_tuesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_94to_wednesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_96to_thursday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_98to_friday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_100to_saturday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_102to_sunday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_104to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_106to_prev_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_108to_next_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_110to_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_112to_yesterday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_114to_tomorrow(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_116to_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_118normalize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_120to_datetime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_122to_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_124to_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_126to_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_128to_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_130to_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_132to_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_134is_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_136is_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_138is_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_140is_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_142round(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_144ceil(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_146floor(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_148fsp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_precision); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_150isocalendar(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_152isoyear(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_154isoweek(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_156isoweekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4year___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_158access_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_160is_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_162is_leap_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_164is_long_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_166leap_bt_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_168days_in_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_170days_bf_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_172day_of_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_7quarter___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_174access_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_176is_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_quarter); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_178days_in_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_180days_bf_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_182day_of_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_5month___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_184access_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_186is_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_188days_in_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_190days_bf_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_192day_of_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_194month_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_locale); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_7weekday___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_196access_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_198is_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_200weekday_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_locale); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_3day___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_202access_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_204is_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4hour___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_206access_hour(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6minute___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_208access_minute(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6second___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_210access_second(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_11millisecond___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_212access_millisecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_11microsecond___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_214access_microsecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_12tz_available___get__(CYTHON_UNUSED struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_2tz___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6tzinfo___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_216access_tzinfo(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4fold___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_218access_fold(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_220is_local(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_222is_utc(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_224is_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_226tzname(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_228utcoffset(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_230utcoffset_seconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_232dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_234astimezone(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_236tz_localize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_238tz_convert(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_240tz_switch(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_targ_tz, PyObject *__pyx_v_base_tz, int __pyx_v_naive); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_242add(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_244sub(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_246diff(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_unit, int __pyx_v_absolute, PyObject *__pyx_v_inclusive); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_248__add__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_250__radd__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_252__sub__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_254is_past(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_256is_future(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_258__repr__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_260__str__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_262__format__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt); /* proto */
static Py_hash_t __pyx_pf_7cytimes_4pydt_5_Pydt_264__hash__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_266__copy__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_268__deepcopy__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_270__reduce__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_272__reduce_ex__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */
static PyObject *__pyx_pf_7cytimes_4pydt_4Pydt___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_microsecond, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_fold); /* proto */
static PyObject *__pyx_tp_new_7cytimes_4pydt__Pydt(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_7cpython_4type_type;
  PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
  PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_date;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_time;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta;
  PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo;
  PyTypeObject *__pyx_ptype_5numpy_dtype;
  PyTypeObject *__pyx_ptype_5numpy_flatiter;
  PyTypeObject *__pyx_ptype_5numpy_broadcast;
  PyTypeObject *__pyx_ptype_5numpy_ndarray;
  PyTypeObject *__pyx_ptype_5numpy_generic;
  PyTypeObject *__pyx_ptype_5numpy_number;
  PyTypeObject *__pyx_ptype_5numpy_integer;
  PyTypeObject *__pyx_ptype_5numpy_signedinteger;
  PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
  PyTypeObject *__pyx_ptype_5numpy_inexact;
  PyTypeObject *__pyx_ptype_5numpy_floating;
  PyTypeObject *__pyx_ptype_5numpy_complexfloating;
  PyTypeObject *__pyx_ptype_5numpy_flexible;
  PyTypeObject *__pyx_ptype_5numpy_character;
  PyTypeObject *__pyx_ptype_5numpy_ufunc;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Configs;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Result;
  PyTypeObject *__pyx_ptype_7cytimes_6parser_Parser;
  PyObject *__pyx_type_7cytimes_4pydt__Pydt;
  PyTypeObject *__pyx_ptype_7cytimes_4pydt__Pydt;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  PyObject *__pyx_tuple[17];
  PyObject *__pyx_codeobj_tab[134];
  PyObject *__pyx_string_tab[874];
  PyObject *__pyx_number_tab[3];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

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

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

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

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

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

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_ __pyx_string_tab[0]
#define __pyx_kp_u_02d __pyx_string_tab[1]
#define __pyx_kp_u_02d_02d __pyx_string_tab[2]
#define __pyx_kp_u_02d_02d_02d __pyx_string_tab[3]
#define __pyx_kp_u_02d_02d_02d_06d __pyx_string_tab[4]
#define __pyx_kp_u_02d_02d_02d_06d_2 __pyx_string_tab[5]
#define __pyx_kp_u_02d_02d_02d_2 __pyx_string_tab[6]
#define __pyx_kp_u_02d_02d_2 __pyx_string_tab[7]
#define __pyx_kp_u_04d __pyx_string_tab[8]
#define __pyx_kp_u_06d __pyx_string_tab[9]
#define __pyx_kp_u_06d_2 __pyx_string_tab[10]
#define __pyx_kp_u_2d __pyx_string_tab[11]
#define __pyx_kp_u_7f __pyx_string_tab[12]
#define __pyx_kp_u_A_drop_in_replacement_for_the_st __pyx_string_tab[13]
#define __pyx_kp_u_Accepts __pyx_string_tab[14]
#define __pyx_kp_u_Accepts_Y_M_W_D_h_m_s_ms_us_ns __pyx_string_tab[15]
#define __pyx_kp_u_Adjust_the_date_and_time_fields __pyx_string_tab[16]
#define __pyx_kp_u_Adjust_the_date_to_day_offset_Py __pyx_string_tab[17]
#define __pyx_kp_u_Adjust_the_date_to_the_specific __pyx_string_tab[18]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_2 __pyx_string_tab[19]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_3 __pyx_string_tab[20]
#define __pyx_kp_u_Adjust_the_date_to_the_specific_4 __pyx_string_tab[21]
#define __pyx_kp_u_Adjust_the_date_to_the_specified __pyx_string_tab[22]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_10 __pyx_string_tab[23]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_11 __pyx_string_tab[24]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_12 __pyx_string_tab[25]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_2 __pyx_string_tab[26]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_3 __pyx_string_tab[27]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_4 __pyx_string_tab[28]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_5 __pyx_string_tab[29]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_6 __pyx_string_tab[30]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_7 __pyx_string_tab[31]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_8 __pyx_string_tab[32]
#define __pyx_kp_u_Adjust_the_date_to_the_specified_9 __pyx_string_tab[33]
#define __pyx_kp_u_Adjust_the_date_with_new_values __pyx_string_tab[34]
#define __pyx_kp_u_Adjust_the_time_fields_with_new __pyx_string_tab[35]
#define __pyx_kp_u_Adjust_to_the_specified_fraction __pyx_string_tab[36]
#define __pyx_kp_u_Argument_sep_cannot_be_None __pyx_string_tab[37]
#define __pyx_kp_u_Cannot_add_delta_to_ndarray_s_Su __pyx_string_tab[38]
#define __pyx_kp_u_Cannot_compare_naive_and_aware_d __pyx_string_tab[39]
#define __pyx_kp_u_Cannot_compare_ndarrays_with_dif __pyx_string_tab[40]
#define __pyx_kp_u_Cannot_convert __pyx_string_tab[41]
#define __pyx_kp_u_Cannot_convert_2 __pyx_string_tab[42]
#define __pyx_kp_u_Cannot_convert_array_from_dateti __pyx_string_tab[43]
#define __pyx_kp_u_Cannot_convert_ndarray __pyx_string_tab[44]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative __pyx_string_tab[45]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative_2 __pyx_string_tab[46]
#define __pyx_kp_u_Cannot_create_date_using_custom __pyx_string_tab[47]
#define __pyx_kp_u_Cannot_create_datetime_using_cus __pyx_string_tab[48]
#define __pyx_kp_u_Cannot_create_time_using_custom __pyx_string_tab[49]
#define __pyx_kp_u_Cannot_create_timedelta_using_cu __pyx_string_tab[50]
#define __pyx_kp_u_Cannot_parse __pyx_string_tab[51]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains __pyx_string_tab[52]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_2 __pyx_string_tab[53]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_3 __pyx_string_tab[54]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_4 __pyx_string_tab[55]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative __pyx_string_tab[56]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative_2 __pyx_string_tab[57]
#define __pyx_kp_u_Cannot_parse_s_to_float_no_digit __pyx_string_tab[58]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive __pyx_string_tab[59]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive_2 __pyx_string_tab[60]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai __pyx_string_tab[61]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_2 __pyx_string_tab[62]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_3 __pyx_string_tab[63]
#define __pyx_kp_u_Cannot_parse_s_to_integer_negati __pyx_string_tab[64]
#define __pyx_kp_u_Cannot_parse_s_to_integer_no_dig __pyx_string_tab[65]
#define __pyx_kp_u_Cannot_parse_s_to_integer_positi __pyx_string_tab[66]
#define __pyx_kp_u_Cannot_perform_addition_on_ndarr __pyx_string_tab[67]
#define __pyx_kp_u_Cannot_perform_multiplication_on __pyx_string_tab[68]
#define __pyx_kp_u_Cannot_perform_subtraction_on_nd __pyx_string_tab[69]
#define __pyx_kp_u_Cannot_subtract_naive_and_aware __pyx_string_tab[70]
#define __pyx_kp_u_Check_whether_is_in_the_future_b __pyx_string_tab[71]
#define __pyx_kp_u_Check_whether_is_in_the_past_boo __pyx_string_tab[72]
#define __pyx_kp_u_Construct_a_UTC_aware_datetime_f __pyx_string_tab[73]
#define __pyx_kp_u_Construct_a_current_local_dateti __pyx_string_tab[74]
#define __pyx_kp_u_Conversion_limits_to_units_betw __pyx_string_tab[75]
#define __pyx_kp_u_Convert_timezone_aware_datetime __pyx_string_tab[76]
#define __pyx_kp_u_D_2 __pyx_string_tab[77]
#define __pyx_kp_u_Datetime_s_is_already_timezone_a __pyx_string_tab[78]
#define __pyx_kp_u_Datetime_s_is_timezone_naive_Can __pyx_string_tab[79]
#define __pyx_kp_u_Datetime_s_is_timezone_naive_Use __pyx_string_tab[80]
#define __pyx_kp_u_Delta_unit_cannot_be_None __pyx_string_tab[81]
#define __pyx_kp_u_Delta_unit_cannot_be_an_empty_st __pyx_string_tab[82]
#define __pyx_kp_u_Expects_1_D_ndarray_instead_got __pyx_string_tab[83]
#define __pyx_kp_u_Expects_an_instance_of_datetime __pyx_string_tab[84]
#define __pyx_kp_u_Expects_an_instance_of_np_dateti __pyx_string_tab[85]
#define __pyx_kp_u_Expects_an_instance_of_np_ndarra __pyx_string_tab[86]
#define __pyx_kp_u_Expects_an_instance_of_np_timede __pyx_string_tab[87]
#define __pyx_kp_u_Expects_instance_of_np_ndarray_t __pyx_string_tab[88]
#define __pyx_kp_u_Expects_ndarray_datetime64_or_nd __pyx_string_tab[89]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_U __pyx_string_tab[90]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_l __pyx_string_tab[91]
#define __pyx_kp_u_Failed_ndarray_datetime64 __pyx_string_tab[92]
#define __pyx_kp_u_Fractional_seconds_precision_mus __pyx_string_tab[93]
#define __pyx_kp_u_Localize_timezone_naive_datetime __pyx_string_tab[94]
#define __pyx_kp_u_M_2 __pyx_string_tab[95]
#define __pyx_kp_u_None __pyx_string_tab[96]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[97]
#define __pyx_kp_u_Only_supports_arrays_with_units __pyx_string_tab[98]
#define __pyx_kp_u_Perform_ceil_operation_to_the_sp __pyx_string_tab[99]
#define __pyx_kp_u_Perform_floor_operation_to_the_s __pyx_string_tab[100]
#define __pyx_kp_u_Perform_round_operation_to_the_s __pyx_string_tab[101]
#define __pyx_kp_u_Pydt_ceil_line_2267 __pyx_string_tab[102]
#define __pyx_kp_u_Pydt_day_of_month_line_2536 __pyx_string_tab[103]
#define __pyx_kp_u_Pydt_floor_line_2295 __pyx_string_tab[104]
#define __pyx_kp_u_Pydt_fsp_line_2324 __pyx_string_tab[105]
#define __pyx_kp_u_Pydt_is_future_line_3289 __pyx_string_tab[106]
#define __pyx_kp_u_Pydt_is_past_line_3279 __pyx_string_tab[107]
#define __pyx_kp_u_Pydt_isocalendar_line_2359 __pyx_string_tab[108]
#define __pyx_kp_u_Pydt_round_line_2231 __pyx_string_tab[109]
#define __pyx_kp_u_Pydt_timedict_line_618 __pyx_string_tab[110]
#define __pyx_kp_u_Pydt_timetuple_line_680 __pyx_string_tab[111]
#define __pyx_kp_u_Pydt_to_curr_month_line_1204 __pyx_string_tab[112]
#define __pyx_kp_u_Pydt_to_curr_quarter_line_1055 __pyx_string_tab[113]
#define __pyx_kp_u_Pydt_to_curr_weekday_line_1353 __pyx_string_tab[114]
#define __pyx_kp_u_Pydt_to_curr_year_line_896 __pyx_string_tab[115]
#define __pyx_kp_u_Pydt_to_date_line_1547 __pyx_string_tab[116]
#define __pyx_kp_u_Pydt_to_datetime_line_1496 __pyx_string_tab[117]
#define __pyx_kp_u_Pydt_to_day_line_1465 __pyx_string_tab[118]
#define __pyx_kp_u_Pydt_to_month_line_1273 __pyx_string_tab[119]
#define __pyx_kp_u_Pydt_to_next_month_line_1259 __pyx_string_tab[120]
#define __pyx_kp_u_Pydt_to_next_quarter_line_1128 __pyx_string_tab[121]
#define __pyx_kp_u_Pydt_to_next_weekday_line_1389 __pyx_string_tab[122]
#define __pyx_kp_u_Pydt_to_next_year_line_972 __pyx_string_tab[123]
#define __pyx_kp_u_Pydt_to_prev_month_line_1245 __pyx_string_tab[124]
#define __pyx_kp_u_Pydt_to_prev_quarter_line_1107 __pyx_string_tab[125]
#define __pyx_kp_u_Pydt_to_prev_weekday_line_1371 __pyx_string_tab[126]
#define __pyx_kp_u_Pydt_to_prev_year_line_947 __pyx_string_tab[127]
#define __pyx_kp_u_Pydt_to_quarter_line_1149 __pyx_string_tab[128]
#define __pyx_kp_u_Pydt_to_time_line_1574 __pyx_string_tab[129]
#define __pyx_kp_u_Pydt_to_weekday_line_1407 __pyx_string_tab[130]
#define __pyx_kp_u_Pydt_to_year_line_997 __pyx_string_tab[131]
#define __pyx_kp_u_Pydt_today_line_235 __pyx_string_tab[132]
#define __pyx_kp_u_Pydt_tz_available___get___line __pyx_string_tab[133]
#define __pyx_kp_u_Pydt_tz_convert_line_2863 __pyx_string_tab[134]
#define __pyx_kp_u_Pydt_tz_localize_line_2825 __pyx_string_tab[135]
#define __pyx_kp_u_Pydt_utcfromtimestamp_line_403 __pyx_string_tab[136]
#define __pyx_kp_u_Pydt_utctimedict_line_649 __pyx_string_tab[137]
#define __pyx_kp_u_Pydt_utctimetuple_line_713 __pyx_string_tab[138]
#define __pyx_kp_u_Return_UTC_time_dictionary_compa __pyx_string_tab[139]
#define __pyx_kp_u_Return_UTC_time_tuple_compatible __pyx_string_tab[140]
#define __pyx_kp_u_Return_local_time_dictionary_com __pyx_string_tab[141]
#define __pyx_kp_u_Return_local_time_tuple_compatib __pyx_string_tab[142]
#define __pyx_kp_u_Return_the_ISO_calendar_dict_Exa __pyx_string_tab[143]
#define __pyx_kp_u_Return_the_number_of_days_since __pyx_string_tab[144]
#define __pyx_kp_u_Seconds_value_must_be_finite_got __pyx_string_tab[145]
#define __pyx_kp_u_Supports_D_h_m_s_ms_or_us_got_No __pyx_string_tab[146]
#define __pyx_kp_u_Supports_D_h_m_s_ms_or_us_got_s __pyx_string_tab[147]
#define __pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o __pyx_string_tab[148]
#define __pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o_2 __pyx_string_tab[149]
#define __pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g __pyx_string_tab[150]
#define __pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2 __pyx_string_tab[151]
#define __pyx_kp_u_Supports_one_both_or_neither_got __pyx_string_tab[152]
#define __pyx_kp_u_The_available_timezone_names_set __pyx_string_tab[153]
#define __pyx_kp_u_The_size_of_a_new_array_must_be __pyx_string_tab[154]
#define __pyx_kp_u_Timezone_offset __pyx_string_tab[155]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo __pyx_string_tab[156]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo_2 __pyx_string_tab[157]
#define __pyx_kp_u_Unsupported_datetime_resolution __pyx_string_tab[158]
#define __pyx_kp_u_Unsupported_numpy_time_unit_NPY __pyx_string_tab[159]
#define __pyx_kp_u_Unsupported_time_unit __pyx_string_tab[160]
#define __pyx_kp_u_W_2 __pyx_string_tab[161]
#define __pyx_kp_u_Y_2 __pyx_string_tab[162]
#define __pyx_kp_u__10 __pyx_string_tab[163]
#define __pyx_kp_u__11 __pyx_string_tab[164]
#define __pyx_kp_u__12 __pyx_string_tab[165]
#define __pyx_kp_u__13 __pyx_string_tab[166]
#define __pyx_kp_u__15 __pyx_string_tab[167]
#define __pyx_kp_u__2 __pyx_string_tab[168]
#define __pyx_kp_u__3 __pyx_string_tab[169]
#define __pyx_kp_u__4 __pyx_string_tab[170]
#define __pyx_kp_u__5 __pyx_string_tab[171]
#define __pyx_kp_u__6 __pyx_string_tab[172]
#define __pyx_kp_u__7 __pyx_string_tab[173]
#define __pyx_kp_u__8 __pyx_string_tab[174]
#define __pyx_kp_u__9 __pyx_string_tab[175]
#define __pyx_kp_u_add_2 __pyx_string_tab[176]
#define __pyx_kp_u_add_note __pyx_string_tab[177]
#define __pyx_kp_u_arr2_length __pyx_string_tab[178]
#define __pyx_kp_u_arr_div_ceil_division_by_zero __pyx_string_tab[179]
#define __pyx_kp_u_arr_div_ceil_mul_division_by_zer __pyx_string_tab[180]
#define __pyx_kp_u_arr_div_down_division_by_zero __pyx_string_tab[181]
#define __pyx_kp_u_arr_div_down_mul_division_by_zer __pyx_string_tab[182]
#define __pyx_kp_u_arr_div_even_division_by_zero __pyx_string_tab[183]
#define __pyx_kp_u_arr_div_even_mul_division_by_zer __pyx_string_tab[184]
#define __pyx_kp_u_arr_div_floor_division_by_zero __pyx_string_tab[185]
#define __pyx_kp_u_arr_div_floor_mul_division_by_ze __pyx_string_tab[186]
#define __pyx_kp_u_arr_div_trunc_division_by_zero __pyx_string_tab[187]
#define __pyx_kp_u_arr_div_trunc_mul_division_by_ze __pyx_string_tab[188]
#define __pyx_kp_u_arr_div_up_division_by_zero __pyx_string_tab[189]
#define __pyx_kp_u_arr_div_up_mul_division_by_zero __pyx_string_tab[190]
#define __pyx_kp_u_arr_mod_division_by_zero __pyx_string_tab[191]
#define __pyx_kp_u_at_position __pyx_string_tab[192]
#define __pyx_kp_u_bool_None __pyx_string_tab[193]
#define __pyx_kp_u_ceil_unit __pyx_string_tab[194]
#define __pyx_kp_u_combine_date __pyx_string_tab[195]
#define __pyx_kp_u_combine_time __pyx_string_tab[196]
#define __pyx_kp_u_cython_bint __pyx_string_tab[197]
#define __pyx_kp_u_cython_int __pyx_string_tab[198]
#define __pyx_kp_u_cython_longlong __pyx_string_tab[199]
#define __pyx_kp_u_datetime2 __pyx_string_tab[200]
#define __pyx_kp_u_datetime_date __pyx_string_tab[201]
#define __pyx_kp_u_datetime_date_str_None __pyx_string_tab[202]
#define __pyx_kp_u_datetime_datetime __pyx_string_tab[203]
#define __pyx_kp_u_datetime_time_str_None __pyx_string_tab[204]
#define __pyx_kp_u_datetime_tzinfo_str_None __pyx_string_tab[205]
#define __pyx_kp_u_diff_dtobj __pyx_string_tab[206]
#define __pyx_kp_u_diff_inclusive __pyx_string_tab[207]
#define __pyx_kp_u_diff_unit __pyx_string_tab[208]
#define __pyx_kp_u_disable __pyx_string_tab[209]
#define __pyx_kp_u_dt_isoformat_sep_cannot_be_None __pyx_string_tab[210]
#define __pyx_kp_u_dt_strformat_fmt_cannot_be_None __pyx_string_tab[211]
#define __pyx_kp_u_enable __pyx_string_tab[212]
#define __pyx_kp_u_floor_unit __pyx_string_tab[213]
#define __pyx_kp_u_fold_1 __pyx_string_tab[214]
#define __pyx_kp_u_fold_must_be_either_0_or_1_got_d __pyx_string_tab[215]
#define __pyx_kp_u_from __pyx_string_tab[216]
#define __pyx_kp_u_from_2 __pyx_string_tab[217]
#define __pyx_kp_u_fromdatetime64_dt64 __pyx_string_tab[218]
#define __pyx_kp_u_fromdayofyear_year_doy __pyx_string_tab[219]
#define __pyx_kp_u_fromisocalendar __pyx_string_tab[220]
#define __pyx_kp_u_fromisoformat_dtstr __pyx_string_tab[221]
#define __pyx_kp_u_frommicroseconds_us __pyx_string_tab[222]
#define __pyx_kp_u_fromordinal_ordinal __pyx_string_tab[223]
#define __pyx_kp_u_fromseconds_seconds __pyx_string_tab[224]
#define __pyx_kp_u_fromtimestamp_ts __pyx_string_tab[225]
#define __pyx_kp_u_fsp_precision __pyx_string_tab[226]
#define __pyx_kp_u_gc __pyx_string_tab[227]
#define __pyx_kp_u_h_2 __pyx_string_tab[228]
#define __pyx_kp_u_int_float __pyx_string_tab[229]
#define __pyx_kp_u_int_str __pyx_string_tab[230]
#define __pyx_kp_u_int_str_None __pyx_string_tab[231]
#define __pyx_kp_u_isenabled __pyx_string_tab[232]
#define __pyx_kp_u_isoformat_sep __pyx_string_tab[233]
#define __pyx_kp_u_m_2 __pyx_string_tab[234]
#define __pyx_kp_u_math_div_ceil_division_by_zero __pyx_string_tab[235]
#define __pyx_kp_u_math_div_ceil_result_does_not_fi __pyx_string_tab[236]
#define __pyx_kp_u_math_div_down_division_by_zero __pyx_string_tab[237]
#define __pyx_kp_u_math_div_down_result_does_not_fi __pyx_string_tab[238]
#define __pyx_kp_u_math_div_even_division_by_zero __pyx_string_tab[239]
#define __pyx_kp_u_math_div_even_result_does_not_fi __pyx_string_tab[240]
#define __pyx_kp_u_math_div_floor_division_by_zero __pyx_string_tab[241]
#define __pyx_kp_u_math_div_floor_result_does_not_f __pyx_string_tab[242]
#define __pyx_kp_u_math_div_trunc_division_by_zero __pyx_string_tab[243]
#define __pyx_kp_u_math_div_trunc_result_does_not_f __pyx_string_tab[244]
#define __pyx_kp_u_math_div_up_division_by_zero __pyx_string_tab[245]
#define __pyx_kp_u_math_div_up_result_does_not_fit __pyx_string_tab[246]
#define __pyx_kp_u_math_mod_division_by_zero __pyx_string_tab[247]
#define __pyx_kp_u_minimum_value_cannot_be_greater __pyx_string_tab[248]
#define __pyx_kp_u_minutes __pyx_string_tab[249]
#define __pyx_kp_u_missing_time_resolution_for_ndar __pyx_string_tab[250]
#define __pyx_kp_u_month_name_locale __pyx_string_tab[251]
#define __pyx_kp_u_ms_2 __pyx_string_tab[252]
#define __pyx_kp_u_ns_2 __pyx_string_tab[253]
#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[254]
#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[255]
#define __pyx_kp_u_object_None __pyx_string_tab[256]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b __pyx_string_tab[257]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b_2 __pyx_string_tab[258]
#define __pyx_kp_u_parse_default __pyx_string_tab[259]
#define __pyx_kp_u_parse_dtobj __pyx_string_tab[260]
#define __pyx_kp_u_parse_to_float_token_cannot_be_N __pyx_string_tab[261]
#define __pyx_kp_u_parse_to_int_token_cannot_be_Non __pyx_string_tab[262]
#define __pyx_kp_u_replace_2 __pyx_string_tab[263]
#define __pyx_kp_u_resolution_is_not_supported __pyx_string_tab[264]
#define __pyx_kp_u_round_ceil_floor_unit __pyx_string_tab[265]
#define __pyx_kp_u_round_unit __pyx_string_tab[266]
#define __pyx_kp_u_s_2 __pyx_string_tab[267]
#define __pyx_kp_u_seconds_2 __pyx_string_tab[268]
#define __pyx_kp_u_seconds_from __pyx_string_tab[269]
#define __pyx_kp_u_seconds_from_hours __pyx_string_tab[270]
#define __pyx_kp_u_size __pyx_string_tab[271]
#define __pyx_kp_u_slice_to_ufloat_out_of_range_sta __pyx_string_tab[272]
#define __pyx_kp_u_slice_to_ufloat_size_must_be_0_i __pyx_string_tab[273]
#define __pyx_kp_u_slice_to_ufloat_start_must_be_0 __pyx_string_tab[274]
#define __pyx_kp_u_slice_to_ufloat_token_cannot_be __pyx_string_tab[275]
#define __pyx_kp_u_slice_to_uint_out_of_range_start __pyx_string_tab[276]
#define __pyx_kp_u_slice_to_uint_size_must_be_0_ins __pyx_string_tab[277]
#define __pyx_kp_u_slice_to_uint_start_must_be_0_in __pyx_string_tab[278]
#define __pyx_kp_u_slice_to_uint_token_cannot_be_No __pyx_string_tab[279]
#define __pyx_kp_u_src_cytimes_pydt_py __pyx_string_tab[280]
#define __pyx_kp_u_src_cytimes_utils_pxd __pyx_string_tab[281]
#define __pyx_kp_u_str_tuple __pyx_string_tab[282]
#define __pyx_kp_u_strptime_dtstr_fmt __pyx_string_tab[283]
#define __pyx_kp_u_sub_2 __pyx_string_tab[284]
#define __pyx_kp_u_ticks_Supported_resolution_Y_M __pyx_string_tab[285]
#define __pyx_kp_u_ticks_Supported_units __pyx_string_tab[286]
#define __pyx_kp_u_ticks_Supported_units_Y_M_W_D_h __pyx_string_tab[287]
#define __pyx_kp_u_tm_strformat_expanded_output_exc __pyx_string_tab[288]
#define __pyx_kp_u_tm_strformat_failed_to_allocate __pyx_string_tab[289]
#define __pyx_kp_u_tm_strformat_fmt_cannot_be_None __pyx_string_tab[290]
#define __pyx_kp_u_to __pyx_string_tab[291]
#define __pyx_kp_u_to_curr_month_2 __pyx_string_tab[292]
#define __pyx_kp_u_to_curr_quarter_2 __pyx_string_tab[293]
#define __pyx_kp_u_to_curr_year_2 __pyx_string_tab[294]
#define __pyx_kp_u_to_date_2 __pyx_string_tab[295]
#define __pyx_kp_u_to_datetime64 __pyx_string_tab[296]
#define __pyx_kp_u_to_datetime_2 __pyx_string_tab[297]
#define __pyx_kp_u_to_day_2 __pyx_string_tab[298]
#define __pyx_kp_u_to_end_of_unit __pyx_string_tab[299]
#define __pyx_kp_u_to_first_of_unit __pyx_string_tab[300]
#define __pyx_kp_u_to_float_contains_invalid_chara __pyx_string_tab[301]
#define __pyx_kp_u_to_int64 __pyx_string_tab[302]
#define __pyx_kp_u_to_int64_2 __pyx_string_tab[303]
#define __pyx_kp_u_to_integer_Contains_invalid_cha __pyx_string_tab[304]
#define __pyx_kp_u_to_last_of_unit __pyx_string_tab[305]
#define __pyx_kp_u_to_month_2 __pyx_string_tab[306]
#define __pyx_kp_u_to_non_negative_float_contains __pyx_string_tab[307]
#define __pyx_kp_u_to_quarter_2 __pyx_string_tab[308]
#define __pyx_kp_u_to_start_of_unit __pyx_string_tab[309]
#define __pyx_kp_u_to_time_2 __pyx_string_tab[310]
#define __pyx_kp_u_to_unsigned_integer_Contains_in __pyx_string_tab[311]
#define __pyx_kp_u_to_year_2 __pyx_string_tab[312]
#define __pyx_kp_u_token_len __pyx_string_tab[313]
#define __pyx_kp_u_tz_convert_tz __pyx_string_tab[314]
#define __pyx_kp_u_tz_localize_tz __pyx_string_tab[315]
#define __pyx_kp_u_tz_switch_2 __pyx_string_tab[316]
#define __pyx_kp_u_tzinfo_r __pyx_string_tab[317]
#define __pyx_kp_u_unit_to_int64 __pyx_string_tab[318]
#define __pyx_kp_u_us_2 __pyx_string_tab[319]
#define __pyx_kp_u_utcfromtimestamp_ts __pyx_string_tab[320]
#define __pyx_kp_u_weekday_name_locale __pyx_string_tab[321]
#define __pyx_n_u_AmbiguousTimeError __pyx_string_tab[322]
#define __pyx_n_u_Apr __pyx_string_tab[323]
#define __pyx_n_u_Aug __pyx_string_tab[324]
#define __pyx_n_u_Configs __pyx_string_tab[325]
#define __pyx_n_u_D __pyx_string_tab[326]
#define __pyx_n_u_Dec __pyx_string_tab[327]
#define __pyx_n_u_EEEE __pyx_string_tab[328]
#define __pyx_n_u_Feb __pyx_string_tab[329]
#define __pyx_n_u_Fri __pyx_string_tab[330]
#define __pyx_n_u_Jan __pyx_string_tab[331]
#define __pyx_n_u_Jul __pyx_string_tab[332]
#define __pyx_n_u_Jun __pyx_string_tab[333]
#define __pyx_n_u_M __pyx_string_tab[334]
#define __pyx_n_u_MMMM __pyx_string_tab[335]
#define __pyx_n_u_Mar __pyx_string_tab[336]
#define __pyx_n_u_May __pyx_string_tab[337]
#define __pyx_n_u_MixedTimezoneError __pyx_string_tab[338]
#define __pyx_n_u_Mon __pyx_string_tab[339]
#define __pyx_n_u_NotImplemented __pyx_string_tab[340]
#define __pyx_n_u_Nov __pyx_string_tab[341]
#define __pyx_n_u_Oct __pyx_string_tab[342]
#define __pyx_n_u_Pydt __pyx_string_tab[343]
#define __pyx_n_u_Pydt_2 __pyx_string_tab[344]
#define __pyx_n_u_Pydt___copy __pyx_string_tab[345]
#define __pyx_n_u_Pydt___deepcopy __pyx_string_tab[346]
#define __pyx_n_u_Pydt___format __pyx_string_tab[347]
#define __pyx_n_u_Pydt___new __pyx_string_tab[348]
#define __pyx_n_u_Pydt___reduce __pyx_string_tab[349]
#define __pyx_n_u_Pydt___reduce_ex __pyx_string_tab[350]
#define __pyx_n_u_Pydt__new __pyx_string_tab[351]
#define __pyx_n_u_Pydt_access_day __pyx_string_tab[352]
#define __pyx_n_u_Pydt_access_fold __pyx_string_tab[353]
#define __pyx_n_u_Pydt_access_hour __pyx_string_tab[354]
#define __pyx_n_u_Pydt_access_microsecond __pyx_string_tab[355]
#define __pyx_n_u_Pydt_access_millisecond __pyx_string_tab[356]
#define __pyx_n_u_Pydt_access_minute __pyx_string_tab[357]
#define __pyx_n_u_Pydt_access_month __pyx_string_tab[358]
#define __pyx_n_u_Pydt_access_quarter __pyx_string_tab[359]
#define __pyx_n_u_Pydt_access_second __pyx_string_tab[360]
#define __pyx_n_u_Pydt_access_tzinfo __pyx_string_tab[361]
#define __pyx_n_u_Pydt_access_weekday __pyx_string_tab[362]
#define __pyx_n_u_Pydt_access_year __pyx_string_tab[363]
#define __pyx_n_u_Pydt_add __pyx_string_tab[364]
#define __pyx_n_u_Pydt_astimezone __pyx_string_tab[365]
#define __pyx_n_u_Pydt_ceil __pyx_string_tab[366]
#define __pyx_n_u_Pydt_combine __pyx_string_tab[367]
#define __pyx_n_u_Pydt_ctime __pyx_string_tab[368]
#define __pyx_n_u_Pydt_date __pyx_string_tab[369]
#define __pyx_n_u_Pydt_day_of_month __pyx_string_tab[370]
#define __pyx_n_u_Pydt_day_of_quarter __pyx_string_tab[371]
#define __pyx_n_u_Pydt_day_of_year __pyx_string_tab[372]
#define __pyx_n_u_Pydt_days_bf_month __pyx_string_tab[373]
#define __pyx_n_u_Pydt_days_bf_quarter __pyx_string_tab[374]
#define __pyx_n_u_Pydt_days_bf_year __pyx_string_tab[375]
#define __pyx_n_u_Pydt_days_in_month __pyx_string_tab[376]
#define __pyx_n_u_Pydt_days_in_quarter __pyx_string_tab[377]
#define __pyx_n_u_Pydt_days_in_year __pyx_string_tab[378]
#define __pyx_n_u_Pydt_diff __pyx_string_tab[379]
#define __pyx_n_u_Pydt_dst __pyx_string_tab[380]
#define __pyx_n_u_Pydt_floor __pyx_string_tab[381]
#define __pyx_n_u_Pydt_fromdate __pyx_string_tab[382]
#define __pyx_n_u_Pydt_fromdatetime __pyx_string_tab[383]
#define __pyx_n_u_Pydt_fromdatetime64 __pyx_string_tab[384]
#define __pyx_n_u_Pydt_fromdayofyear __pyx_string_tab[385]
#define __pyx_n_u_Pydt_fromisocalendar __pyx_string_tab[386]
#define __pyx_n_u_Pydt_fromisoformat __pyx_string_tab[387]
#define __pyx_n_u_Pydt_frommicroseconds __pyx_string_tab[388]
#define __pyx_n_u_Pydt_fromordinal __pyx_string_tab[389]
#define __pyx_n_u_Pydt_fromseconds __pyx_string_tab[390]
#define __pyx_n_u_Pydt_fromtimestamp __pyx_string_tab[391]
#define __pyx_n_u_Pydt_fsp __pyx_string_tab[392]
#define __pyx_n_u_Pydt_is_day __pyx_string_tab[393]
#define __pyx_n_u_Pydt_is_dst __pyx_string_tab[394]
#define __pyx_n_u_Pydt_is_end_of __pyx_string_tab[395]
#define __pyx_n_u_Pydt_is_first_of __pyx_string_tab[396]
#define __pyx_n_u_Pydt_is_future __pyx_string_tab[397]
#define __pyx_n_u_Pydt_is_last_of __pyx_string_tab[398]
#define __pyx_n_u_Pydt_is_leap_year __pyx_string_tab[399]
#define __pyx_n_u_Pydt_is_local __pyx_string_tab[400]
#define __pyx_n_u_Pydt_is_long_year __pyx_string_tab[401]
#define __pyx_n_u_Pydt_is_month __pyx_string_tab[402]
#define __pyx_n_u_Pydt_is_past __pyx_string_tab[403]
#define __pyx_n_u_Pydt_is_quarter __pyx_string_tab[404]
#define __pyx_n_u_Pydt_is_start_of __pyx_string_tab[405]
#define __pyx_n_u_Pydt_is_utc __pyx_string_tab[406]
#define __pyx_n_u_Pydt_is_weekday __pyx_string_tab[407]
#define __pyx_n_u_Pydt_is_year __pyx_string_tab[408]
#define __pyx_n_u_Pydt_isocalendar __pyx_string_tab[409]
#define __pyx_n_u_Pydt_isoformat __pyx_string_tab[410]
#define __pyx_n_u_Pydt_isoweek __pyx_string_tab[411]
#define __pyx_n_u_Pydt_isoweekday __pyx_string_tab[412]
#define __pyx_n_u_Pydt_isoyear __pyx_string_tab[413]
#define __pyx_n_u_Pydt_leap_bt_year __pyx_string_tab[414]
#define __pyx_n_u_Pydt_month_name __pyx_string_tab[415]
#define __pyx_n_u_Pydt_normalize __pyx_string_tab[416]
#define __pyx_n_u_Pydt_now __pyx_string_tab[417]
#define __pyx_n_u_Pydt_parse __pyx_string_tab[418]
#define __pyx_n_u_Pydt_replace __pyx_string_tab[419]
#define __pyx_n_u_Pydt_round __pyx_string_tab[420]
#define __pyx_n_u_Pydt_strftime __pyx_string_tab[421]
#define __pyx_n_u_Pydt_strptime __pyx_string_tab[422]
#define __pyx_n_u_Pydt_sub __pyx_string_tab[423]
#define __pyx_n_u_Pydt_time __pyx_string_tab[424]
#define __pyx_n_u_Pydt_timedict __pyx_string_tab[425]
#define __pyx_n_u_Pydt_timestamp __pyx_string_tab[426]
#define __pyx_n_u_Pydt_timetuple __pyx_string_tab[427]
#define __pyx_n_u_Pydt_timetz __pyx_string_tab[428]
#define __pyx_n_u_Pydt_to_curr_month __pyx_string_tab[429]
#define __pyx_n_u_Pydt_to_curr_quarter __pyx_string_tab[430]
#define __pyx_n_u_Pydt_to_curr_weekday __pyx_string_tab[431]
#define __pyx_n_u_Pydt_to_curr_year __pyx_string_tab[432]
#define __pyx_n_u_Pydt_to_date __pyx_string_tab[433]
#define __pyx_n_u_Pydt_to_datetime __pyx_string_tab[434]
#define __pyx_n_u_Pydt_to_day __pyx_string_tab[435]
#define __pyx_n_u_Pydt_to_end_of __pyx_string_tab[436]
#define __pyx_n_u_Pydt_to_first_of __pyx_string_tab[437]
#define __pyx_n_u_Pydt_to_friday __pyx_string_tab[438]
#define __pyx_n_u_Pydt_to_last_of __pyx_string_tab[439]
#define __pyx_n_u_Pydt_to_monday __pyx_string_tab[440]
#define __pyx_n_u_Pydt_to_month __pyx_string_tab[441]
#define __pyx_n_u_Pydt_to_next_month __pyx_string_tab[442]
#define __pyx_n_u_Pydt_to_next_quarter __pyx_string_tab[443]
#define __pyx_n_u_Pydt_to_next_weekday __pyx_string_tab[444]
#define __pyx_n_u_Pydt_to_next_year __pyx_string_tab[445]
#define __pyx_n_u_Pydt_to_prev_month __pyx_string_tab[446]
#define __pyx_n_u_Pydt_to_prev_quarter __pyx_string_tab[447]
#define __pyx_n_u_Pydt_to_prev_weekday __pyx_string_tab[448]
#define __pyx_n_u_Pydt_to_prev_year __pyx_string_tab[449]
#define __pyx_n_u_Pydt_to_quarter __pyx_string_tab[450]
#define __pyx_n_u_Pydt_to_saturday __pyx_string_tab[451]
#define __pyx_n_u_Pydt_to_start_of __pyx_string_tab[452]
#define __pyx_n_u_Pydt_to_sunday __pyx_string_tab[453]
#define __pyx_n_u_Pydt_to_thursday __pyx_string_tab[454]
#define __pyx_n_u_Pydt_to_time __pyx_string_tab[455]
#define __pyx_n_u_Pydt_to_tomorrow __pyx_string_tab[456]
#define __pyx_n_u_Pydt_to_tuesday __pyx_string_tab[457]
#define __pyx_n_u_Pydt_to_wednesday __pyx_string_tab[458]
#define __pyx_n_u_Pydt_to_weekday __pyx_string_tab[459]
#define __pyx_n_u_Pydt_to_year __pyx_string_tab[460]
#define __pyx_n_u_Pydt_to_yesterday __pyx_string_tab[461]
#define __pyx_n_u_Pydt_today __pyx_string_tab[462]
#define __pyx_n_u_Pydt_tomicroseconds __pyx_string_tab[463]
#define __pyx_n_u_Pydt_toordinal __pyx_string_tab[464]
#define __pyx_n_u_Pydt_toseconds __pyx_string_tab[465]
#define __pyx_n_u_Pydt_tz_convert __pyx_string_tab[466]
#define __pyx_n_u_Pydt_tz_localize __pyx_string_tab[467]
#define __pyx_n_u_Pydt_tz_switch __pyx_string_tab[468]
#define __pyx_n_u_Pydt_tzname __pyx_string_tab[469]
#define __pyx_n_u_Pydt_utcfromtimestamp __pyx_string_tab[470]
#define __pyx_n_u_Pydt_utcnow __pyx_string_tab[471]
#define __pyx_n_u_Pydt_utcoffset __pyx_string_tab[472]
#define __pyx_n_u_Pydt_utcoffset_seconds __pyx_string_tab[473]
#define __pyx_n_u_Pydt_utctimedict __pyx_string_tab[474]
#define __pyx_n_u_Pydt_utctimetuple __pyx_string_tab[475]
#define __pyx_n_u_Pydt_weekday_name __pyx_string_tab[476]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[477]
#define __pyx_n_u_Sat __pyx_string_tab[478]
#define __pyx_n_u_Self __pyx_string_tab[479]
#define __pyx_n_u_Sep __pyx_string_tab[480]
#define __pyx_n_u_Sun __pyx_string_tab[481]
#define __pyx_n_u_T __pyx_string_tab[482]
#define __pyx_n_u_Thu __pyx_string_tab[483]
#define __pyx_n_u_Tue __pyx_string_tab[484]
#define __pyx_n_u_W __pyx_string_tab[485]
#define __pyx_n_u_Wed __pyx_string_tab[486]
#define __pyx_n_u_Y __pyx_string_tab[487]
#define __pyx_n_u__14 __pyx_string_tab[488]
#define __pyx_n_u_absolute __pyx_string_tab[489]
#define __pyx_n_u_access_day __pyx_string_tab[490]
#define __pyx_n_u_access_fold __pyx_string_tab[491]
#define __pyx_n_u_access_hour __pyx_string_tab[492]
#define __pyx_n_u_access_microsecond __pyx_string_tab[493]
#define __pyx_n_u_access_millisecond __pyx_string_tab[494]
#define __pyx_n_u_access_minute __pyx_string_tab[495]
#define __pyx_n_u_access_month __pyx_string_tab[496]
#define __pyx_n_u_access_quarter __pyx_string_tab[497]
#define __pyx_n_u_access_second __pyx_string_tab[498]
#define __pyx_n_u_access_tzinfo __pyx_string_tab[499]
#define __pyx_n_u_access_weekday __pyx_string_tab[500]
#define __pyx_n_u_access_year __pyx_string_tab[501]
#define __pyx_n_u_add __pyx_string_tab[502]
#define __pyx_n_u_all __pyx_string_tab[503]
#define __pyx_n_u_as __pyx_string_tab[504]
#define __pyx_n_u_astimezone __pyx_string_tab[505]
#define __pyx_n_u_astype __pyx_string_tab[506]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[507]
#define __pyx_n_u_available_timezones __pyx_string_tab[508]
#define __pyx_n_u_available_timezones_2 __pyx_string_tab[509]
#define __pyx_n_u_babel_dates __pyx_string_tab[510]
#define __pyx_n_u_base_tz __pyx_string_tab[511]
#define __pyx_n_u_both __pyx_string_tab[512]
#define __pyx_n_u_ceil __pyx_string_tab[513]
#define __pyx_n_u_cfg __pyx_string_tab[514]
#define __pyx_n_u_class __pyx_string_tab[515]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[516]
#define __pyx_n_u_cls __pyx_string_tab[517]
#define __pyx_n_u_combine __pyx_string_tab[518]
#define __pyx_n_u_copy __pyx_string_tab[519]
#define __pyx_n_u_ctime __pyx_string_tab[520]
#define __pyx_n_u_cytimes __pyx_string_tab[521]
#define __pyx_n_u_cytimes_parser __pyx_string_tab[522]
#define __pyx_n_u_cytimes_pydt __pyx_string_tab[523]
#define __pyx_n_u_cytimes_utils __pyx_string_tab[524]
#define __pyx_n_u_d __pyx_string_tab[525]
#define __pyx_n_u_date __pyx_string_tab[526]
#define __pyx_n_u_datetime __pyx_string_tab[527]
#define __pyx_n_u_day __pyx_string_tab[528]
#define __pyx_n_u_day_of_month __pyx_string_tab[529]
#define __pyx_n_u_day_of_quarter __pyx_string_tab[530]
#define __pyx_n_u_day_of_year __pyx_string_tab[531]
#define __pyx_n_u_dayfirst __pyx_string_tab[532]
#define __pyx_n_u_days __pyx_string_tab[533]
#define __pyx_n_u_days_bf_month __pyx_string_tab[534]
#define __pyx_n_u_days_bf_quarter __pyx_string_tab[535]
#define __pyx_n_u_days_bf_year __pyx_string_tab[536]
#define __pyx_n_u_days_in_month __pyx_string_tab[537]
#define __pyx_n_u_days_in_quarter __pyx_string_tab[538]
#define __pyx_n_u_days_in_year __pyx_string_tab[539]
#define __pyx_n_u_deepcopy __pyx_string_tab[540]
#define __pyx_n_u_default __pyx_string_tab[541]
#define __pyx_n_u_dict __pyx_string_tab[542]
#define __pyx_n_u_dict_2 __pyx_string_tab[543]
#define __pyx_n_u_diff __pyx_string_tab[544]
#define __pyx_n_u_doc __pyx_string_tab[545]
#define __pyx_n_u_doy __pyx_string_tab[546]
#define __pyx_n_u_dst __pyx_string_tab[547]
#define __pyx_n_u_dt __pyx_string_tab[548]
#define __pyx_n_u_dt64 __pyx_string_tab[549]
#define __pyx_n_u_dt_norm __pyx_string_tab[550]
#define __pyx_n_u_dtobj __pyx_string_tab[551]
#define __pyx_n_u_dtstr __pyx_string_tab[552]
#define __pyx_n_u_dtype __pyx_string_tab[553]
#define __pyx_n_u_en_US __pyx_string_tab[554]
#define __pyx_n_u_err __pyx_string_tab[555]
#define __pyx_n_u_errors __pyx_string_tab[556]
#define __pyx_n_u_floor __pyx_string_tab[557]
#define __pyx_n_u_fmt __pyx_string_tab[558]
#define __pyx_n_u_fold __pyx_string_tab[559]
#define __pyx_n_u_format __pyx_string_tab[560]
#define __pyx_n_u_format_2 __pyx_string_tab[561]
#define __pyx_n_u_format_date __pyx_string_tab[562]
#define __pyx_n_u_format_date_2 __pyx_string_tab[563]
#define __pyx_n_u_fromdate __pyx_string_tab[564]
#define __pyx_n_u_fromdatetime __pyx_string_tab[565]
#define __pyx_n_u_fromdatetime64 __pyx_string_tab[566]
#define __pyx_n_u_fromdayofyear __pyx_string_tab[567]
#define __pyx_n_u_fromisocalendar_2 __pyx_string_tab[568]
#define __pyx_n_u_fromisoformat __pyx_string_tab[569]
#define __pyx_n_u_frommicroseconds __pyx_string_tab[570]
#define __pyx_n_u_fromordinal __pyx_string_tab[571]
#define __pyx_n_u_fromseconds __pyx_string_tab[572]
#define __pyx_n_u_fromtimestamp __pyx_string_tab[573]
#define __pyx_n_u_fromutc __pyx_string_tab[574]
#define __pyx_n_u_fs __pyx_string_tab[575]
#define __pyx_n_u_fsp __pyx_string_tab[576]
#define __pyx_n_u_func __pyx_string_tab[577]
#define __pyx_n_u_h __pyx_string_tab[578]
#define __pyx_n_u_hash __pyx_string_tab[579]
#define __pyx_n_u_hour __pyx_string_tab[580]
#define __pyx_n_u_hours __pyx_string_tab[581]
#define __pyx_n_u_ignoretz __pyx_string_tab[582]
#define __pyx_n_u_inclusive __pyx_string_tab[583]
#define __pyx_n_u_int __pyx_string_tab[584]
#define __pyx_n_u_is_coroutine __pyx_string_tab[585]
#define __pyx_n_u_is_day __pyx_string_tab[586]
#define __pyx_n_u_is_dst __pyx_string_tab[587]
#define __pyx_n_u_is_end_of __pyx_string_tab[588]
#define __pyx_n_u_is_first_of __pyx_string_tab[589]
#define __pyx_n_u_is_future __pyx_string_tab[590]
#define __pyx_n_u_is_last_of __pyx_string_tab[591]
#define __pyx_n_u_is_leap_year __pyx_string_tab[592]
#define __pyx_n_u_is_local __pyx_string_tab[593]
#define __pyx_n_u_is_long_year __pyx_string_tab[594]
#define __pyx_n_u_is_month __pyx_string_tab[595]
#define __pyx_n_u_is_past __pyx_string_tab[596]
#define __pyx_n_u_is_quarter __pyx_string_tab[597]
#define __pyx_n_u_is_start_of __pyx_string_tab[598]
#define __pyx_n_u_is_utc __pyx_string_tab[599]
#define __pyx_n_u_is_weekday __pyx_string_tab[600]
#define __pyx_n_u_is_year __pyx_string_tab[601]
#define __pyx_n_u_isocalendar __pyx_string_tab[602]
#define __pyx_n_u_isoformat __pyx_string_tab[603]
#define __pyx_n_u_isoweek __pyx_string_tab[604]
#define __pyx_n_u_isoweekday __pyx_string_tab[605]
#define __pyx_n_u_isoyear __pyx_string_tab[606]
#define __pyx_n_u_items __pyx_string_tab[607]
#define __pyx_n_u_leap_bt_year __pyx_string_tab[608]
#define __pyx_n_u_locale __pyx_string_tab[609]
#define __pyx_n_u_m __pyx_string_tab[610]
#define __pyx_n_u_main __pyx_string_tab[611]
#define __pyx_n_u_metaclass __pyx_string_tab[612]
#define __pyx_n_u_microsecond __pyx_string_tab[613]
#define __pyx_n_u_microseconds __pyx_string_tab[614]
#define __pyx_n_u_milliseconds __pyx_string_tab[615]
#define __pyx_n_u_min __pyx_string_tab[616]
#define __pyx_n_u_minute __pyx_string_tab[617]
#define __pyx_n_u_minutes_2 __pyx_string_tab[618]
#define __pyx_n_u_module __pyx_string_tab[619]
#define __pyx_n_u_month __pyx_string_tab[620]
#define __pyx_n_u_month_name __pyx_string_tab[621]
#define __pyx_n_u_months __pyx_string_tab[622]
#define __pyx_n_u_mro_entries __pyx_string_tab[623]
#define __pyx_n_u_ms __pyx_string_tab[624]
#define __pyx_n_u_naive __pyx_string_tab[625]
#define __pyx_n_u_name __pyx_string_tab[626]
#define __pyx_n_u_neither __pyx_string_tab[627]
#define __pyx_n_u_new __pyx_string_tab[628]
#define __pyx_n_u_new_2 __pyx_string_tab[629]
#define __pyx_n_u_normalize __pyx_string_tab[630]
#define __pyx_n_u_now __pyx_string_tab[631]
#define __pyx_n_u_np __pyx_string_tab[632]
#define __pyx_n_u_ns __pyx_string_tab[633]
#define __pyx_n_u_numpy __pyx_string_tab[634]
#define __pyx_n_u_object __pyx_string_tab[635]
#define __pyx_n_u_offset __pyx_string_tab[636]
#define __pyx_n_u_one __pyx_string_tab[637]
#define __pyx_n_u_ordinal __pyx_string_tab[638]
#define __pyx_n_u_parse __pyx_string_tab[639]
#define __pyx_n_u_parse_month __pyx_string_tab[640]
#define __pyx_n_u_parse_obj __pyx_string_tab[641]
#define __pyx_n_u_parse_to_float __pyx_string_tab[642]
#define __pyx_n_u_parse_to_int __pyx_string_tab[643]
#define __pyx_n_u_parse_weekday __pyx_string_tab[644]
#define __pyx_n_u_pop __pyx_string_tab[645]
#define __pyx_n_u_precision __pyx_string_tab[646]
#define __pyx_n_u_prepare __pyx_string_tab[647]
#define __pyx_n_u_protocol __pyx_string_tab[648]
#define __pyx_n_u_ps __pyx_string_tab[649]
#define __pyx_n_u_pt __pyx_string_tab[650]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[651]
#define __pyx_n_u_qualname __pyx_string_tab[652]
#define __pyx_n_u_quarter __pyx_string_tab[653]
#define __pyx_n_u_quarters __pyx_string_tab[654]
#define __pyx_n_u_reduce __pyx_string_tab[655]
#define __pyx_n_u_reduce_ex __pyx_string_tab[656]
#define __pyx_n_u_replace __pyx_string_tab[657]
#define __pyx_n_u_return __pyx_string_tab[658]
#define __pyx_n_u_round __pyx_string_tab[659]
#define __pyx_n_u_s __pyx_string_tab[660]
#define __pyx_n_u_second __pyx_string_tab[661]
#define __pyx_n_u_seconds __pyx_string_tab[662]
#define __pyx_n_u_self __pyx_string_tab[663]
#define __pyx_n_u_sep __pyx_string_tab[664]
#define __pyx_n_u_set_name __pyx_string_tab[665]
#define __pyx_n_u_setdefault __pyx_string_tab[666]
#define __pyx_n_u_str __pyx_string_tab[667]
#define __pyx_n_u_strftime __pyx_string_tab[668]
#define __pyx_n_u_strptime __pyx_string_tab[669]
#define __pyx_n_u_struct_time __pyx_string_tab[670]
#define __pyx_n_u_sub __pyx_string_tab[671]
#define __pyx_n_u_targ_tz __pyx_string_tab[672]
#define __pyx_n_u_test __pyx_string_tab[673]
#define __pyx_n_u_time __pyx_string_tab[674]
#define __pyx_n_u_timedict __pyx_string_tab[675]
#define __pyx_n_u_timestamp __pyx_string_tab[676]
#define __pyx_n_u_timetuple __pyx_string_tab[677]
#define __pyx_n_u_timetz __pyx_string_tab[678]
#define __pyx_n_u_tm_hour __pyx_string_tab[679]
#define __pyx_n_u_tm_isdst __pyx_string_tab[680]
#define __pyx_n_u_tm_mday __pyx_string_tab[681]
#define __pyx_n_u_tm_min __pyx_string_tab[682]
#define __pyx_n_u_tm_mon __pyx_string_tab[683]
#define __pyx_n_u_tm_sec __pyx_string_tab[684]
#define __pyx_n_u_tm_wday __pyx_string_tab[685]
#define __pyx_n_u_tm_yday __pyx_string_tab[686]
#define __pyx_n_u_tm_year __pyx_string_tab[687]
#define __pyx_n_u_to_curr_month __pyx_string_tab[688]
#define __pyx_n_u_to_curr_quarter __pyx_string_tab[689]
#define __pyx_n_u_to_curr_weekday __pyx_string_tab[690]
#define __pyx_n_u_to_curr_year __pyx_string_tab[691]
#define __pyx_n_u_to_date __pyx_string_tab[692]
#define __pyx_n_u_to_datetime __pyx_string_tab[693]
#define __pyx_n_u_to_day __pyx_string_tab[694]
#define __pyx_n_u_to_end_of __pyx_string_tab[695]
#define __pyx_n_u_to_first_of __pyx_string_tab[696]
#define __pyx_n_u_to_friday __pyx_string_tab[697]
#define __pyx_n_u_to_last_of __pyx_string_tab[698]
#define __pyx_n_u_to_monday __pyx_string_tab[699]
#define __pyx_n_u_to_month __pyx_string_tab[700]
#define __pyx_n_u_to_next_month __pyx_string_tab[701]
#define __pyx_n_u_to_next_quarter __pyx_string_tab[702]
#define __pyx_n_u_to_next_weekday __pyx_string_tab[703]
#define __pyx_n_u_to_next_year __pyx_string_tab[704]
#define __pyx_n_u_to_prev_month __pyx_string_tab[705]
#define __pyx_n_u_to_prev_quarter __pyx_string_tab[706]
#define __pyx_n_u_to_prev_weekday __pyx_string_tab[707]
#define __pyx_n_u_to_prev_year __pyx_string_tab[708]
#define __pyx_n_u_to_quarter __pyx_string_tab[709]
#define __pyx_n_u_to_saturday __pyx_string_tab[710]
#define __pyx_n_u_to_start_of __pyx_string_tab[711]
#define __pyx_n_u_to_sunday __pyx_string_tab[712]
#define __pyx_n_u_to_thursday __pyx_string_tab[713]
#define __pyx_n_u_to_time __pyx_string_tab[714]
#define __pyx_n_u_to_tomorrow __pyx_string_tab[715]
#define __pyx_n_u_to_tuesday __pyx_string_tab[716]
#define __pyx_n_u_to_wednesday __pyx_string_tab[717]
#define __pyx_n_u_to_weekday __pyx_string_tab[718]
#define __pyx_n_u_to_year __pyx_string_tab[719]
#define __pyx_n_u_to_yesterday __pyx_string_tab[720]
#define __pyx_n_u_today __pyx_string_tab[721]
#define __pyx_n_u_token __pyx_string_tab[722]
#define __pyx_n_u_tomicroseconds __pyx_string_tab[723]
#define __pyx_n_u_toordinal __pyx_string_tab[724]
#define __pyx_n_u_toseconds __pyx_string_tab[725]
#define __pyx_n_u_ts __pyx_string_tab[726]
#define __pyx_n_u_typing_extensions __pyx_string_tab[727]
#define __pyx_n_u_tz __pyx_string_tab[728]
#define __pyx_n_u_tz_convert __pyx_string_tab[729]
#define __pyx_n_u_tz_localize __pyx_string_tab[730]
#define __pyx_n_u_tz_switch __pyx_string_tab[731]
#define __pyx_n_u_tzinfo __pyx_string_tab[732]
#define __pyx_n_u_tzname __pyx_string_tab[733]
#define __pyx_n_u_unit __pyx_string_tab[734]
#define __pyx_n_u_us __pyx_string_tab[735]
#define __pyx_n_u_utc __pyx_string_tab[736]
#define __pyx_n_u_utcfromtimestamp __pyx_string_tab[737]
#define __pyx_n_u_utcnow __pyx_string_tab[738]
#define __pyx_n_u_utcoffset __pyx_string_tab[739]
#define __pyx_n_u_utcoffset_seconds __pyx_string_tab[740]
#define __pyx_n_u_utctimedict __pyx_string_tab[741]
#define __pyx_n_u_utctimetuple __pyx_string_tab[742]
#define __pyx_n_u_utils __pyx_string_tab[743]
#define __pyx_n_u_values __pyx_string_tab[744]
#define __pyx_n_u_week __pyx_string_tab[745]
#define __pyx_n_u_weekday __pyx_string_tab[746]
#define __pyx_n_u_weekday_name __pyx_string_tab[747]
#define __pyx_n_u_weeks __pyx_string_tab[748]
#define __pyx_n_u_year __pyx_string_tab[749]
#define __pyx_n_u_yearfirst __pyx_string_tab[750]
#define __pyx_n_u_years __pyx_string_tab[751]
#define __pyx_n_u_zoneinfo __pyx_string_tab[752]
#define __pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime __pyx_string_tab[753]
#define __pyx_kp_b_PyDateTime_DateTime_PyObject_int __pyx_string_tab[754]
#define __pyx_kp_b_PyObject_PyObject_tz_parse __pyx_string_tab[755]
#define __pyx_kp_b_PyObject_struct___pyx_obj_7cytim __pyx_string_tab[756]
#define __pyx_kp_b_int_PyObject_int___pyx_skip_disp __pyx_string_tab[757]
#define __pyx_kp_b_iso88591_1_vS_j_q_z_A_q_q_1_U_1_XQgQ_b_3 __pyx_string_tab[758]
#define __pyx_kp_b_iso88591_A_0_5_1_1_gQa_9Cq_6_t3a_t_c_A_t3 __pyx_string_tab[759]
#define __pyx_kp_b_iso88591_A_0_IQfA __pyx_string_tab[760]
#define __pyx_kp_b_iso88591_A_0_Q_Yaq_N_6_vS_N_6_t5_s_1_avV4 __pyx_string_tab[761]
#define __pyx_kp_b_iso88591_A_0_a_7_Q_4_Qa_Ba_S_3b_3a_s_Cr_R __pyx_string_tab[762]
#define __pyx_kp_b_iso88591_A_1A_N_6_s_1_Q_9_1_avV4uA_3c_1_N __pyx_string_tab[763]
#define __pyx_kp_b_iso88591_A_1_1A_1F_a_A_q_J_PQ __pyx_string_tab[764]
#define __pyx_kp_b_iso88591_A_1_1A_3gQ_q_82V2WBa_2_4s_IQd __pyx_string_tab[765]
#define __pyx_kp_b_iso88591_A_1_1A_5_4q_A_q_J_PQ __pyx_string_tab[766]
#define __pyx_kp_b_iso88591_A_1_1A_6_d_A_q_I_q __pyx_string_tab[767]
#define __pyx_kp_b_iso88591_A_1_1A_6_y_A_A_q_EV1 __pyx_string_tab[768]
#define __pyx_kp_b_iso88591_A_1_1A_9D_A_q_J_PQ __pyx_string_tab[769]
#define __pyx_kp_b_iso88591_A_1_1A_Kq_d __pyx_string_tab[770]
#define __pyx_kp_b_iso88591_A_1_1A_d_A_q_J_PQ __pyx_string_tab[771]
#define __pyx_kp_b_iso88591_A_1_1A_q_T_A_q_GvQ __pyx_string_tab[772]
#define __pyx_kp_b_iso88591_A_1_1_1_2_1A_5_uD_z_fG6_vQ_1E1Gv __pyx_string_tab[773]
#define __pyx_kp_b_iso88591_A_1_4s_q_E_M_Q __pyx_string_tab[774]
#define __pyx_kp_b_iso88591_A_1_7_Q_4_AWA_Ba_QgV1_3d_d_G1_3b __pyx_string_tab[775]
#define __pyx_kp_b_iso88591_A_1_A_1_Q_Q_q_1_iq_7_d_ax_1_M_gU __pyx_string_tab[776]
#define __pyx_kp_b_iso88591_A_1_JavQ __pyx_string_tab[777]
#define __pyx_kp_b_iso88591_A_1_QgV1_3d_Cs_T_a_4_Qa_d_G1_3b __pyx_string_tab[778]
#define __pyx_kp_b_iso88591_A_1_t81Cwa __pyx_string_tab[779]
#define __pyx_kp_b_iso88591_A_1_t82S_q __pyx_string_tab[780]
#define __pyx_kp_b_iso88591_A_2_q_A_q_EV1 __pyx_string_tab[781]
#define __pyx_kp_b_iso88591_A_4IQ_1A_G1D __pyx_string_tab[782]
#define __pyx_kp_b_iso88591_A_4_S_1_q_E_1_1A_3c_a_1KvWF_e1_N __pyx_string_tab[783]
#define __pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_S_t3a_AQ __pyx_string_tab[784]
#define __pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_S_t3a_O1 __pyx_string_tab[785]
#define __pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_c_A_t3a __pyx_string_tab[786]
#define __pyx_kp_b_iso88591_A_5_1_q_A_q_E_Q_2S_1_y_q_Qhc_1_7 __pyx_string_tab[787]
#define __pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t82T_S_t __pyx_string_tab[788]
#define __pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t82T_S_t_2 __pyx_string_tab[789]
#define __pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t_AQ_t3a __pyx_string_tab[790]
#define __pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t_AQ_t3a_2 __pyx_string_tab[791]
#define __pyx_kp_b_iso88591_A_66I_7_Q_4_7_A_4t1_D_oQ_t7_1 __pyx_string_tab[792]
#define __pyx_kp_b_iso88591_A_7_Q_1_q_hc_D_Q_A_q_E__F __pyx_string_tab[793]
#define __pyx_kp_b_iso88591_A_7_Q_Q_q_gXWA_A_q_E_5K6QR __pyx_string_tab[794]
#define __pyx_kp_b_iso88591_A_9AV1_1_1_1_1_1_1_1_1_1 __pyx_string_tab[795]
#define __pyx_kp_b_iso88591_A_9AV1_s_c_s_s_c_c_s_s_1 __pyx_string_tab[796]
#define __pyx_kp_b_iso88591_A_AQ __pyx_string_tab[797]
#define __pyx_kp_b_iso88591_A_AQ_2 __pyx_string_tab[798]
#define __pyx_kp_b_iso88591_A_AT_T __pyx_string_tab[799]
#define __pyx_kp_b_iso88591_A_AT_T_2 __pyx_string_tab[800]
#define __pyx_kp_b_iso88591_A_A_1A_N_6_T_a __pyx_string_tab[801]
#define __pyx_kp_b_iso88591_A_A_7_Q_Q_q_gXWA_A_q_E_5MVST __pyx_string_tab[802]
#define __pyx_kp_b_iso88591_A_A_D_M_T_A_G84wk_Q __pyx_string_tab[803]
#define __pyx_kp_b_iso88591_A_A_Q_1_1_fG6_T_T_S_E_A_q_E_5EV1 __pyx_string_tab[804]
#define __pyx_kp_b_iso88591_A_A_Q_1_A_a_a_1_0_A8_4z_1A_1A_gU __pyx_string_tab[805]
#define __pyx_kp_b_iso88591_A_A_Q_1_A_a_a_1_1A_gU_d_T_a_A_q __pyx_string_tab[806]
#define __pyx_kp_b_iso88591_A_A_a_a_1_1_t4s_d_TQVVW_A_q_E_5E __pyx_string_tab[807]
#define __pyx_kp_b_iso88591_A_A_q_EV1_IQd __pyx_string_tab[808]
#define __pyx_kp_b_iso88591_A_A_q_Q_A_1_A_a_a_1_1_Qa_1HAWAQ __pyx_string_tab[809]
#define __pyx_kp_b_iso88591_A_A_q_Q_A_1_A_a_a_1_1_Qa_z_y_q_T __pyx_string_tab[810]
#define __pyx_kp_b_iso88591_A_G1A __pyx_string_tab[811]
#define __pyx_kp_b_iso88591_A_G1F __pyx_string_tab[812]
#define __pyx_kp_b_iso88591_A_G6_q __pyx_string_tab[813]
#define __pyx_kp_b_iso88591_A_IQa __pyx_string_tab[814]
#define __pyx_kp_b_iso88591_A_Ja_vV7_vQ_A_q_E_5I_q_1_N_gQ_gQ __pyx_string_tab[815]
#define __pyx_kp_b_iso88591_A_Jaq __pyx_string_tab[816]
#define __pyx_kp_b_iso88591_A_JavQ __pyx_string_tab[817]
#define __pyx_kp_b_iso88591_A_Kq_a __pyx_string_tab[818]
#define __pyx_kp_b_iso88591_A_L __pyx_string_tab[819]
#define __pyx_kp_b_iso88591_A_L_D_M_T_A __pyx_string_tab[820]
#define __pyx_kp_b_iso88591_A_M __pyx_string_tab[821]
#define __pyx_kp_b_iso88591_A_M_2 __pyx_string_tab[822]
#define __pyx_kp_b_iso88591_A_M_l __pyx_string_tab[823]
#define __pyx_kp_b_iso88591_A_M_l_2 __pyx_string_tab[824]
#define __pyx_kp_b_iso88591_A_N_4_4t __pyx_string_tab[825]
#define __pyx_kp_b_iso88591_A_N_4_4t_2 __pyx_string_tab[826]
#define __pyx_kp_b_iso88591_A_O1D_D __pyx_string_tab[827]
#define __pyx_kp_b_iso88591_A_O1_D_M_T_A __pyx_string_tab[828]
#define __pyx_kp_b_iso88591_A_Q_1_6_1_4_Qa_d_q_q_2WG3bPQ_3c __pyx_string_tab[829]
#define __pyx_kp_b_iso88591_A_Q_1_7_Q_4_q_q_6_A_q_Bb_wc_1_Bg __pyx_string_tab[830]
#define __pyx_kp_b_iso88591_A_Q_1_t_as __pyx_string_tab[831]
#define __pyx_kp_b_iso88591_A_Q_1_t_b_7 __pyx_string_tab[832]
#define __pyx_kp_b_iso88591_A_Qa __pyx_string_tab[833]
#define __pyx_kp_b_iso88591_A_Qa_2 __pyx_string_tab[834]
#define __pyx_kp_b_iso88591_A_Qd_q __pyx_string_tab[835]
#define __pyx_kp_b_iso88591_A_S_1_Rq_q_E_131_S_D_A_y_q_axs_A __pyx_string_tab[836]
#define __pyx_kp_b_iso88591_A_T_q_3c_1_q_A_xs_6a __pyx_string_tab[837]
#define __pyx_kp_b_iso88591_A_a_q_Q_a_Q_a_0_s_q_1_1_1 __pyx_string_tab[838]
#define __pyx_kp_b_iso88591_A_aq __pyx_string_tab[839]
#define __pyx_kp_b_iso88591_A_q __pyx_string_tab[840]
#define __pyx_kp_b_iso88591_A_q_2 __pyx_string_tab[841]
#define __pyx_kp_b_iso88591_A_q_4r_1_4r_Qj_at1_4s_k_1_q_L_N __pyx_string_tab[842]
#define __pyx_kp_b_iso88591_A_q_E_Q_2S_1_y_q_Qhc_1_7_Q_1_nD __pyx_string_tab[843]
#define __pyx_kp_b_iso88591_A_q_E_Q_2S_1_y_q_axs_A_7_Q_1_nD __pyx_string_tab[844]
#define __pyx_kp_b_iso88591_A_q_H_87_A_V_j_k_a_1E1H_a_Q_y_Z __pyx_string_tab[845]
#define __pyx_kp_b_iso88591_A_q_t9AS __pyx_string_tab[846]
#define __pyx_kp_b_iso88591_A_q_t9Bc __pyx_string_tab[847]
#define __pyx_kp_b_iso88591_A_t7_1 __pyx_string_tab[848]
#define __pyx_kp_b_iso88591_A_t7_A __pyx_string_tab[849]
#define __pyx_kp_b_iso88591_A_t81Cs_Q __pyx_string_tab[850]
#define __pyx_kp_b_iso88591_A_t_3l_7 __pyx_string_tab[851]
#define __pyx_kp_b_iso88591_A_t_AQ __pyx_string_tab[852]
#define __pyx_kp_b_iso88591_A_t_A_1IV1 __pyx_string_tab[853]
#define __pyx_kp_b_iso88591_A_t_HA __pyx_string_tab[854]
#define __pyx_kp_b_iso88591_A_t_HIQ __pyx_string_tab[855]
#define __pyx_kp_b_iso88591_A_t_S __pyx_string_tab[856]
#define __pyx_kp_b_iso88591_A_t_S_ay_a __pyx_string_tab[857]
#define __pyx_kp_b_iso88591_A_t_a __pyx_string_tab[858]
#define __pyx_kp_b_iso88591_A_t_as __pyx_string_tab[859]
#define __pyx_kp_b_iso88591_A_t_b_1 __pyx_string_tab[860]
#define __pyx_kp_b_iso88591_A_t_c_A __pyx_string_tab[861]
#define __pyx_kp_b_iso88591_A_t_c_A_2 __pyx_string_tab[862]
#define __pyx_kp_b_iso88591_A_t_s_Q __pyx_string_tab[863]
#define __pyx_kp_b_iso88591_A_uG7_4_Q __pyx_string_tab[864]
#define __pyx_kp_b_iso88591_A_waq_y_Cz_V9AQ __pyx_string_tab[865]
#define __pyx_kp_b_iso88591_A_xq_1G1_A_q_EV1_IQd __pyx_string_tab[866]
#define __pyx_kp_b_iso88591_A_y_1A __pyx_string_tab[867]
#define __pyx_kp_b_iso88591_A_y_A_a_a_1 __pyx_string_tab[868]
#define __pyx_kp_b_iso88591_G1_A_Q_1_A_a_a_1_a_A_Q __pyx_string_tab[869]
#define __pyx_kp_b_iso88591_ha_4s_s_s_4z_4y __pyx_string_tab[870]
#define __pyx_kp_b_iso88591_iq_G1_A_Q_1_A_a_a_1_a_A_Q __pyx_string_tab[871]
#define __pyx_kp_b_iso88591_nA_y_avQ __pyx_string_tab[872]
#define __pyx_kp_b_iso88591_vS_j_q_z_A_q_A_A_q_q_1_U_1_XQgQ __pyx_string_tab[873]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_neg_1 __pyx_number_tab[1]
#define __pyx_int_1 __pyx_number_tab[2]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
  Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Configs);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Result);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_6parser_Parser);
  Py_CLEAR(clear_module_state->__pyx_ptype_7cytimes_4pydt__Pydt);
  Py_CLEAR(clear_module_state->__pyx_type_7cytimes_4pydt__Pydt);
  for (int i=0; i<17; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<134; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<874; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

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

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_date);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_time);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_datetime);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_timedelta);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_8datetime_tzinfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
  Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Configs);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Result);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_6parser_Parser);
  Py_VISIT(traverse_module_state->__pyx_ptype_7cytimes_4pydt__Pydt);
  Py_VISIT(traverse_module_state->__pyx_type_7cytimes_4pydt__Pydt);
  for (int i=0; i<17; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<134; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<874; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

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

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

/* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":23
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
 *             return self.cval.real             # <<<<<<<<<<<<<<
 * 
 *         # unavailable in limited API
*/
  __pyx_r = __pyx_v_self->cval.real;
  goto __pyx_L0;

  /* "cpython/complex.pxd":20
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double real(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
  double __pyx_r;

  /* "cpython/complex.pxd":29
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
 *             return self.cval.imag             # <<<<<<<<<<<<<<
 * 
 *     # PyTypeObject PyComplex_Type
*/
  __pyx_r = __pyx_v_self->cval.imag;
  goto __pyx_L0;

  /* "cpython/complex.pxd":26
 * 
 *         # unavailable in limited API
 *         @property             # <<<<<<<<<<<<<<
 *         @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 *         cdef inline double imag(self) noexcept:
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":116
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the default value of the context variable,
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":121
 *     or None if no such value or default was found.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":122
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)             # <<<<<<<<<<<<<<
 *     if value is NULL:
 *         # context variable does not have a default
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 122, __pyx_L1_error)

  /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
  __pyx_t_2 = (__pyx_v_value == NULL);
  if (__pyx_t_2) {

    /* "cpython/contextvars.pxd":125
 *     if value is NULL:
 *         # context variable does not have a default
 *         pyvalue = default_value             # <<<<<<<<<<<<<<
 *     else:
 *         # value or default value of context variable
*/
    __Pyx_INCREF(__pyx_v_default_value);
    __pyx_v_pyvalue = __pyx_v_default_value;

    /* "cpython/contextvars.pxd":123
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, NULL, &value)
 *     if value is NULL:             # <<<<<<<<<<<<<<
 *         # context variable does not have a default
 *         pyvalue = default_value
*/
    goto __pyx_L3;
  }

  /* "cpython/contextvars.pxd":128
 *     else:
 *         # value or default value of context variable
 *         pyvalue = <object>value             # <<<<<<<<<<<<<<
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  /*else*/ {
    __pyx_t_3 = ((PyObject *)__pyx_v_value);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_pyvalue = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cpython/contextvars.pxd":129
 *         # value or default value of context variable
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
 * 
*/
    Py_XDECREF(__pyx_v_value);
  }
  __pyx_L3:;

  /* "cpython/contextvars.pxd":130
 *         pyvalue = <object>value
 *         Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":115
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

#if !CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {

  /* "cpython/contextvars.pxd":134
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")
 * cdef inline object get_value_no_default(var, default_value=None):             # <<<<<<<<<<<<<<
 *     """Return a new reference to the value of the context variable,
 *     or the provided default value if no such value was found.
*/
  PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
  PyObject *__pyx_v_value;
  PyObject *__pyx_v_pyvalue = NULL;
  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("get_value_no_default", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_default_value = __pyx_optional_args->default_value;
    }
  }

  /* "cpython/contextvars.pxd":140
 *     Ignores the default value of the context variable, if any.
 *     """
 *     cdef PyObject *value = NULL             # <<<<<<<<<<<<<<
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
*/
  __pyx_v_value = NULL;

  /* "cpython/contextvars.pxd":141
 *     """
 *     cdef PyObject *value = NULL
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)             # <<<<<<<<<<<<<<
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
*/
  __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 141, __pyx_L1_error)

  /* "cpython/contextvars.pxd":143
 *     PyContextVar_Get(var, <PyObject*>default_value, &value)
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value             # <<<<<<<<<<<<<<
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue
*/
  __pyx_t_2 = ((PyObject *)__pyx_v_value);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_pyvalue = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cpython/contextvars.pxd":144
 *     # value of context variable or 'default_value'
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'             # <<<<<<<<<<<<<<
 *     return pyvalue
*/
  Py_XDECREF(__pyx_v_value);

  /* "cpython/contextvars.pxd":145
 *     pyvalue = <object>value
 *     Py_XDECREF(value)  # PyContextVar_Get() returned an owned reference as 'PyObject*'
 *     return pyvalue             # <<<<<<<<<<<<<<
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_pyvalue);
  __pyx_r = __pyx_v_pyvalue;
  goto __pyx_L0;

  /* "cpython/contextvars.pxd":133
 * 
 * 
 * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API")             # <<<<<<<<<<<<<<
 * cdef inline object get_value_no_default(var, default_value=None):
 *     """Return a new reference to the value of the context variable,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pyvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/

/* "datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_4year_year(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":46
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":44
 * 
 *     ctypedef extern class datetime.date[object PyDateTime_Date]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_5month_month(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":50
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":48
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4date_3day_day(PyDateTime_Date *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":54
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":52
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4hour_hour(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":59
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":57
 * 
 *     ctypedef extern class datetime.time[object PyDateTime_Time]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_TIME_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6minute_minute(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":63
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":61
 *             return PyDateTime_TIME_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_TIME_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_6second_second(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":67
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":65
 *             return PyDateTime_TIME_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_TIME_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":71
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":69
 *             return PyDateTime_TIME_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(PyDateTime_Time *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":75
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":73
 *             return PyDateTime_TIME_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
*/

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

/* "datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_4time_4fold_fold(PyDateTime_Time *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":80
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_TIME_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":77
 *             return <object>PyDateTime_TIME_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4year_year(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":85
 *         @property
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_YEAR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":83
 * 
 *     ctypedef extern class datetime.datetime[object PyDateTime_DateTime]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int year(self) noexcept:
 *             return PyDateTime_GET_YEAR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_5month_month(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":89
 *         @property
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_MONTH(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":87
 *             return PyDateTime_GET_YEAR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int month(self) noexcept:
 *             return PyDateTime_GET_MONTH(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_3day_day(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":93
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_GET_DAY(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":91
 *             return PyDateTime_GET_MONTH(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_GET_DAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4hour_hour(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":97
 *         @property
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":95
 *             return PyDateTime_GET_DAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int hour(self) noexcept:
 *             return PyDateTime_DATE_GET_HOUR(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6minute_minute(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":101
 *         @property
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":99
 *             return PyDateTime_DATE_GET_HOUR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int minute(self) noexcept:
 *             return PyDateTime_DATE_GET_MINUTE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_6second_second(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":105
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":103
 *             return PyDateTime_DATE_GET_MINUTE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DATE_GET_SECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":109
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":107
 *             return PyDateTime_DATE_GET_SECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(PyDateTime_DateTime *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("tzinfo", 0);

  /* "datetime.pxd":113
 *         @property
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":111
 *             return PyDateTime_DATE_GET_MICROSECOND(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object tzinfo(self):
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
*/

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

/* "datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_8datetime_4fold_fold(PyDateTime_DateTime *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":118
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
 *             return PyDateTime_DATE_GET_FOLD(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":115
 *             return <object>PyDateTime_DATE_GET_TZINFO(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int fold(self) noexcept:
 *             # For Python < 3.6 this returns 0 no matter what
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_3day_day(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":123
 *         @property
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":121
 * 
 *     ctypedef extern class datetime.timedelta[object PyDateTime_Delta]:
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int day(self) noexcept:
 *             return PyDateTime_DELTA_GET_DAYS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_6second_second(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":127
 *         @property
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":125
 *             return PyDateTime_DELTA_GET_DAYS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int second(self) noexcept:
 *             return PyDateTime_DELTA_GET_SECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(PyDateTime_Delta *__pyx_v_self) {
  int __pyx_r;

  /* "datetime.pxd":131
 *         @property
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)             # <<<<<<<<<<<<<<
 * 
 *     ctypedef extern class datetime.tzinfo[object PyDateTime_TZInfo]:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "datetime.pxd":129
 *             return PyDateTime_DELTA_GET_SECONDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int microsecond(self) noexcept:
 *             return PyDateTime_DELTA_GET_MICROSECONDS(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

static CYTHON_INLINE void __pyx_f_7cpython_8datetime_import_datetime(void) {

  /* "datetime.pxd":256
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:
 *     PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DateTime CAPI factory function.
*/
  (void)(PyDateTime_IMPORT);

  /* "datetime.pxd":255
 * # Datetime C API initialization function.
 * # You have to call it before any usage of DateTime CAPI functions.
 * cdef inline void import_datetime() noexcept:             # <<<<<<<<<<<<<<
 *     PyDateTime_IMPORT
 * 
*/

  /* function exit code */
}

/* "datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date date_new(int year, int month, int day):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromDate(year, month, day, PyDateTimeAPI.DateType)
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_new(int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyDateTime_Date *__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);

  /* "datetime.pxd":261
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date 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((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Date_FromDate(__pyx_v_year, __pyx_v_month, __pyx_v_day, PyDateTimeAPI->DateType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":260
 * # Create date object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline date 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((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__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, struct __pyx_opt_args_7cpython_8datetime_time_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_Time *__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);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":266
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_TimeWithFold(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(2, 266, __pyx_L1_error)
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":265
 * # Create time object using DateTime CAPI factory function
 * # Note, there are no range checks for any of the arguments.
 * cdef inline time time_new(int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_TimeWithFold(hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* 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((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__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, struct __pyx_opt_args_7cpython_8datetime_datetime_new *__pyx_optional_args) {
  int __pyx_v_fold = ((int)0);
  PyDateTime_DateTime *__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);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fold = __pyx_optional_args->fold;
    }
  }

  /* "datetime.pxd":271
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__Pyx_DateTime_DateTimeWithFold(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tz, __pyx_v_fold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":270
 * # Create datetime object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline datetime datetime_new(int year, int month, int day, int hour, int minute, int second, int microsecond, object tz, int fold=0):             # <<<<<<<<<<<<<<
 *     return __Pyx_DateTime_DateTimeWithFold(year, month, day, hour, minute, second, microsecond, tz, fold)
 * 
*/

  /* 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((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cpython_8datetime_timedelta_new(int __pyx_v_days, int __pyx_v_seconds, int __pyx_v_useconds) {
  PyDateTime_Delta *__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);

  /* "datetime.pxd":276
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta timedelta_new(int days, int seconds, int useconds):
 *     return PyDateTimeAPI.Delta_FromDelta(days, seconds, useconds, 1, PyDateTimeAPI.DeltaType)             # <<<<<<<<<<<<<<
 * 
 * # Create timedelta object using DateTime CAPI factory function.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyDateTimeAPI->Delta_FromDelta(__pyx_v_days, __pyx_v_seconds, __pyx_v_useconds, 1, PyDateTimeAPI->DeltaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":275
 * # Create timedelta object using DateTime CAPI factory function.
 * # Note, there are no range checks for any of the arguments.
 * cdef inline timedelta 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((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_timezone_new(PyObject *__pyx_v_offset, struct __pyx_opt_args_7cpython_8datetime_timezone_new *__pyx_optional_args) {
  PyObject *__pyx_v_name = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timezone_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_name = __pyx_optional_args->name;
    }
  }

  /* "datetime.pxd":280
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create datetime object using DB API constructor.
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_name != Py_None);
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)__pyx_v_name);
  } else {
    __pyx_t_1 = NULL;
  }
  __pyx_t_3 = __Pyx_TimeZone_FromOffsetAndName(__pyx_v_offset, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":279
 * 
 * # Create timedelta object using DateTime CAPI factory function.
 * cdef inline object timezone_new(object offset, object name=None):             # <<<<<<<<<<<<<<
 *     return __Pyx_TimeZone_FromOffsetAndName(offset, <PyObject*>name if name is not None else NULL)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.timezone_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cpython_8datetime_datetime_from_timestamp(PyObject *__pyx_v_timestamp, struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp *__pyx_optional_args) {
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  PyDateTime_DateTime *__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("datetime_from_timestamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }

  /* "datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "datetime.pxd":285
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)             # <<<<<<<<<<<<<<
 * 
 * # Create date object using DB API constructor.
*/
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 285, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_tz);
    __Pyx_GIVEREF(__pyx_v_tz);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz) != (0)) __PYX_ERR(2, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_timestamp);
    __Pyx_GIVEREF(__pyx_v_timestamp);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 285, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "datetime.pxd":284
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):
 *     return PyDateTimeAPI.DateTime_FromTimestamp(             # <<<<<<<<<<<<<<
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
 * 
*/
  __pyx_t_3 = ((PyObject *)PyDateTimeAPI->DateTime_FromTimestamp(((PyObject *)PyDateTimeAPI->DateTimeType), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":283
 * 
 * # Create datetime object using DB API constructor.
 * cdef inline datetime datetime_from_timestamp(timestamp, tz=None):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.DateTime_FromTimestamp(
 *         <PyObject*>PyDateTimeAPI.DateTimeType, (timestamp, tz) if tz is not None else (timestamp,), NULL)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cpython.datetime.datetime_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cpython_8datetime_date_from_timestamp(PyObject *__pyx_v_timestamp) {
  PyDateTime_Date *__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("date_from_timestamp", 0);

  /* "datetime.pxd":289
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))             # <<<<<<<<<<<<<<
 * 
 * # More recognizable getters for date/time/datetime/timedelta.
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_timestamp);
  __Pyx_GIVEREF(__pyx_v_timestamp);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_timestamp) != (0)) __PYX_ERR(2, 289, __pyx_L1_error);
  __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "datetime.pxd":288
 * 
 * # Create date object using DB API constructor.
 * cdef inline date date_from_timestamp(timestamp):             # <<<<<<<<<<<<<<
 *     return PyDateTimeAPI.Date_FromTimestamp(<PyObject*>PyDateTimeAPI.DateType, (timestamp,))
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cpython.datetime.date_from_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_get_utc(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_utc", 0);

  /* "datetime.pxd":298
 * # Get UTC singleton
 * cdef inline object get_utc():
 *     return <object>__Pyx_TimeZone_UTC             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of time
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__Pyx_TimeZone_UTC));
  __pyx_r = ((PyObject *)__Pyx_TimeZone_UTC);
  goto __pyx_L0;

  /* "datetime.pxd":297
 * 
 * # Get UTC singleton
 * cdef inline object get_utc():             # <<<<<<<<<<<<<<
 *     return <object>__Pyx_TimeZone_UTC
 * 
*/

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

/* "datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_time_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("time_tzinfo", 0);

  /* "datetime.pxd":302
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get tzinfo of datetime
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_TIME_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":301
 * 
 * # Get tzinfo of time
 * cdef inline object time_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_TIME_GET_TZINFO(o)
 * 
*/

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

/* "datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("datetime_tzinfo", 0);

  /* "datetime.pxd":306
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of date
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDateTime_DATE_GET_TZINFO(__pyx_v_o);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "datetime.pxd":305
 * 
 * # Get tzinfo of datetime
 * cdef inline object datetime_tzinfo(object o):             # <<<<<<<<<<<<<<
 *     return <object>PyDateTime_DATE_GET_TZINFO(o)
 * 
*/

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

/* "datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":310
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of date
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":309
 * 
 * # Get year of date
 * cdef inline int date_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":314
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of date
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":313
 * 
 * # Get month of date
 * cdef inline int date_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_date_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":318
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get year of datetime
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":317
 * 
 * # Get day of date
 * cdef inline int date_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_year(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":322
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:
 *     return PyDateTime_GET_YEAR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get month of datetime
*/
  __pyx_r = PyDateTime_GET_YEAR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":321
 * 
 * # Get year of datetime
 * cdef inline int datetime_year(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_YEAR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_month(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":326
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:
 *     return PyDateTime_GET_MONTH(o)             # <<<<<<<<<<<<<<
 * 
 * # Get day of datetime
*/
  __pyx_r = PyDateTime_GET_MONTH(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":325
 * 
 * # Get month of datetime
 * cdef inline int datetime_month(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_MONTH(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_day(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":330
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:
 *     return PyDateTime_GET_DAY(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of time
*/
  __pyx_r = PyDateTime_GET_DAY(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":329
 * 
 * # Get day of datetime
 * cdef inline int datetime_day(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_GET_DAY(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":334
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:
 *     return PyDateTime_TIME_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of time
*/
  __pyx_r = PyDateTime_TIME_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":333
 * 
 * # Get hour of time
 * cdef inline int time_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":338
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:
 *     return PyDateTime_TIME_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of time
*/
  __pyx_r = PyDateTime_TIME_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":337
 * 
 * # Get minute of time
 * cdef inline int time_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":342
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:
 *     return PyDateTime_TIME_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of time
*/
  __pyx_r = PyDateTime_TIME_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":341
 * 
 * # Get second of time
 * cdef inline int time_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":346
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:
 *     return PyDateTime_TIME_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of time
*/
  __pyx_r = PyDateTime_TIME_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":345
 * 
 * # Get microsecond of time
 * cdef inline int time_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_TIME_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_time_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":351
 * cdef inline int time_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get hour of datetime
*/
  __pyx_r = PyDateTime_TIME_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":349
 * 
 * # Get fold of time
 * cdef inline int time_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_TIME_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_hour(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":355
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:
 *     return PyDateTime_DATE_GET_HOUR(o)             # <<<<<<<<<<<<<<
 * 
 * # Get minute of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_HOUR(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":354
 * 
 * # Get hour of datetime
 * cdef inline int datetime_hour(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_HOUR(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_minute(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":359
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:
 *     return PyDateTime_DATE_GET_MINUTE(o)             # <<<<<<<<<<<<<<
 * 
 * # Get second of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MINUTE(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":358
 * 
 * # Get minute of datetime
 * cdef inline int datetime_minute(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MINUTE(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_second(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":363
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:
 *     return PyDateTime_DATE_GET_SECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microsecond of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_SECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":362
 * 
 * # Get second of datetime
 * cdef inline int datetime_second(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_SECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_microsecond(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":367
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:
 *     return PyDateTime_DATE_GET_MICROSECOND(o)             # <<<<<<<<<<<<<<
 * 
 * # Get fold of datetime
*/
  __pyx_r = PyDateTime_DATE_GET_MICROSECOND(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":366
 * 
 * # Get microsecond of datetime
 * cdef inline int datetime_microsecond(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DATE_GET_MICROSECOND(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_datetime_fold(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":372
 * cdef inline int datetime_fold(object o) noexcept:
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)             # <<<<<<<<<<<<<<
 * 
 * # Get days of timedelta
*/
  __pyx_r = PyDateTime_DATE_GET_FOLD(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":370
 * 
 * # Get fold of datetime
 * cdef inline int datetime_fold(object o) noexcept:             # <<<<<<<<<<<<<<
 *     # For Python < 3.6 this returns 0 no matter what
 *     return PyDateTime_DATE_GET_FOLD(o)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_days(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":376
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:
 *     return PyDateTime_DELTA_GET_DAYS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get seconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_DAYS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":375
 * 
 * # Get days of timedelta
 * cdef inline int timedelta_days(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_DAYS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_seconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":380
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_SECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * # Get microseconds of timedelta
*/
  __pyx_r = PyDateTime_DELTA_GET_SECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":379
 * 
 * # Get seconds of timedelta
 * cdef inline int timedelta_seconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_SECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

static CYTHON_INLINE int __pyx_f_7cpython_8datetime_timedelta_microseconds(PyObject *__pyx_v_o) {
  int __pyx_r;

  /* "datetime.pxd":384
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:
*/
  __pyx_r = PyDateTime_DELTA_GET_MICROSECONDS(__pyx_v_o);
  goto __pyx_L0;

  /* "datetime.pxd":383
 * 
 * # Get microseconds of timedelta
 * cdef inline int timedelta_microseconds(object o) noexcept:             # <<<<<<<<<<<<<<
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

static CYTHON_INLINE double __pyx_f_7cpython_8datetime_total_seconds(PyDateTime_Delta *__pyx_v_obj) {
  double __pyx_v_days;
  double __pyx_v_seconds;
  double __pyx_v_micros;
  double __pyx_r;

  /* "datetime.pxd":392
 *     cdef:
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)             # <<<<<<<<<<<<<<
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
*/
  __pyx_v_days = ((double)PyDateTime_DELTA_GET_DAYS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":393
 *         double days, seconds, micros
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)             # <<<<<<<<<<<<<<
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_seconds = ((double)PyDateTime_DELTA_GET_SECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":394
 *     days = <double>PyDateTime_DELTA_GET_DAYS(obj)
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)             # <<<<<<<<<<<<<<
 *     return days * 24 * 3600 + seconds + micros / 1_000_000
*/
  __pyx_v_micros = ((double)PyDateTime_DELTA_GET_MICROSECONDS(((PyObject *)__pyx_v_obj)));

  /* "datetime.pxd":395
 *     seconds = <double>PyDateTime_DELTA_GET_SECONDS(obj)
 *     micros = <double>PyDateTime_DELTA_GET_MICROSECONDS(obj)
 *     return days * 24 * 3600 + seconds + micros / 1_000_000             # <<<<<<<<<<<<<<
*/
  __pyx_r = ((((__pyx_v_days * 24.0) * 3600.0) + __pyx_v_seconds) + (__pyx_v_micros / 1000000.0));
  goto __pyx_L0;

  /* "datetime.pxd":386
 *     return PyDateTime_DELTA_GET_MICROSECONDS(o)
 * 
 * cdef inline double total_seconds(timedelta obj) noexcept:             # <<<<<<<<<<<<<<
 *     # Mirrors the "timedelta.total_seconds()" method.
 *     # Note that this implementation is not guaranteed to give *exactly* the same
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":242
 *         cdef int type_num
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":244
 *         @property
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":242
 *         cdef int type_num
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp itemsize(self) noexcept nogil:
 *             return PyDataType_ELSIZE(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":246
 *             return PyDataType_ELSIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":248
 *         @property
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)             # <<<<<<<<<<<<<<
 * 
 *         # Use fields/names with care as they may be NULL.  You must check
*/
  __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":246
 *             return PyDataType_ELSIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp alignment(self) noexcept nogil:
 *             return PyDataType_ALIGNMENT(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":252
 *         # Use fields/names with care as they may be NULL.  You must check
 *         # for this using PyDataType_HASFIELDS.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("fields", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":254
 *         @property
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":252
 *         # Use fields/names with care as they may be NULL.  You must check
 *         # for this using PyDataType_HASFIELDS.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline object fields(self):
 *             return <object>PyDataType_FIELDS(self)
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":256
 *             return <object>PyDataType_FIELDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1;
  __Pyx_RefNannySetupContext("names", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":258
 *         @property
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)             # <<<<<<<<<<<<<<
 * 
 *         # Use PyDataType_HASSUBARRAY to test whether this field is
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
  __Pyx_INCREF(((PyObject*)__pyx_t_1));
  __pyx_r = ((PyObject*)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":256
 *             return <object>PyDataType_FIELDS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline tuple names(self):
 *             return <tuple>PyDataType_NAMES(self)
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 *         # valid (the pointer can be NULL). Most users should access
 *         # this field via the inline helper method PyDataType_SHAPE.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)
*/

static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
  PyArray_ArrayDescr *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":265
 *         @property
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":263
 *         # valid (the pointer can be NULL). Most users should access
 *         # this field via the inline helper method PyDataType_SHAPE.
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
 *             return PyDataType_SUBARRAY(self)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":267
 *             return PyDataType_SUBARRAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
*/

static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
  npy_uint64 __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":270
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
 *             return PyDataType_FLAGS(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyDataType_FLAGS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":267
 *             return PyDataType_SUBARRAY(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_uint64 flags(self) noexcept nogil:
 *             """The data types flags."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":279
 *     ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
*/

static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":282
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
 *             return PyArray_MultiIter_NUMITER(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":279
 *     ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int numiter(self) noexcept nogil:
 *             """The number of arrays that need to be broadcast to the same shape."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 *             return PyArray_MultiIter_NUMITER(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
 *             return PyArray_MultiIter_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":284
 *             return PyArray_MultiIter_NUMITER(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """The total broadcasted size."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":289
 *             return PyArray_MultiIter_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":292
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
 *             return PyArray_MultiIter_INDEX(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":289
 *             return PyArray_MultiIter_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp index(self) noexcept nogil:
 *             """The current (1-d) index into the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":294
 *             return PyArray_MultiIter_INDEX(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
*/

static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
 *             return PyArray_MultiIter_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":294
 *             return PyArray_MultiIter_INDEX(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int nd(self) noexcept nogil:
 *             """The number of dimensions in the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":299
 *             return PyArray_MultiIter_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":302
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
 *             return PyArray_MultiIter_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":299
 *             return PyArray_MultiIter_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp* dimensions(self) noexcept nogil:
 *             """The shape of the broadcasted result."""
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":304
 *             return PyArray_MultiIter_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline void** iters(self) noexcept nogil:
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
*/

static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
  void **__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
 *             On return, the iterators are adjusted for broadcasting."""
 *             return PyArray_MultiIter_ITERS(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":304
 *             return PyArray_MultiIter_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline void** iters(self) noexcept nogil:
 *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":322
 *         # Instead, we use properties that map to the corresponding C-API functions.
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyObject* base(self) noexcept nogil:
 *             """Returns a borrowed reference to the object owning the data/memory.
*/

static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
  PyObject *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":326
 *             """Returns a borrowed reference to the object owning the data/memory.
 *             """
 *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_BASE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":322
 *         # Instead, we use properties that map to the corresponding C-API functions.
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline PyObject* base(self) noexcept nogil:
 *             """Returns a borrowed reference to the object owning the data/memory.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
 *             return PyArray_BASE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline dtype descr(self):
 *             """Returns an owned reference to the dtype of the array.
*/

static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
  PyArray_Descr *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArray_Descr *__pyx_t_1;
  __Pyx_RefNannySetupContext("descr", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":332
 *             """Returns an owned reference to the dtype of the array.
 *             """
 *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
  __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
  __pyx_r = ((PyArray_Descr *)__pyx_t_1);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
 *             return PyArray_BASE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline dtype descr(self):
 *             """Returns an owned reference to the dtype of the array.
*/

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

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":334
 *             return <dtype>PyArray_DESCR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int ndim(self) noexcept nogil:
 *             """Returns the number of dimensions in the array.
*/

static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
 *             """Returns the number of dimensions in the array.
 *             """
 *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_NDIM(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":334
 *             return <dtype>PyArray_DESCR(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline int ndim(self) noexcept nogil:
 *             """Returns the number of dimensions in the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
 *             return PyArray_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *shape(self) noexcept nogil:
 *             """Returns a pointer to the dimensions/shape of the array.
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":346
 *             Can return NULL for 0-dimensional arrays.
 *             """
 *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_DIMS(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
 *             return PyArray_NDIM(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *shape(self) noexcept nogil:
 *             """Returns a pointer to the dimensions/shape of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
 *             return PyArray_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *strides(self) noexcept nogil:
 *             """Returns a pointer to the strides of the array.
*/

static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
  npy_intp *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":353
 *             The number of elements matches the number of dimensions of the array (ndim).
 *             """
 *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_STRIDES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
 *             return PyArray_DIMS(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp *strides(self) noexcept nogil:
 *             """Returns a pointer to the strides of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":355
 *             return PyArray_STRIDES(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """Returns the total size (in number of elements) of the array.
*/

static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
  npy_intp __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":359
 *             """Returns the total size (in number of elements) of the array.
 *             """
 *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *         @property
*/
  __pyx_r = PyArray_SIZE(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":355
 *             return PyArray_STRIDES(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline npy_intp size(self) noexcept nogil:
 *             """Returns the total size (in number of elements) of the array.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":361
 *             return PyArray_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline char* data(self) noexcept nogil:
 *             """The pointer to the data buffer as a char*.
*/

static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
  char *__pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":368
 *             of `PyArray_DATA()` instead, which returns a 'void*'.
 *             """
 *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyArray_BYTES(__pyx_v_self);
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":361
 *             return PyArray_SIZE(self)
 * 
 *         @property             # <<<<<<<<<<<<<<
 *         cdef inline char* data(self) noexcept nogil:
 *             """The pointer to the data buffer as a char*.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 * ctypedef long double complex clongdouble_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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
 * 
 * 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, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
 * ctypedef long double complex clongdouble_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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":780
 * 
 * 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, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
 * 
 * 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, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":782
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":786
 * 
 * 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, 786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":785
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":789
 * 
 * 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, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":788
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
 *     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;
  PyObject *__pyx_t_2;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
 * 
 * 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);
  if (__pyx_t_1) {

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":793
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
    __Pyx_INCREF(((PyObject*)__pyx_t_2));
    __pyx_r = ((PyObject*)__pyx_t_2);
    goto __pyx_L0;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
*/
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
    __pyx_r = __pyx_mstate_global->__pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":994
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
 *     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) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":995
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
*/
  Py_INCREF(__pyx_v_base);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":996
 * cdef inline void set_array_base(ndarray arr, object base) except *:
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
*/
  __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 996, __pyx_L1_error)

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":994
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":998
 *     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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":999
 * 
 * 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);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1000
 * 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);
  if (__pyx_t_1) {

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1001
 *     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;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1000
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
*/
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1002
 *     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;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":998
 *     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;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1006
 * # 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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # 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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1008
 * 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, 1008, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # 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:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.multiarray failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    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, 1009, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1010, __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, 1010, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1007
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1006
 * # 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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1012
 *         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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * 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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
 * 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, 1014, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * 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:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.umath failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    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, 1015, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1016, __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, 1016, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1012
 *         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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1018
 *         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;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 0);

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * 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:*/ {

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1020
 * 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, 1020, __pyx_L3_error)

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * 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:;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy._core.umath failed to import")
 * 
*/
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    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, 1021, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __pyx_t_9 = NULL;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo};
        __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1022, __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, 1022, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1019
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1018
 *         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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
*/

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
*/

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept 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;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1062
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1065
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept 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;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1069
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1065
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1072
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept 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;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1076
 *     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;

  /* "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1072
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":79
 * 
 * 
 * cdef inline double time() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_time(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":80
 * 
 * cdef inline double time() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_TimeRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_TimeRaw();

  /* "cpython/time.pxd":81
 * cdef inline double time() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":79
 * 
 * 
 * cdef inline double time() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_TimeRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":84
 * 
 * 
 * cdef inline int64_t time_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_TimeRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_time_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":85
 * 
 * cdef inline int64_t time_ns() noexcept nogil:
 *     return <int64_t> PyTime_TimeRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_TimeRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":84
 * 
 * 
 * cdef inline int64_t time_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_TimeRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":88
 * 
 * 
 * cdef inline double perf_counter() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_perf_counter(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":89
 * 
 * cdef inline double perf_counter() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_PerfCounterRaw();

  /* "cpython/time.pxd":90
 * cdef inline double perf_counter() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":88
 * 
 * 
 * cdef inline double perf_counter() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_PerfCounterRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":93
 * 
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_PerfCounterRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_perf_counter_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":94
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:
 *     return <int64_t> PyTime_PerfCounterRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_PerfCounterRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":93
 * 
 * 
 * cdef inline int64_t perf_counter_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_PerfCounterRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":97
 * 
 * 
 * cdef inline double monotonic() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

static CYTHON_INLINE double __pyx_f_7cpython_4time_monotonic(void) {
  __Pyx_PyTime_t __pyx_v_tic;
  double __pyx_r;

  /* "cpython/time.pxd":98
 * 
 * cdef inline double monotonic() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()             # <<<<<<<<<<<<<<
 *     return PyTime_AsSecondsDouble(tic)
 * 
*/
  __pyx_v_tic = __Pyx_PyTime_MonotonicRaw();

  /* "cpython/time.pxd":99
 * cdef inline double monotonic() noexcept nogil:
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = __Pyx_PyTime_AsSecondsDouble(__pyx_v_tic);
  goto __pyx_L0;

  /* "cpython/time.pxd":97
 * 
 * 
 * cdef inline double monotonic() noexcept nogil:             # <<<<<<<<<<<<<<
 *     cdef PyTime_t tic = PyTime_MonotonicRaw()
 *     return PyTime_AsSecondsDouble(tic)
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":102
 * 
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_MonotonicRaw()
 * 
*/

static CYTHON_INLINE int64_t __pyx_f_7cpython_4time_monotonic_ns(void) {
  int64_t __pyx_r;

  /* "cpython/time.pxd":103
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:
 *     return <int64_t> PyTime_MonotonicRaw()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int64_t)__Pyx_PyTime_MonotonicRaw());
  goto __pyx_L0;

  /* "cpython/time.pxd":102
 * 
 * 
 * cdef inline int64_t monotonic_ns() noexcept nogil:             # <<<<<<<<<<<<<<
 *     return <int64_t> PyTime_MonotonicRaw()
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "cpython/time.pxd":106
 * 
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:             # <<<<<<<<<<<<<<
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.
*/

static CYTHON_INLINE int __pyx_f_7cpython_4time__raise_from_errno(void) {
  int __pyx_r;
  PyObject *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();

  /* "cpython/time.pxd":107
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:
 *     PyErr_SetFromErrno(RuntimeError)             # <<<<<<<<<<<<<<
 *     return <int> -1  # Let the C compiler know that this function always raises.
 * 
*/
  __pyx_t_1 = PyErr_SetFromErrno(((PyObject *)(((PyTypeObject*)PyExc_RuntimeError)))); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(4, 107, __pyx_L1_error)

  /* "cpython/time.pxd":108
 * cdef inline int _raise_from_errno() except -1 with gil:
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = ((int)-1L);
  goto __pyx_L0;

  /* "cpython/time.pxd":106
 * 
 * 
 * cdef inline int _raise_from_errno() except -1 with gil:             # <<<<<<<<<<<<<<
 *     PyErr_SetFromErrno(RuntimeError)
 *     return <int> -1  # Let the C compiler know that this function always raises.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.time._raise_from_errno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  return __pyx_r;
}

/* "cpython/time.pxd":111
 * 
 * 
 * cdef inline tm localtime() except * nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Analogue to the stdlib time.localtime.  The returned struct
*/

static CYTHON_INLINE struct tm __pyx_f_7cpython_4time_localtime(void) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_result;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "cpython/time.pxd":117
 *     """
 *     cdef:
 *         time_t tic = <time_t>time()             # <<<<<<<<<<<<<<
 *         tm* result
 * 
*/
  __pyx_v_tic = ((time_t)__pyx_f_7cpython_4time_time());

  /* "cpython/time.pxd":120
 *         tm* result
 * 
 *     result = libc_localtime(&tic)             # <<<<<<<<<<<<<<
 *     if result is NULL:
 *         _raise_from_errno()
*/
  __pyx_v_result = localtime((&__pyx_v_tic));

  /* "cpython/time.pxd":121
 * 
 *     result = libc_localtime(&tic)
 *     if result is NULL:             # <<<<<<<<<<<<<<
 *         _raise_from_errno()
 *     # Fix 0-based date values (and the 1900-based year).
*/
  __pyx_t_1 = (__pyx_v_result == NULL);
  if (__pyx_t_1) {

    /* "cpython/time.pxd":122
 *     result = libc_localtime(&tic)
 *     if result is NULL:
 *         _raise_from_errno()             # <<<<<<<<<<<<<<
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
*/
    __pyx_t_2 = __pyx_f_7cpython_4time__raise_from_errno(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(4, 122, __pyx_L1_error)

    /* "cpython/time.pxd":121
 * 
 *     result = libc_localtime(&tic)
 *     if result is NULL:             # <<<<<<<<<<<<<<
 *         _raise_from_errno()
 *     # Fix 0-based date values (and the 1900-based year).
*/
  }

  /* "cpython/time.pxd":125
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     result.tm_year += 1900             # <<<<<<<<<<<<<<
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
*/
  __pyx_v_result->tm_year = (__pyx_v_result->tm_year + 0x76C);

  /* "cpython/time.pxd":126
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     result.tm_year += 1900
 *     result.tm_mon += 1             # <<<<<<<<<<<<<<
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1
*/
  __pyx_v_result->tm_mon = (__pyx_v_result->tm_mon + 1);

  /* "cpython/time.pxd":127
 *     result.tm_year += 1900
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)             # <<<<<<<<<<<<<<
 *     result.tm_yday += 1
 *     return result[0]
*/
  __pyx_v_result->tm_wday = ((int)__Pyx_mod_long((__pyx_v_result->tm_wday + 6), 7, 1));

  /* "cpython/time.pxd":128
 *     result.tm_mon += 1
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1             # <<<<<<<<<<<<<<
 *     return result[0]
*/
  __pyx_v_result->tm_yday = (__pyx_v_result->tm_yday + 1);

  /* "cpython/time.pxd":129
 *     result.tm_wday = <int> ((result.tm_wday + 6) % 7)
 *     result.tm_yday += 1
 *     return result[0]             # <<<<<<<<<<<<<<
*/
  __pyx_r = (__pyx_v_result[0]);
  goto __pyx_L0;

  /* "cpython/time.pxd":111
 * 
 * 
 * cdef inline tm localtime() except * nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Analogue to the stdlib time.localtime.  The returned struct
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_AddTraceback("cpython.time.localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_mod(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_mod *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_mod", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":193
 *     >>> (num % div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":194
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == 1 or div == -1:
 *         return offset
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_mod_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 194, __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(5, 194, __pyx_L1_error)

    /* "utils.pxd":193
 *     >>> (num % div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
*/
  }

  /* "utils.pxd":195
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:             # <<<<<<<<<<<<<<
 *         return offset
 * 
*/
  switch (__pyx_v_div) {
    case 1:
    case -1LL:

    /* "utils.pxd":196
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
 *         return offset             # <<<<<<<<<<<<<<
 * 
 *     cdef long long r
*/
    __pyx_r = __pyx_v_offset;
    goto __pyx_L0;

    /* "utils.pxd":195
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:             # <<<<<<<<<<<<<<
 *         return offset
 * 
*/
    break;
    default: break;
  }

  /* "utils.pxd":200
 *     cdef long long r
 *     with cython.cdivision(True):
 *         r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return offset
*/
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":201
 *     with cython.cdivision(True):
 *         r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":202
 *         r = num % div
 *     if r == 0:
 *         return offset             # <<<<<<<<<<<<<<
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div
*/
    __pyx_r = __pyx_v_offset;
    goto __pyx_L0;

    /* "utils.pxd":201
 *     with cython.cdivision(True):
 *         r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
*/
  }

  /* "utils.pxd":203
 *     if r == 0:
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust             # <<<<<<<<<<<<<<
 *         r += div
 *     return r + offset
*/
  __pyx_t_1 = ((__pyx_v_r ^ __pyx_v_div) < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":204
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div             # <<<<<<<<<<<<<<
 *     return r + offset
 * 
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_div);

    /* "utils.pxd":203
 *     if r == 0:
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust             # <<<<<<<<<<<<<<
 *         r += div
 *     return r + offset
*/
  }

  /* "utils.pxd":205
 *     if (r ^ div) < 0:  # different signs  adjust
 *         r += div
 *     return r + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_r + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":181
 * 
 * # Math -------------------------------------------------------------------------------------------------
 * cdef inline long long math_mod(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Compute module with Python semantics `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_even(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_even *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_even", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":220
 *     >>> round(num / div, 0) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":221
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_even_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 221, __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(5, 221, __pyx_L1_error)

    /* "utils.pxd":220
 *     >>> round(num / div, 0) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":222
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":223
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_even_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 223, __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(5, 223, __pyx_L1_error)

    /* "utils.pxd":222
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_even: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_even: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":227
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset          # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":228
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset          # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":229
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset          # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":228
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset          # exact division
 * 
*/
  }

  /* "utils.pxd":232
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":233
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":234
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":235
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_5 = (__pyx_v_abs_r > __pyx_v_half);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_abs_r == __pyx_v_half);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_5 = ((__pyx_v_q & 1) != 0);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":236
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":237
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":236
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":239
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L12:;

    /* "utils.pxd":235
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":240
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":207
 *     return r + offset
 * 
 * cdef inline long long math_div_even(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round to nearest, ties-to-even (bankers' rounding) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_up(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_up *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_up", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":255
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_UP) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":256
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_up_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 256, __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(5, 256, __pyx_L1_error)

    /* "utils.pxd":255
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_UP) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":257
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":258
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_up_result_does_not_fit};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 258, __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(5, 258, __pyx_L1_error)

    /* "utils.pxd":257
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_up: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_up: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":262
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset        # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":263
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":264
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset        # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":263
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "utils.pxd":267
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":268
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":269
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r >= half:
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":270
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
  if (__pyx_t_1) {

    /* "utils.pxd":271
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":272
 *     if abs_r >= half:
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":271
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":274
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L9:;

    /* "utils.pxd":270
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r >= half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":275
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":242
 *     return q + offset
 * 
 * cdef inline long long math_div_up(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half away from zero (round-half-up) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_up", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_down(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_down *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_abs_f;
  PY_LONG_LONG __pyx_v_abs_r;
  PY_LONG_LONG __pyx_v_half;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_down", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":290
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_DOWN) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":291
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_down_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 291, __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(5, 291, __pyx_L1_error)

    /* "utils.pxd":290
 *     >>> (Decimal(num) / Decimal(div)).to_integral_value(rounding=ROUND_HALF_DOWN) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":292
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":293
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_down_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 293, __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(5, 293, __pyx_L1_error)

    /* "utils.pxd":292
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_down: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_down: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":297
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset        # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":298
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":299
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset        # exact division             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":298
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "utils.pxd":302
 * 
 *     cdef:
 *         long long abs_f = -div if div < 0 else div             # <<<<<<<<<<<<<<
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
*/
  __pyx_t_1 = (__pyx_v_div < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_div);
  } else {
    __pyx_t_6 = __pyx_v_div;
  }
  __pyx_v_abs_f = __pyx_t_6;

  /* "utils.pxd":303
 *     cdef:
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_6 = (-__pyx_v_r);
  } else {
    __pyx_t_6 = __pyx_v_r;
  }
  __pyx_v_abs_r = __pyx_t_6;

  /* "utils.pxd":304
 *         long long abs_f = -div if div < 0 else div
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *     if abs_r > half:
 *         if (num ^ div) < 0:
*/
  __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

  /* "utils.pxd":305
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
  if (__pyx_t_1) {

    /* "utils.pxd":306
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
    __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":307
 *     if abs_r > half:
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down             # <<<<<<<<<<<<<<
 *         else:
 *             q += 1  # same sign  bump up
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":306
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:
 *         if (num ^ div) < 0:             # <<<<<<<<<<<<<<
 *             q -= 1  # different signs  bump down
 *         else:
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":309
 *             q -= 1  # different signs  bump down
 *         else:
 *             q += 1  # same sign  bump up             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    /*else*/ {
      __pyx_v_q = (__pyx_v_q + 1);
    }
    __pyx_L9:;

    /* "utils.pxd":305
 *         long long abs_r = -r if r < 0 else r
 *         long long half  = abs_f - abs_r
 *     if abs_r > half:             # <<<<<<<<<<<<<<
 *         if (num ^ div) < 0:
 *             q -= 1  # different signs  bump down
*/
  }

  /* "utils.pxd":310
 *         else:
 *             q += 1  # same sign  bump up
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":277
 *     return q + offset
 * 
 * cdef inline long long math_div_down(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then round half toward zero (round-half-down) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_down", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_ceil(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_ceil *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":325
 *     >>> math.ceil(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":326
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_ceil_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 326, __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(5, 326, __pyx_L1_error)

    /* "utils.pxd":325
 *     >>> math.ceil(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":327
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":328
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_ceil_result_does_not_fi};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 328, __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(5, 328, __pyx_L1_error)

    /* "utils.pxd":327
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_ceil: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_ceil: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":332
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset         # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":333
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":334
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset         # exact division             # <<<<<<<<<<<<<<
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":333
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "utils.pxd":336
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up             # <<<<<<<<<<<<<<
 *         q += 1
 *     return q + offset
*/
  __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":337
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up
 *         q += 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q + 1);

    /* "utils.pxd":336
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up             # <<<<<<<<<<<<<<
 *         q += 1
 *     return q + offset
*/
  }

  /* "utils.pxd":338
 *     if (num ^ div) >= 0:  # same sign  bump up
 *         q += 1
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":312
 *     return q + offset
 * 
 * cdef inline long long math_div_ceil(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical ceiling `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_floor(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_floor *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":353
 *     >>> math.floor(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":354
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_floor_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 354, __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(5, 354, __pyx_L1_error)

    /* "utils.pxd":353
 *     >>> math.floor(num / div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":355
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":356
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q, r
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_floor_result_does_not_f};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 356, __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(5, 356, __pyx_L1_error)

    /* "utils.pxd":355
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_floor: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_floor: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":360
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div             # <<<<<<<<<<<<<<
 *     if r == 0:
 *         return q + offset         # exact division
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);
  __pyx_v_r = (__pyx_v_num % __pyx_v_div);

  /* "utils.pxd":361
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  __pyx_t_1 = (__pyx_v_r == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":362
 *         q = num / div; r = num % div
 *     if r == 0:
 *         return q + offset         # exact division             # <<<<<<<<<<<<<<
 * 
 *     if (num ^ div) < 0:        # different sign  bump down
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":361
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "utils.pxd":364
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) < 0:        # different sign  bump down             # <<<<<<<<<<<<<<
 *         q -= 1
 *     return q + offset
*/
  __pyx_t_1 = ((__pyx_v_num ^ __pyx_v_div) < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":365
 * 
 *     if (num ^ div) < 0:        # different sign  bump down
 *         q -= 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":364
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) < 0:        # different sign  bump down             # <<<<<<<<<<<<<<
 *         q -= 1
 *     return q + offset
*/
  }

  /* "utils.pxd":366
 *     if (num ^ div) < 0:        # different sign  bump down
 *         q -= 1
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":340
 *     return q + offset
 * 
 * cdef inline long long math_div_floor(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide then take the mathematical floor `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_trunc(PY_LONG_LONG __pyx_v_num, PY_LONG_LONG __pyx_v_div, struct __pyx_opt_args_7cytimes_5utils_math_div_trunc *__pyx_optional_args) {
  PY_LONG_LONG __pyx_v_offset = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("math_div_trunc", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":378
 *     :raises `<'OverflowError'>`: When the result does not fit in signed 64-bit.
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  __pyx_t_1 = (__pyx_v_div == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":379
 *     """
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")             # <<<<<<<<<<<<<<
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_trunc_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 379, __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(5, 379, __pyx_L1_error)

    /* "utils.pxd":378
 *     :raises `<'OverflowError'>`: When the result does not fit in signed 64-bit.
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
*/
  }

  /* "utils.pxd":380
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
 * 
*/
  __pyx_t_5 = (__pyx_v_div == -1LL);
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_num == LLONG_MIN);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":381
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")             # <<<<<<<<<<<<<<
 * 
 *     cdef long long q
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_math_div_trunc_result_does_not_f};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 381, __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(5, 381, __pyx_L1_error)

    /* "utils.pxd":380
 *     if div == 0:
 *         raise ZeroDivisionError("math_div_trunc: division by zero.")
 *     if div == -1 and num == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         raise OverflowError("math_div_trunc: result does not fit in signed 64-bit")
 * 
*/
  }

  /* "utils.pxd":385
 *     cdef long long q
 *     with cython.cdivision(True):
 *         q = num / div          # truncates toward zero             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
  __pyx_v_q = (__pyx_v_num / __pyx_v_div);

  /* "utils.pxd":386
 *     with cython.cdivision(True):
 *         q = num / div          # truncates toward zero
 *     return q + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:
*/
  __pyx_r = (__pyx_v_q + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":368
 *     return q + offset
 * 
 * cdef inline long long math_div_trunc(long long num, long long div, long long offset=0) except *:             # <<<<<<<<<<<<<<
 *     """Divide and truncate toward zero (C/CPython style) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.math_div_trunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":388
 *     return q + offset
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return |a - b| as uint64 using unsigned arithmetic `<'int'>`.
 * 
*/

static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_abs_diff_ull(PY_LONG_LONG __pyx_v_a, PY_LONG_LONG __pyx_v_b) {
  unsigned PY_LONG_LONG __pyx_v_ua;
  unsigned PY_LONG_LONG __pyx_v_ub;
  unsigned PY_LONG_LONG __pyx_r;
  unsigned PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":393
 *     Safe for all long long pairs (avoids signed overflow/UB near LLONG_MIN/LLONG_MAX).
 *     """
 *     cdef unsigned long long ua = <unsigned long long> a             # <<<<<<<<<<<<<<
 *     cdef unsigned long long ub = <unsigned long long> b
 *     return ua - ub if a >= b else ub - ua
*/
  __pyx_v_ua = ((unsigned PY_LONG_LONG)__pyx_v_a);

  /* "utils.pxd":394
 *     """
 *     cdef unsigned long long ua = <unsigned long long> a
 *     cdef unsigned long long ub = <unsigned long long> b             # <<<<<<<<<<<<<<
 *     return ua - ub if a >= b else ub - ua
 * 
*/
  __pyx_v_ub = ((unsigned PY_LONG_LONG)__pyx_v_b);

  /* "utils.pxd":395
 *     cdef unsigned long long ua = <unsigned long long> a
 *     cdef unsigned long long ub = <unsigned long long> b
 *     return ua - ub if a >= b else ub - ua             # <<<<<<<<<<<<<<
 * 
 * # Parser -----------------------------------------------------------------------------------------------
*/
  __pyx_t_2 = (__pyx_v_a >= __pyx_v_b);
  if (__pyx_t_2) {
    __pyx_t_1 = (__pyx_v_ua - __pyx_v_ub);
  } else {
    __pyx_t_1 = (__pyx_v_ub - __pyx_v_ua);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":388
 *     return q + offset
 * 
 * cdef inline unsigned long long abs_diff_ull(long long a, long long b) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return |a - b| as uint64 using unsigned arithmetic `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":399
 * # Parser -----------------------------------------------------------------------------------------------
 * # . check: character
 * cdef inline bint is_dot(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a dot `'.'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dot(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":404
 *     - Dot: `'.'` (46)
 *     """
 *     return ch == 46             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 46);
  goto __pyx_L0;

  /* "utils.pxd":399
 * # Parser -----------------------------------------------------------------------------------------------
 * # . check: character
 * cdef inline bint is_dot(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a dot `'.'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":406
 *     return ch == 46
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a comma `','` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_comma(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":411
 *     - Comma: `','` (44)
 *     """
 *     return ch == 44             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 44);
  goto __pyx_L0;

  /* "utils.pxd":406
 *     return ch == 46
 * 
 * cdef inline bint is_comma(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a comma `','` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":413
 *     return ch == 44
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus sign `'+'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":418
 *     - Plus sign: `'+'` (43)
 *     """
 *     return ch == 43             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 43);
  goto __pyx_L0;

  /* "utils.pxd":413
 *     return ch == 44
 * 
 * cdef inline bint is_plus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus sign `'+'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":420
 *     return ch == 43
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a minus sign `'-'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_minus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":425
 *     - Minus sign: `'-'` (45)
 *     """
 *     return ch == 45             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 45);
  goto __pyx_L0;

  /* "utils.pxd":420
 *     return ch == 43
 * 
 * cdef inline bint is_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a minus sign `'-'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":427
 *     return ch == 45
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus or minus sign `'-'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_plus_or_minus_sign(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":433
 *     - Minus sign: `'-'` (45)
 *     """
 *     return is_plus_sign(ch) or is_minus_sign(ch)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_plus_sign(__pyx_v_ch);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_minus_sign(__pyx_v_ch);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":427
 *     return ch == 45
 * 
 * cdef inline bint is_plus_or_minus_sign(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a plus or minus sign `'-'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":435
 *     return is_plus_sign(ch) or is_minus_sign(ch)
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ISO 8601 date-time separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_iso_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":440
 *     - Date / Time separators: `' '` (32) or `'T'` (case-insensitive: 84 & 116).
 *     """
 *     return ch == 32 or ch == 84 or ch == 116             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:
*/
  switch (__pyx_v_ch) {
    case 32:
    case 84:
    case 0x74:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":435
 *     return is_plus_sign(ch) or is_minus_sign(ch)
 * 
 * cdef inline bint is_iso_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ISO 8601 date-time separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":442
 *     return ch == 32 or ch == 84 or ch == 116
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a date-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":447
 *     - Date-field separators: `'-'` (45), `'.'` (46) or `'/'` (47)
 *     """
 *     return 45 <= ch <= 47             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (45 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 47);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":442
 *     return ch == 32 or ch == 84 or ch == 116
 * 
 * cdef inline bint is_date_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a date-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":449
 *     return 45 <= ch <= 47
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the time-field separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;

  /* "utils.pxd":454
 *     - Time-field seperator: `':'` (58)
 *     """
 *     return ch == 58             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_r = (__pyx_v_ch == 58);
  goto __pyx_L0;

  /* "utils.pxd":449
 *     return 45 <= ch <= 47
 * 
 * cdef inline bint is_time_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the time-field separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":456
 *     return ch == 58
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the ISO week designator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_isoweek_sep(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":461
 *     - ISO week designator: `'W'` (case-insensitive: 87 & 119).
 *     """
 *     return ch == 87 or ch == 119             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:
*/
  switch (__pyx_v_ch) {
    case 87:
    case 0x77:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":456
 *     return ch == 58
 * 
 * cdef inline bint is_isoweek_sep(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is the ISO week designator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":463
 *     return ch == 87 or ch == 119
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":468
 *     - ASCII control characters (0-31) and (127)
 *     """
 *     return ch <= 31 or ch == 127             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_ch <= 31);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ch == 0x7F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":463
 *     return ch == 87 or ch == 119
 * 
 * cdef inline bint is_ascii_ctl(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":470
 *     return ch <= 31 or ch == 127
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control or space charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":476
 *     - ASCII space character: (32)
 *     """
 *     return ch <= 32 or ch == 127             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_ch <= 32);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ch == 0x7F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":470
 *     return ch <= 31 or ch == 127
 * 
 * cdef inline bint is_ascii_ctl_or_space(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a control or space charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":478
 *     return ch <= 32 or ch == 127
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII digit `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_digit(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":483
 *     - ASSCI digits: `'0'` (48) ... `'9'` (57)
 *     """
 *     return 48 <= ch <= 57             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (48 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 57);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":478
 *     return ch <= 32 or ch == 127
 * 
 * cdef inline bint is_ascii_digit(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII digit `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":485
 *     return 48 <= ch <= 57
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an uppercase ASCII letter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_upper(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":490
 *     - Uppercase ASCII letters: `'A'` (65) ... `'Z'` (90)
 *     """
 *     return 65 <= ch <= 90             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (65 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 90);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":485
 *     return 48 <= ch <= 57
 * 
 * cdef inline bint is_ascii_letter_upper(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an uppercase ASCII letter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":492
 *     return 65 <= ch <= 90
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a lowercase ASCII letter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter_lower(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":497
 *     - Lowercase ASCII letters: `'a'` (97) ... `'z'` (122)
 *     """
 *     return 97 <= ch <= 122             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:
*/
  __pyx_t_1 = (97 <= __pyx_v_ch);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_ch <= 0x7A);
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":492
 *     return 65 <= ch <= 90
 * 
 * cdef inline bint is_ascii_letter_lower(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is a lowercase ASCII letter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":499
 *     return 97 <= ch <= 122
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII letter (case-insensitive) `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_ascii_letter(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":505
 *     - Lowercase ASCII letters: `'a'` (97) ... `'z'` (122)
 *     """
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_v_ch);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_v_ch);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":499
 *     return 97 <= ch <= 122
 * 
 * cdef inline bint is_ascii_letter(Py_UCS4 ch) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an ASCII letter (case-insensitive) `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":507
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an alphabetic character `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_alpha(Py_UCS4 __pyx_v_ch) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":512
 *     - Uses Unicode definition of alphabetic characters.
 *     """
 *     return True if is_ascii_letter(ch) else ch.isalpha()             # <<<<<<<<<<<<<<
 * 
 * # . check: string
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_v_ch);
  if (__pyx_t_2) {
    __pyx_t_1 = 1;
  } else {
    __pyx_t_3 = __Pyx_Py_UNICODE_ISALPHA(__pyx_v_ch); 
    __pyx_t_1 = __pyx_t_3;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":507
 *     return is_ascii_letter_lower(ch) or is_ascii_letter_upper(ch)
 * 
 * cdef inline bint is_alpha(Py_UCS4 ch) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether `ch` is an alphabetic character `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_dot(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_dot *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":524
 *     :returns `<'bool'>`: True if `token` is a single-character dot `'.'`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":525
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":524
 *     :returns `<'bool'>`: True if `token` is a single-character dot `'.'`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":526
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":527
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":526
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":528
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_dot(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":529
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_dot(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":528
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_dot(str_read(token, 0))
*/
  }

  /* "utils.pxd":530
 *     if token_len != 1:
 *         return False
 *     return is_dot(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 530, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_dot(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":515
 * 
 * # . check: string
 * cdef inline bint is_str_dot(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character dot `'.'` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_comma(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_comma *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":541
 *     :returns `<'bool'>`: True if `token` is a single-character comma `'.,`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":542
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":541
 *     :returns `<'bool'>`: True if `token` is a single-character comma `'.,`; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":543
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":544
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":543
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":545
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_comma(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":546
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_comma(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":545
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_comma(str_read(token, 0))
*/
  }

  /* "utils.pxd":547
 *     if token_len != 1:
 *         return False
 *     return is_comma(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 547, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_comma(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":532
 *     return is_dot(str_read(token, 0))
 * 
 * cdef inline bint is_str_comma(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character comma `','` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_comma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_iso_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":560
 *     :returns `<'bool'>`: True if `token` is a single-character ISO date-time separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":561
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":560
 *     :returns `<'bool'>`: True if `token` is a single-character ISO date-time separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":562
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":563
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":562
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":564
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_iso_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":565
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_iso_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":564
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_iso_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":566
 *     if token_len != 1:
 *         return False
 *     return is_iso_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 566, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_iso_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":549
 *     return is_comma(str_read(token, 0))
 * 
 * cdef inline bint is_str_iso_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO 8601 date-time separator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_iso_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_date_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":579
 *     :returns `<'bool'>`: True if `token` is a single-character date-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":580
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":579
 *     :returns `<'bool'>`: True if `token` is a single-character date-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":581
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":582
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":581
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":583
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_date_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":584
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_date_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":583
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_date_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":585
 *     if token_len != 1:
 *         return False
 *     return is_date_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 585, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_date_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":568
 *     return is_iso_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_date_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character date-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_date_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_time_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":598
 *     :returns `<'bool'>`: True if `token` is a single-character time-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":599
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":598
 *     :returns `<'bool'>`: True if `token` is a single-character time-field separator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":600
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":601
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":600
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":602
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_time_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":603
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_time_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":602
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_time_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":604
 *     if token_len != 1:
 *         return False
 *     return is_time_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 604, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_time_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":587
 *     return is_date_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_time_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character time-field seperator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_time_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_isoweek_sep(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":617
 *     :returns `<'bool'>`: True if `token` is a single-character ISO week designator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":618
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":617
 *     :returns `<'bool'>`: True if `token` is a single-character ISO week designator; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":619
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":620
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":619
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":621
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":622
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_isoweek_sep(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":621
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))
*/
  }

  /* "utils.pxd":623
 *     if token_len != 1:
 *         return False
 *     return is_isoweek_sep(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 623, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_isoweek_sep(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":606
 *     return is_time_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_isoweek_sep(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single-character ISO week designator `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_isoweek_sep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":636
 *     :returns `<'bool'>`: True if `token` is a single control character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":637
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":636
 *     :returns `<'bool'>`: True if `token` is a single control character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":638
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":639
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":638
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":640
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":641
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_ascii_ctl(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":640
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))
*/
  }

  /* "utils.pxd":642
 *     if token_len != 1:
 *         return False
 *     return is_ascii_ctl(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 642, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_ascii_ctl(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":625
 *     return is_isoweek_sep(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_ctl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":656
 *     :returns `<'bool'>`: True if `token` is a single control or space character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":657
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":656
 *     :returns `<'bool'>`: True if `token` is a single control or space character; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":658
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":659
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len != 1:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":658
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "utils.pxd":660
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))
*/
  __pyx_t_1 = (__pyx_v_token_len != 1);
  if (__pyx_t_1) {

    /* "utils.pxd":661
 *         token_len = str_len(token)
 *     if token_len != 1:
 *         return False             # <<<<<<<<<<<<<<
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":660
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len != 1:             # <<<<<<<<<<<<<<
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))
*/
  }

  /* "utils.pxd":662
 *     if token_len != 1:
 *         return False
 *     return is_ascii_ctl_or_space(str_read(token, 0))             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_token, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 662, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_t_2);
  goto __pyx_L0;

  /* "utils.pxd":644
 *     return is_ascii_ctl(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_ctl_or_space(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` is a single control or space charactor `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_ctl_or_space", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_digits(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":675
 *     :returns `<'bool'>`: True if `token` only contains ASCII digits; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":676
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":675
 *     :returns `<'bool'>`: True if `token` only contains ASCII digits; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":677
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":678
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":677
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":679
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":680
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":679
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":682
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":683
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 683, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":684
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":683
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_digit(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":685
 *         if not is_ascii_digit(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":664
 *     return is_ascii_ctl_or_space(str_read(token, 0))
 * 
 * cdef inline bint is_str_ascii_digits(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains ASCII digits `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_digits", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":698
 *     :returns `<'bool'>`: True if `token` only contains uppercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":699
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":698
 *     :returns `<'bool'>`: True if `token` only contains uppercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":700
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":701
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":700
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":702
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":703
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":702
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":705
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":706
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 706, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":707
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":706
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_upper(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":708
 *         if not is_ascii_letter_upper(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":687
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_upper(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains uppercase ASCII letters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters_upper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":721
 *     :returns `<'bool'>`: True if `token` only contains lowercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":722
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":721
 *     :returns `<'bool'>`: True if `token` only contains lowercase ASCII letters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":723
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":724
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":723
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":725
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":726
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":725
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":728
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":729
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 729, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":730
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":729
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter_lower(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":731
 *         if not is_ascii_letter_lower(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":710
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters_lower(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains lowercase ASCII letters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters_lower", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":744
 *     :returns `<'bool'>`: True if `token` only contains letters (case-insensitive); False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":745
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":744
 *     :returns `<'bool'>`: True if `token` only contains letters (case-insensitive); False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":746
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":747
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":746
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":748
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":749
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":748
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":751
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":752
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 752, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":753
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":752
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_ascii_letter(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":754
 *         if not is_ascii_letter(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":733
 *     return True
 * 
 * cdef inline bint is_str_ascii_letters(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains letters (case-insensitive) `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_ascii_letters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_alphas(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_is_str_alphas *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":767
 *     :returns `<'bool'>`: True if `token` only contains alphabetic characters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":768
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":767
 *     :returns `<'bool'>`: True if `token` only contains alphabetic characters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":769
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":770
 *         return False
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return False
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":769
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":771
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":772
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":771
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "utils.pxd":774
 *         return False
 *     cdef Py_ssize_t i
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         if not is_alpha(str_read(token, i)):
 *             return False
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":775
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 775, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_alpha(__pyx_t_5));
    if (__pyx_t_1) {

      /* "utils.pxd":776
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":775
 *     cdef Py_ssize_t i
 *     for i in range(token_len):
 *         if not is_alpha(str_read(token, i)):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":777
 *         if not is_alpha(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . parse
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":756
 *     return True
 * 
 * cdef inline bint is_str_alphas(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check whether `token` only contains alphabetic characters `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.is_str_alphas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_numeric_kind(PyObject *__pyx_v_token, struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_v_has_num;
  int __pyx_v_has_dot;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":794
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return 0
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":795
 *     # Validate
 *     if token is None:
 *         return 0             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":794
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return 0
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":796
 *     if token is None:
 *         return 0
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":797
 *         return 0
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len == 0:
 *         return 0
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":796
 *     if token is None:
 *         return 0
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "utils.pxd":798
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":799
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":798
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "utils.pxd":802
 * 
 *     cdef:
 *         bint has_num = False             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         Py_ssize_t i
*/
  __pyx_v_has_num = 0;

  /* "utils.pxd":803
 *     cdef:
 *         bint has_num = False
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":807
 *         Py_UCS4 ch
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_2 = __pyx_v_token_len;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "utils.pxd":808
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             has_num = True
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 808, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_5;

    /* "utils.pxd":809
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             has_num = True
 *         elif ch == 46:  # '.'
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":810
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             has_num = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_num = 1;

      /* "utils.pxd":809
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             has_num = True
 *         elif ch == 46:  # '.'
*/
      goto __pyx_L8;
    }

    /* "utils.pxd":811
 *         if is_ascii_digit(ch):
 *             has_num = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 return 0
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "utils.pxd":813
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 return 0             # <<<<<<<<<<<<<<
 *             has_dot = True
 *         else:
*/
        __pyx_r = 0;
        goto __pyx_L0;

        /* "utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      }

      /* "utils.pxd":814
 *             if has_dot:
 *                 return 0
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":811
 *         if is_ascii_digit(ch):
 *             has_num = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 return 0
*/
      goto __pyx_L8;
    }

    /* "utils.pxd":816
 *             has_dot = True
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if not has_num:
*/
    /*else*/ {
      __pyx_r = 0;
      goto __pyx_L0;
    }
    __pyx_L8:;
  }

  /* "utils.pxd":818
 *             return 0
 * 
 *     if not has_num:             # <<<<<<<<<<<<<<
 *         return 0
 *     return 2 if has_dot else 1
*/
  __pyx_t_1 = (!__pyx_v_has_num);
  if (__pyx_t_1) {

    /* "utils.pxd":819
 * 
 *     if not has_num:
 *         return 0             # <<<<<<<<<<<<<<
 *     return 2 if has_dot else 1
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":818
 *             return 0
 * 
 *     if not has_num:             # <<<<<<<<<<<<<<
 *         return 0
 *     return 2 if has_dot else 1
*/
  }

  /* "utils.pxd":820
 *     if not has_num:
 *         return 0
 *     return 2 if has_dot else 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  if (__pyx_v_has_dot) {
    __pyx_t_6 = 2;
  } else {
    __pyx_t_6 = 1;
  }
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "utils.pxd":780
 * 
 * # . parse
 * cdef inline int parse_numeric_kind(str token, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Classify `token` string as certain numeric kind `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_numeric_kind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoyear(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoyear *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  Py_UCS4 __pyx_v_c2;
  Py_UCS4 __pyx_v_c3;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":839
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":840
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":839
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":841
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":842
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 4:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":841
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
*/
  }

  /* "utils.pxd":843
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 4);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":844
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":843
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":847
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 847, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":848
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":849
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":848
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":850
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 850, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":851
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":852
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":851
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  }

  /* "utils.pxd":853
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 2)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 853, __pyx_L1_error)
  __pyx_v_c2 = __pyx_t_3;

  /* "utils.pxd":854
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c2));
  if (__pyx_t_1) {

    /* "utils.pxd":855
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":854
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
*/
  }

  /* "utils.pxd":856
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c3):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 3)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 856, __pyx_L1_error)
  __pyx_v_c3 = __pyx_t_3;

  /* "utils.pxd":857
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c3));
  if (__pyx_t_1) {

    /* "utils.pxd":858
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":857
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c3 = str_read(token, pos + 3)
 *     if not is_ascii_digit(c3):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":864
 *         (ord(c0) - 48) * 1000 +
 *         (ord(c1) - 48) *  100 +
 *         (ord(c2) - 48) *   10 +             # <<<<<<<<<<<<<<
 *         (ord(c3) - 48)
 *     )
*/
  __pyx_v_out = (((((__Pyx_long_cast(__pyx_v_c0) - 48) * 0x3E8) + ((__Pyx_long_cast(__pyx_v_c1) - 48) * 0x64)) + ((__Pyx_long_cast(__pyx_v_c2) - 48) * 10)) + (__Pyx_long_cast(__pyx_v_c3) - 48));

  /* "utils.pxd":867
 *         (ord(c3) - 48)
 *     )
 *     return out if out > 0 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:
*/
  __pyx_t_1 = (__pyx_v_out > 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":822
 *     return 2 if has_dot else 1
 * 
 * cdef inline int parse_isoyear(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format year component (YYYY) from a string,
 *     returns `-1` for invalid ISO years `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isomonth(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isomonth *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":886
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":887
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":886
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":888
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":889
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":888
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":890
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":891
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":890
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":894
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 894, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":895
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":896
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":895
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":897
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 897, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":898
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":899
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":898
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":903
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":906
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 12 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 12);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":869
 *     return out if out > 0 else -1
 * 
 * cdef inline int parse_isomonth(str token, Py_ssize_t pos, Py_ssize_t token_len=-1)  except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format month component (MM) from a string,
 *     returns `-1` for invalid ISO months `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isomonth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoday(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoday *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":925
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":926
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":925
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":927
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":928
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":927
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":929
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":930
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":929
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":933
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 933, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":934
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":935
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":934
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":936
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 936, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":937
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":938
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":937
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":942
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":945
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 31 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 31);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":908
 *     return out if 1 <= out <= 12 else -1
 * 
 * cdef inline int parse_isoday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse ISO format day component (DD) from a string,
 *     returns `-1` for invalid ISO days `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweek(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoweek *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":964
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":965
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":964
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":966
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":967
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":966
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":968
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":969
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":968
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":972
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 972, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":973
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":974
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":973
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":975
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 975, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":976
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":977
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":976
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":981
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":984
 *         (ord(c1) - 48)
 *     )
 *     return out if 1 <= out <= 53 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 53);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":947
 *     return out if 1 <= out <= 31 else -1
 * 
 * cdef inline int parse_isoweek(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format week number component (WW) from a string,
 *     returns `-1` for invalid ISO week number `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweekday(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_ch;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1002
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1003
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1002
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1004
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1005
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1004
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1006
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1007
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1006
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1010
 * 
 *     # Parse value
 *     cdef Py_UCS4 ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1010, __pyx_L1_error)
  __pyx_v_ch = __pyx_t_3;

  /* "utils.pxd":1013
 * 
 *     # Convert to integer
 *     cdef int out = ord(ch) - 48             # <<<<<<<<<<<<<<
 *     return out if 1 <= out <= 7 else -1
 * 
*/
  __pyx_v_out = (__Pyx_long_cast(__pyx_v_ch) - 48);

  /* "utils.pxd":1014
 *     # Convert to integer
 *     cdef int out = ord(ch) - 48
 *     return out if 1 <= out <= 7 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 7);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":986
 *     return out if 1 <= out <= 53 else -1
 * 
 * cdef inline int parse_isoweekday(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format weekday component (D) from a string,
 *     returns `-1` for invalid ISO weekdays `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isodoy(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isodoy *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  Py_UCS4 __pyx_v_c2;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1033
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1034
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1033
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1035
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1036
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 3:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1035
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
*/
  }

  /* "utils.pxd":1037
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 3);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1038
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1037
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1041
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1041, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1042
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1043
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1042
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1044
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1044, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1045
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1046
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1045
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
*/
  }

  /* "utils.pxd":1047
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 2)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1047, __pyx_L1_error)
  __pyx_v_c2 = __pyx_t_3;

  /* "utils.pxd":1048
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c2));
  if (__pyx_t_1) {

    /* "utils.pxd":1049
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1048
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c2 = str_read(token, pos + 2)
 *     if not is_ascii_digit(c2):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1054
 *     cdef int out = (
 *         (ord(c0) - 48) * 100 +
 *         (ord(c1) - 48) * 10  +             # <<<<<<<<<<<<<<
 *         (ord(c2) - 48)
 *     )
*/
  __pyx_v_out = ((((__Pyx_long_cast(__pyx_v_c0) - 48) * 0x64) + ((__Pyx_long_cast(__pyx_v_c1) - 48) * 10)) + (__Pyx_long_cast(__pyx_v_c2) - 48));

  /* "utils.pxd":1057
 *         (ord(c2) - 48)
 *     )
 *     return out if 1 <= out <= 366 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (1 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 0x16E);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1016
 *     return out if 1 <= out <= 7 else -1
 * 
 * cdef inline int parse_isodoy(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format day-of-year component (DDD) from a string,
 *     returns `-1` for invalid ISO day of the year `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isodoy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isohour(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isohour *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1076
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1077
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1076
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1078
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1079
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1078
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":1080
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1081
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1080
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1084
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1084, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1085
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1086
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1085
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1087
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1087, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1088
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1089
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1088
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1093
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":1096
 *         (ord(c1) - 48)
 *     )
 *     return out if 0 <= out <= 23 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (0 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 23);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1059
 *     return out if 1 <= out <= 366 else -1
 * 
 * cdef inline int parse_isohour(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format hour (HH) component from a string,
 *     returns `-1` for invalid ISO hours `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isohour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isominute(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isominute *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_UCS4 __pyx_v_c0;
  Py_UCS4 __pyx_v_c1;
  int __pyx_v_out;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1115
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1116
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1115
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1117
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1118
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1117
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
*/
  }

  /* "utils.pxd":1119
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 2);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1120
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1119
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1123
 * 
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1123, __pyx_L1_error)
  __pyx_v_c0 = __pyx_t_3;

  /* "utils.pxd":1124
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c0));
  if (__pyx_t_1) {

    /* "utils.pxd":1125
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1124
 *     # Parse value
 *     cdef Py_UCS4 c0 = str_read(token, pos)
 *     if not is_ascii_digit(c0):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
*/
  }

  /* "utils.pxd":1126
 *     if not is_ascii_digit(c0):
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)             # <<<<<<<<<<<<<<
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid
*/
  __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, (__pyx_v_pos + 1)); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1126, __pyx_L1_error)
  __pyx_v_c1 = __pyx_t_3;

  /* "utils.pxd":1127
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_c1));
  if (__pyx_t_1) {

    /* "utils.pxd":1128
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Convert to integer
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1127
 *         return -1  # exit: invalid
 *     cdef Py_UCS4 c1 = str_read(token, pos + 1)
 *     if not is_ascii_digit(c1):             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1132
 *     # Convert to integer
 *     cdef int out = (
 *         (ord(c0) - 48) * 10 +             # <<<<<<<<<<<<<<
 *         (ord(c1) - 48)
 *     )
*/
  __pyx_v_out = (((__Pyx_long_cast(__pyx_v_c0) - 48) * 10) + (__Pyx_long_cast(__pyx_v_c1) - 48));

  /* "utils.pxd":1135
 *         (ord(c1) - 48)
 *     )
 *     return out if 0 <= out <= 59 else -1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_1 = (0 <= __pyx_v_out);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_out <= 59);
  }
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_out;
  } else {
    __pyx_t_4 = -1;
  }
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "utils.pxd":1098
 *     return out if 0 <= out <= 23 else -1
 * 
 * cdef inline int parse_isominute(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format minute (MM) component from a string,
 *     returns `-1` for invalid ISO minutes `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isominute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isosecond(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isosecond *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_r;
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_parse_isominute __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1153
 *     :returns `<'int'>`: The parsed ISO second `[0..59]`, or `-1` if invalid.
 *     """
 *     return parse_isominute(token, pos, token_len)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.token_len = __pyx_v_token_len;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_isominute(__pyx_v_token, __pyx_v_pos, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(5, 1153, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":1137
 *     return out if 0 <= out <= 59 else -1
 * 
 * cdef inline int parse_isosecond(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO format second (SS) component from a string,
 *     returns `-1` for invalid ISO seconds `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isofraction(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_isofraction *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  int __pyx_v_f_size;
  int __pyx_v_out;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1172
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1173
 *     # Validate
 *     if token is None:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1172
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1174
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1175
 *         return -1  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1174
 *     if token is None:
 *         return -1  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1176
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1177
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         return -1  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":1176
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "utils.pxd":1181
 *     # Parse value
 *     cdef:
 *         int f_size = 0             # <<<<<<<<<<<<<<
 *         int out = 0
 *         Py_UCS4 ch
*/
  __pyx_v_f_size = 0;

  /* "utils.pxd":1182
 *     cdef:
 *         int f_size = 0
 *         int out = 0             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1184
 *         int out = 0
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:             # <<<<<<<<<<<<<<
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_pos < __pyx_v_token_len);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_f_size < 6);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L10_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "utils.pxd":1185
 *         Py_UCS4 ch
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(ch):
 *             break
*/
    __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1185, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_3;

    /* "utils.pxd":1186
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             break
 *         out = out * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch));
    if (__pyx_t_1) {

      /* "utils.pxd":1187
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):
 *             break             # <<<<<<<<<<<<<<
 *         out = out * 10 + (ord(ch) - 48)
 *         pos += 1; f_size += 1
*/
      goto __pyx_L9_break;

      /* "utils.pxd":1186
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             break
 *         out = out * 10 + (ord(ch) - 48)
*/
    }

    /* "utils.pxd":1188
 *         if not is_ascii_digit(ch):
 *             break
 *         out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *         pos += 1; f_size += 1
 * 
*/
    __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

    /* "utils.pxd":1189
 *             break
 *         out = out * 10 + (ord(ch) - 48)
 *         pos += 1; f_size += 1             # <<<<<<<<<<<<<<
 * 
 *     # Compensate missing digits (pad with zeros)
*/
    __pyx_v_pos = (__pyx_v_pos + 1);
    __pyx_v_f_size = (__pyx_v_f_size + 1);
  }
  __pyx_L9_break:;

  /* "utils.pxd":1192
 * 
 *     # Compensate missing digits (pad with zeros)
 *     return scale_fraction_to_us(out, f_size)             # <<<<<<<<<<<<<<
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_scale_fraction_to_us(__pyx_v_out, __pyx_v_f_size);
  goto __pyx_L0;

  /* "utils.pxd":1155
 *     return parse_isominute(token, pos, token_len)
 * 
 * cdef inline int parse_isofraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except -2:             # <<<<<<<<<<<<<<
 *     """Parse an ISO fractional time component (fractions of a second) from a string,
 *     returns `-1` for invalid ISO fraction `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_isofraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_sf __pyx_f_7cytimes_5utils_parse_second_and_fraction(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  __pyx_t_7cytimes_5utils_sf __pyx_v_out;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  int __pyx_v_f_size;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  Py_UCS4 __pyx_v_ch;
  __pyx_t_7cytimes_5utils_sf __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1225
 *     # Validate
 *     cdef sf out
 *     if token is None:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":1226
 *     cdef sf out
 *     if token is None:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *         return out  # exit: invalid
 *     if token_len <= 0:
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1227
 *     if token is None:
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":1225
 *     # Validate
 *     cdef sf out
 *     if token is None:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  }

  /* "utils.pxd":1228
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1229
 *         return out  # exit: invalid
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1228
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
*/
  }

  /* "utils.pxd":1230
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  __pyx_t_2 = (__pyx_v_pos < 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_token_len - __pyx_v_pos) < 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1231
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *         return out  # exit: invalid
 * 
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1232
 *     if pos < 0 or token_len - pos < 1:
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid             # <<<<<<<<<<<<<<
 * 
 *     # Parse value
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":1230
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  }

  /* "utils.pxd":1236
 *     # Parse value
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         int f_size = 0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1237
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         int f_size = 0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1238
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         int f_size = 0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_size = 0;

  /* "utils.pxd":1239
 *         unsigned long long f_part = 0
 *         int f_size = 0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         Py_UCS4 ch
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1240
 *         int f_size = 0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1243
 *         Py_UCS4 ch
 * 
 *     while pos < token_len and f_size < 6:             # <<<<<<<<<<<<<<
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
*/
  while (1) {
    __pyx_t_2 = (__pyx_v_pos < __pyx_v_token_len);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_f_size < 6);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L10_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "utils.pxd":1244
 * 
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_3 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_pos); if (unlikely(__pyx_t_3 == ((Py_UCS4)-1))) __PYX_ERR(5, 1244, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_3;

    /* "utils.pxd":1245
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1246
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1247
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1246
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L13;
      }

      /* "utils.pxd":1249
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_size += 1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1250
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_size += 1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *             pos += 1
*/
        __pyx_v_f_size = (__pyx_v_f_size + 1);
      }
      __pyx_L13:;

      /* "utils.pxd":1251
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_size += 1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *             pos += 1
 *         elif ch == 46:  # '.'
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1252
 *                 f_size += 1
 *             has_digit = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "utils.pxd":1245
 *     while pos < token_len and f_size < 6:
 *         ch = str_read(token, pos)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":1253
 *             has_digit = True
 *             pos += 1
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 break
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "utils.pxd":1255
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 break             # <<<<<<<<<<<<<<
 *             has_dot = True
 *             pos += 1
*/
        goto __pyx_L9_break;

        /* "utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      }

      /* "utils.pxd":1256
 *             if has_dot:
 *                 break
 *             has_dot = True             # <<<<<<<<<<<<<<
 *             pos += 1
 *         else:
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1257
 *                 break
 *             has_dot = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         else:
 *             break
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "utils.pxd":1253
 *             has_digit = True
 *             pos += 1
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 break
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":1259
 *             pos += 1
 *         else:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     # No digits / second out of range: invalid
*/
    /*else*/ {
      goto __pyx_L9_break;
    }
    __pyx_L12:;
  }
  __pyx_L9_break:;

  /* "utils.pxd":1262
 * 
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
*/
  __pyx_t_2 = (!__pyx_v_has_digit);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_i_part > 59);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":1263
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:
 *         out.second = out.microsecond = -1             # <<<<<<<<<<<<<<
 *     # Pure integer: second only
 *     elif not has_dot:
*/
    __pyx_v_out.second = -1;
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1262
 * 
 *     # No digits / second out of range: invalid
 *     if not has_digit or i_part > 59:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
*/
    goto __pyx_L15;
  }

  /* "utils.pxd":1265
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out.second = i_part
 *         out.microsecond = -1
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1266
 *     # Pure integer: second only
 *     elif not has_dot:
 *         out.second = i_part             # <<<<<<<<<<<<<<
 *         out.microsecond = -1
 *     # Float: second & microsecond
*/
    __pyx_v_out.second = __pyx_v_i_part;

    /* "utils.pxd":1267
 *     elif not has_dot:
 *         out.second = i_part
 *         out.microsecond = -1             # <<<<<<<<<<<<<<
 *     # Float: second & microsecond
 *     else:
*/
    __pyx_v_out.microsecond = -1;

    /* "utils.pxd":1265
 *         out.second = out.microsecond = -1
 *     # Pure integer: second only
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out.second = i_part
 *         out.microsecond = -1
*/
    goto __pyx_L15;
  }

  /* "utils.pxd":1270
 *     # Float: second & microsecond
 *     else:
 *         out.second = i_part             # <<<<<<<<<<<<<<
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)
 *     return out
*/
  /*else*/ {
    __pyx_v_out.second = __pyx_v_i_part;

    /* "utils.pxd":1271
 *     else:
 *         out.second = i_part
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    __pyx_v_out.microsecond = __pyx_f_7cytimes_5utils_scale_fraction_to_us(__pyx_v_f_part, __pyx_v_f_size);
  }
  __pyx_L15:;

  /* "utils.pxd":1272
 *         out.second = i_part
 *         out.microsecond = scale_fraction_to_us(f_part, f_size)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1194
 *     return scale_fraction_to_us(out, f_size)
 * 
 * cdef inline sf parse_second_and_fraction(str token, Py_ssize_t pos, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Parse a `seconds` token with an optional fractional part into (second, microsecond) `<'struct:sf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.parse_second_and_fraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1274
 *     return out
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:             # <<<<<<<<<<<<<<
 *     """Scale a fractional time component to microseconds based on its size `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_scale_fraction_to_us(int __pyx_v_fraction, int __pyx_v_fraction_size) {
  int __pyx_r;

  /* "utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
  switch (__pyx_v_fraction_size) {
    case 6:

    /* "utils.pxd":1292
 *     """
 *     if fraction_size == 6:
 *         return fraction             # <<<<<<<<<<<<<<
 *     elif fraction_size == 5:
 *         return fraction * 10
*/
    __pyx_r = __pyx_v_fraction;
    goto __pyx_L0;

    /* "utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
    break;
    case 5:

    /* "utils.pxd":1294
 *         return fraction
 *     elif fraction_size == 5:
 *         return fraction * 10             # <<<<<<<<<<<<<<
 *     elif fraction_size == 4:
 *         return fraction * 100
*/
    __pyx_r = (__pyx_v_fraction * 10);
    goto __pyx_L0;

    /* "utils.pxd":1293
 *     if fraction_size == 6:
 *         return fraction
 *     elif fraction_size == 5:             # <<<<<<<<<<<<<<
 *         return fraction * 10
 *     elif fraction_size == 4:
*/
    break;
    case 4:

    /* "utils.pxd":1296
 *         return fraction * 10
 *     elif fraction_size == 4:
 *         return fraction * 100             # <<<<<<<<<<<<<<
 *     elif fraction_size == 3:
 *         return fraction * 1_000
*/
    __pyx_r = (__pyx_v_fraction * 0x64);
    goto __pyx_L0;

    /* "utils.pxd":1295
 *     elif fraction_size == 5:
 *         return fraction * 10
 *     elif fraction_size == 4:             # <<<<<<<<<<<<<<
 *         return fraction * 100
 *     elif fraction_size == 3:
*/
    break;
    case 3:

    /* "utils.pxd":1298
 *         return fraction * 100
 *     elif fraction_size == 3:
 *         return fraction * 1_000             # <<<<<<<<<<<<<<
 *     elif fraction_size == 2:
 *         return fraction * 10_000
*/
    __pyx_r = (__pyx_v_fraction * 0x3E8);
    goto __pyx_L0;

    /* "utils.pxd":1297
 *     elif fraction_size == 4:
 *         return fraction * 100
 *     elif fraction_size == 3:             # <<<<<<<<<<<<<<
 *         return fraction * 1_000
 *     elif fraction_size == 2:
*/
    break;
    case 2:

    /* "utils.pxd":1300
 *         return fraction * 1_000
 *     elif fraction_size == 2:
 *         return fraction * 10_000             # <<<<<<<<<<<<<<
 *     elif fraction_size == 1:
 *         return fraction * 100_000
*/
    __pyx_r = (__pyx_v_fraction * 0x2710);
    goto __pyx_L0;

    /* "utils.pxd":1299
 *     elif fraction_size == 3:
 *         return fraction * 1_000
 *     elif fraction_size == 2:             # <<<<<<<<<<<<<<
 *         return fraction * 10_000
 *     elif fraction_size == 1:
*/
    break;
    case 1:

    /* "utils.pxd":1302
 *         return fraction * 10_000
 *     elif fraction_size == 1:
 *         return fraction * 100_000             # <<<<<<<<<<<<<<
 *     else:
 *         return -1
*/
    __pyx_r = (__pyx_v_fraction * 0x186A0);
    goto __pyx_L0;

    /* "utils.pxd":1301
 *     elif fraction_size == 2:
 *         return fraction * 10_000
 *     elif fraction_size == 1:             # <<<<<<<<<<<<<<
 *         return fraction * 100_000
 *     else:
*/
    break;
    default:

    /* "utils.pxd":1304
 *         return fraction * 100_000
 *     else:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * # . slice and convert
*/
    __pyx_r = -1;
    goto __pyx_L0;
    break;
  }

  /* "utils.pxd":1274
 *     return out
 * 
 * cdef inline int scale_fraction_to_us(int fraction, int fraction_size) noexcept:             # <<<<<<<<<<<<<<
 *     """Scale a fractional time component to microseconds based on its size `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/

static CYTHON_INLINE unsigned PY_LONG_LONG __pyx_f_7cytimes_5utils_slice_to_uint(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_size, struct __pyx_opt_args_7cytimes_5utils_slice_to_uint *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_end;
  unsigned PY_LONG_LONG __pyx_v_out;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  unsigned PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slice_to_uint", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1331
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1332
 *     # Validate
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_slice_to_uint_token_cannot_be_No};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1332, __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(5, 1332, __pyx_L1_error)

    /* "utils.pxd":1331
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "utils.pxd":1333
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  __pyx_t_1 = (__pyx_v_start < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1334
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)             # <<<<<<<<<<<<<<
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_uint_start_must_be_0_in, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __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(5, 1334, __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(5, 1334, __pyx_L1_error)

    /* "utils.pxd":1333
 *     if token is None:
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  }

  /* "utils.pxd":1335
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_size <= 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1336
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_t_6 = NULL;
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_uint_size_must_be_0_ins, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1336, __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(5, 1336, __pyx_L1_error)

    /* "utils.pxd":1335
 *     if start < 0:
 *         raise ValueError("slice_to_uint: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1337
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1338
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1337
 *     if size <= 0:
 *         raise ValueError("slice_to_uint: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  }

  /* "utils.pxd":1339
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size             # <<<<<<<<<<<<<<
 *     if end > token_len:
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
*/
  __pyx_v_end = (__pyx_v_start + __pyx_v_size);

  /* "utils.pxd":1340
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  __pyx_t_1 = (__pyx_v_end > __pyx_v_token_len);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1341
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_start, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_token_len, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_slice_to_uint_out_of_range_start;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_size;
    __pyx_t_8[3] = __pyx_t_3;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_token_len;
    __pyx_t_8[5] = __pyx_t_7;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1341, __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(5, 1341, __pyx_L1_error)

    /* "utils.pxd":1340
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  }

  /* "utils.pxd":1345
 *     # Slice and convert
 *     cdef:
 *         unsigned long long out = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1349
 *         Py_UCS4 ch
 * 
 *     for i in range(start, end):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):
*/
  __pyx_t_10 = __pyx_v_end;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = __pyx_v_start; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":1350
 * 
 *     for i in range(start, end):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if not is_ascii_digit(ch):
 *             raise ValueError(
*/
    __pyx_t_13 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_13 == ((Py_UCS4)-1))) __PYX_ERR(5, 1350, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_13;

    /* "utils.pxd":1351
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
*/
    __pyx_t_1 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch));
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1352
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
*/
      __pyx_t_9 = NULL;

      /* "utils.pxd":1354
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 *         out = out * 10 + (ord(ch) - 48)
*/
      if (unlikely(__pyx_v_token == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(5, 1354, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
      __pyx_t_8[1] = __pyx_t_5;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_to_unsigned_integer_Contains_in;
      __pyx_t_8[3] = __pyx_t_3;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1353
 *         if not is_ascii_digit(ch):
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
*/
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 51 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1352, __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(5, 1352, __pyx_L1_error)

      /* "utils.pxd":1351
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if not is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Cannot convert '%s' to unsigned integer. Contains invalid character '%s' "
*/
    }

    /* "utils.pxd":1356
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
 *         out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));
  }

  /* "utils.pxd":1357
 *             )
 *         out = out * 10 + (ord(ch) - 48)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1307
 * 
 * # . slice and convert
 * cdef inline unsigned long long slice_to_uint(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to an unsigned integer `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.slice_to_uint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_slice_to_ufloat(PyObject *__pyx_v_token, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_size, struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat *__pyx_optional_args) {
  Py_ssize_t __pyx_v_token_len = ((Py_ssize_t)-1L);
  Py_ssize_t __pyx_v_end;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  double __pyx_v_f_scale;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slice_to_ufloat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_token_len = __pyx_optional_args->token_len;
    }
  }

  /* "utils.pxd":1383
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1384
 *     # Validate
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_token_cannot_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1384, __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(5, 1384, __pyx_L1_error)

    /* "utils.pxd":1383
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "utils.pxd":1385
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  __pyx_t_1 = (__pyx_v_start < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1386
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)             # <<<<<<<<<<<<<<
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
*/
    __pyx_t_3 = NULL;
    __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_start_must_be_0, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __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(5, 1386, __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(5, 1386, __pyx_L1_error)

    /* "utils.pxd":1385
 *     if token is None:
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
*/
  }

  /* "utils.pxd":1387
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  __pyx_t_1 = (__pyx_v_size <= 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1388
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_t_6 = NULL;
    __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_size_must_be_0_i, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1388, __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(5, 1388, __pyx_L1_error)

    /* "utils.pxd":1387
 *     if start < 0:
 *         raise ValueError("slice_to_ufloat: 'start' must be >= 0, instead got %d" % start)
 *     if size <= 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
*/
  }

  /* "utils.pxd":1389
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1390
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:
 *         token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
*/
    __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

    /* "utils.pxd":1389
 *     if size <= 0:
 *         raise ValueError("slice_to_ufloat: 'size' must be > 0, instead got %d" % size)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
*/
  }

  /* "utils.pxd":1391
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size             # <<<<<<<<<<<<<<
 *     if end > token_len:
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
*/
  __pyx_v_end = (__pyx_v_start + __pyx_v_size);

  /* "utils.pxd":1392
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  __pyx_t_1 = (__pyx_v_end > __pyx_v_token_len);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1393
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_start, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_token_len, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_slice_to_ufloat_out_of_range_sta;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_size;
    __pyx_t_8[3] = __pyx_t_3;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_token_len;
    __pyx_t_8[5] = __pyx_t_7;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1393, __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(5, 1393, __pyx_L1_error)

    /* "utils.pxd":1392
 *         token_len = str_len(token)
 *     cdef Py_ssize_t end = start + size
 *     if end > token_len:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: out of range (start=%d size=%d token_len=%d)" % (start, size, token_len))
 * 
*/
  }

  /* "utils.pxd":1397
 *     # Slice and convert
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1398
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         double f_scale = 1.0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1399
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_scale = 1.0;

  /* "utils.pxd":1400
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         Py_ssize_t i
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1401
 *         double f_scale = 1.0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1405
 *         Py_UCS4 ch
 * 
 *     for i in range(start, end):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_10 = __pyx_v_end;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = __pyx_v_start; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":1406
 * 
 *     for i in range(start, end):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_13 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_13 == ((Py_UCS4)-1))) __PYX_ERR(5, 1406, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_13;

    /* "utils.pxd":1407
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1408
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1409
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1408
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L11;
      }

      /* "utils.pxd":1411
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_scale *= 0.1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1412
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 46:  # '.'
*/
        __pyx_v_f_scale = (__pyx_v_f_scale * 0.1);
      }
      __pyx_L11:;

      /* "utils.pxd":1413
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1407
 *     for i in range(start, end):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":1414
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1415
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1416
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot convert '%s' to non-negative float: "
 *                     "contains more than one decimal point." % (token[start: end])
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1418
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
 *                     "contains more than one decimal point." % (token[start: end])             # <<<<<<<<<<<<<<
 *                 )
 *             has_dot = True
*/
        if (unlikely(__pyx_v_token == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(5, 1418, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_s_to_non_negative, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1416, __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(5, 1416, __pyx_L1_error)

        /* "utils.pxd":1415
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
*/
      }

      /* "utils.pxd":1420
 *                     "contains more than one decimal point." % (token[start: end])
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1414
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":1422
 *             has_dot = True
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_7 = NULL;

      /* "utils.pxd":1424
 *             raise ValueError(
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "
 *                 "at position %d." % (token[start: end], str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      if (unlikely(__pyx_v_token == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(5, 1424, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert;
      __pyx_t_8[1] = __pyx_t_9;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_to_non_negative_float_contains;
      __pyx_t_8[3] = __pyx_t_3;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_8[5] = __pyx_t_5;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1423
 *         else:
 *             raise ValueError(
 *                 "Cannot convert '%s' to non-negative float: contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token[start: end], str_chr(ch), i)
 *             )
*/
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 1423, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1422, __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(5, 1422, __pyx_L1_error)
    }
    __pyx_L10:;
  }

  /* "utils.pxd":1427
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1428
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert '%s' to non-negative float: "
 *             "no digits found." % (token[start: end])
*/
    __pyx_t_6 = NULL;

    /* "utils.pxd":1430
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
 *             "no digits found." % (token[start: end])             # <<<<<<<<<<<<<<
 *         )
 *     elif not has_dot:
*/
    if (unlikely(__pyx_v_token == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(5, 1430, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_token, __pyx_v_start, __pyx_v_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_convert_s_to_non_negative_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1428, __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(5, 1428, __pyx_L1_error)

    /* "utils.pxd":1427
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
*/
  }

  /* "utils.pxd":1432
 *             "no digits found." % (token[start: end])
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         return (<double> i_part)
 *     else:
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1433
 *         )
 *     elif not has_dot:
 *         return (<double> i_part)             # <<<<<<<<<<<<<<
 *     else:
 *         return (<double> i_part) + (<double> f_part) * f_scale
*/
    __pyx_r = ((double)__pyx_v_i_part);
    goto __pyx_L0;

    /* "utils.pxd":1432
 *             "no digits found." % (token[start: end])
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         return (<double> i_part)
 *     else:
*/
  }

  /* "utils.pxd":1435
 *         return (<double> i_part)
 *     else:
 *         return (<double> i_part) + (<double> f_part) * f_scale             # <<<<<<<<<<<<<<
 * 
 * # . parse and convert
*/
  /*else*/ {
    __pyx_r = (((double)__pyx_v_i_part) + (((double)__pyx_v_f_part) * __pyx_v_f_scale));
    goto __pyx_L0;
  }

  /* "utils.pxd":1359
 *     return out
 * 
 * cdef inline double slice_to_ufloat(str token, Py_ssize_t start, Py_ssize_t size, Py_ssize_t token_len=-1) except *:             # <<<<<<<<<<<<<<
 *     """Slice a substring from a string and convert to a non-negative double-precision float `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.slice_to_ufloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/

static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_parse_to_int(PyObject *__pyx_v_token, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_token_len;
  PY_LONG_LONG __pyx_v_out;
  int __pyx_v_has_digit;
  int __pyx_v_has_pos;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12[7];
  PyObject *__pyx_t_13 = NULL;
  PY_LONG_LONG __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_int", 0);

  /* "utils.pxd":1459
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1460
 *     # Validate
 *     if token is None:
 *         raise ValueError("parse_to_int: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_parse_to_int_token_cannot_be_Non};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1460, __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(5, 1460, __pyx_L1_error)

    /* "utils.pxd":1459
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  }

  /* "utils.pxd":1461
 *     if token is None:
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         return 0  # empty string  0
*/
  __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

  /* "utils.pxd":1462
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0  # empty string  0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1463
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
 *         return 0  # empty string  0             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":1462
 *         raise ValueError("parse_to_int: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0  # empty string  0
 * 
*/
  }

  /* "utils.pxd":1467
 *     # Slice and convert
 *     cdef:
 *         long long out = 0             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         bint has_pos = False
*/
  __pyx_v_out = 0;

  /* "utils.pxd":1468
 *     cdef:
 *         long long out = 0
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         bint has_pos = False
 *         bint neg = False
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1469
 *         long long out = 0
 *         bint has_digit = False
 *         bint has_pos = False             # <<<<<<<<<<<<<<
 *         bint neg = False
 *         Py_ssize_t i
*/
  __pyx_v_has_pos = 0;

  /* "utils.pxd":1470
 *         bint has_digit = False
 *         bint has_pos = False
 *         bint neg = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_neg = 0;

  /* "utils.pxd":1474
 *         Py_UCS4 ch
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_5 = __pyx_v_token_len;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":1475
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)
*/
    __pyx_t_8 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_8 == ((Py_UCS4)-1))) __PYX_ERR(5, 1475, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_8;

    /* "utils.pxd":1476
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1477
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 45:  # '-'
*/
      __pyx_v_out = ((__pyx_v_out * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

      /* "utils.pxd":1478
 *         if is_ascii_digit(ch):
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 45:  # '-'
 *             if has_digit:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1476
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1479
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 45);
    if (__pyx_t_1) {

      /* "utils.pxd":1480
 *             has_digit = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1481
 *         elif ch == 45:  # '-'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "negative sign found after digits." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1483
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "negative sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_negati, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1481, __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(5, 1481, __pyx_L1_error)

        /* "utils.pxd":1480
 *             has_digit = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1486
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1488
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1488, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1486, __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(5, 1486, __pyx_L1_error)

        /* "utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1490
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1491
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1493
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             neg = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1491, __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(5, 1491, __pyx_L1_error)

        /* "utils.pxd":1490
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1495
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "utils.pxd":1479
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1498
 *         elif ch == 43:  # '+'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "positive sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1500
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "positive sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_positi, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1500, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1498, __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(5, 1498, __pyx_L1_error)

        /* "utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1502
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1503
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1505
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one positive sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1505, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1503, __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(5, 1503, __pyx_L1_error)

        /* "utils.pxd":1502
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1508
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1510
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_pos = True
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_contai_2, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1508, __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(5, 1508, __pyx_L1_error)

        /* "utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "utils.pxd":1512
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1514
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "utils.pxd":1516
 *             continue
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_3 = NULL;

      /* "utils.pxd":1518
 *             raise ValueError(
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_parse;
      __pyx_t_12[1] = __pyx_t_9;
      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_to_integer_Contains_invalid_cha;
      __pyx_t_12[3] = __pyx_t_11;
      __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_12[5] = __pyx_t_10;
      __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1517
 *         else:
 *             raise ValueError(
 *                 "Cannot parse '%s' to integer. Contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token, str_chr(ch), i)
 *             )
*/
      __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 42 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
      if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1516, __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(5, 1516, __pyx_L1_error)
    }
    __pyx_L7:;
    __pyx_L5_continue:;
  }

  /* "utils.pxd":1521
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1522
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to integer: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

    /* "utils.pxd":1523
 *     if not has_digit:
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token             # <<<<<<<<<<<<<<
 *         )
 *     return -out if neg else out
*/
    __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_integer_no_dig, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1522, __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(5, 1522, __pyx_L1_error)

    /* "utils.pxd":1521
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token
*/
  }

  /* "utils.pxd":1525
 *             "Cannot parse '%s' to integer: no digits found." % token
 *         )
 *     return -out if neg else out             # <<<<<<<<<<<<<<
 * 
 * cpdef inline double parse_to_float(str token) except *:
*/
  if (__pyx_v_neg) {
    __pyx_t_14 = (-__pyx_v_out);
  } else {
    __pyx_t_14 = __pyx_v_out;
  }
  __pyx_r = __pyx_t_14;
  goto __pyx_L0;

  /* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_5utils_parse_to_int, "Parse the first numeric token from a string into a `long long` `<'int'>`.\n\n    The parser scans `token` left-to-right and **ignores any characters before the\n    first digit**. Once the first ASCII digit is encountered, it parses a base-10\n    integer consisting of:\n\n    - an optional sign (`+` or `-`) **that must appear before any digits**, and\n    - ASCII digits (`0`-`9`) for the integer part.\n\n    After at least one digit has been consumed, any non-digit character is considered\n    invalid and raises an error.\n\n    Notice overflow is not checked for the integer accumulator and may lead to\n    undefined behavior for large inputs.\n\n    :param token `<'str'>`: Input string to parse. Must not be `None`.\n    :return `<'int'>`: Parsed integer value, or `0` for empty strings.\n    :raises `<'ValueError'>`: When the input cannot be parsed as a valid integer.\n    ");
static PyMethodDef __pyx_mdef_7cytimes_5utils_1parse_to_int = {"parse_to_int", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_5utils_1parse_to_int, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_5utils_parse_to_int};
static PyObject *__pyx_pw_7cytimes_5utils_1parse_to_int(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_token = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_to_int (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_token,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1438, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1438, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_to_int", 0) < (0)) __PYX_ERR(5, 1438, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_to_int", 1, 1, 1, i); __PYX_ERR(5, 1438, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1438, __pyx_L3_error)
    }
    __pyx_v_token = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_to_int", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1438, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(5, 1438, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_5utils_parse_to_int(__pyx_self, __pyx_v_token);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_5utils_parse_to_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_int", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_to_int(__pyx_v_token, 1); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 1438, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.parse_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/

static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_parse_to_float(PyObject *__pyx_v_token, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_token_len;
  unsigned PY_LONG_LONG __pyx_v_i_part;
  unsigned PY_LONG_LONG __pyx_v_f_part;
  double __pyx_v_f_scale;
  int __pyx_v_has_dot;
  int __pyx_v_has_digit;
  int __pyx_v_has_pos;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_i;
  Py_UCS4 __pyx_v_ch;
  double __pyx_v_out;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12[7];
  PyObject *__pyx_t_13 = NULL;
  double __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_float", 0);

  /* "utils.pxd":1550
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  __pyx_t_1 = (__pyx_v_token == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1551
 *     # Validate
 *     if token is None:
 *         raise ValueError("parse_to_float: 'token' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_parse_to_float_token_cannot_be_N};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1551, __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(5, 1551, __pyx_L1_error)

    /* "utils.pxd":1550
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
*/
  }

  /* "utils.pxd":1552
 *     if token is None:
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         return 0.0  # empty string  0.0
*/
  __pyx_v_token_len = PyUnicode_GET_LENGTH(__pyx_v_token);

  /* "utils.pxd":1553
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0.0  # empty string  0.0
 * 
*/
  __pyx_t_1 = (__pyx_v_token_len <= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1554
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:
 *         return 0.0  # empty string  0.0             # <<<<<<<<<<<<<<
 * 
 *     # Slice and convert
*/
    __pyx_r = 0.0;
    goto __pyx_L0;

    /* "utils.pxd":1553
 *         raise ValueError("parse_to_float: 'token' cannot be None")
 *     cdef Py_ssize_t token_len = str_len(token)
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         return 0.0  # empty string  0.0
 * 
*/
  }

  /* "utils.pxd":1558
 *     # Slice and convert
 *     cdef:
 *         unsigned long long i_part = 0             # <<<<<<<<<<<<<<
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
*/
  __pyx_v_i_part = 0;

  /* "utils.pxd":1559
 *     cdef:
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0             # <<<<<<<<<<<<<<
 *         double f_scale = 1.0
 *         bint has_dot = False
*/
  __pyx_v_f_part = 0;

  /* "utils.pxd":1560
 *         unsigned long long i_part = 0
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         bint has_digit = False
*/
  __pyx_v_f_scale = 1.0;

  /* "utils.pxd":1561
 *         unsigned long long f_part = 0
 *         double f_scale = 1.0
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         bint has_pos = False
*/
  __pyx_v_has_dot = 0;

  /* "utils.pxd":1562
 *         double f_scale = 1.0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         bint has_pos = False
 *         bint neg = False
*/
  __pyx_v_has_digit = 0;

  /* "utils.pxd":1563
 *         bint has_dot = False
 *         bint has_digit = False
 *         bint has_pos = False             # <<<<<<<<<<<<<<
 *         bint neg = False
 *         Py_ssize_t i
*/
  __pyx_v_has_pos = 0;

  /* "utils.pxd":1564
 *         bint has_digit = False
 *         bint has_pos = False
 *         bint neg = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_neg = 0;

  /* "utils.pxd":1569
 *         double out
 * 
 *     for i in range(token_len):             # <<<<<<<<<<<<<<
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
*/
  __pyx_t_5 = __pyx_v_token_len;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":1570
 * 
 *     for i in range(token_len):
 *         ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *         if is_ascii_digit(ch):
 *             if not has_dot:
*/
    __pyx_t_8 = PyUnicode_ReadChar(__pyx_v_token, __pyx_v_i); if (unlikely(__pyx_t_8 == ((Py_UCS4)-1))) __PYX_ERR(5, 1570, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_8;

    /* "utils.pxd":1571
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
    if (__pyx_t_1) {

      /* "utils.pxd":1572
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
      __pyx_t_1 = (!__pyx_v_has_dot);
      if (__pyx_t_1) {

        /* "utils.pxd":1573
 *         if is_ascii_digit(ch):
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
*/
        __pyx_v_i_part = ((__pyx_v_i_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1572
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):
 *             if not has_dot:             # <<<<<<<<<<<<<<
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
*/
        goto __pyx_L8;
      }

      /* "utils.pxd":1575
 *                 i_part = i_part * 10 + (ord(ch) - 48)
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)             # <<<<<<<<<<<<<<
 *                 f_scale *= 0.1
 *             has_digit = True
*/
      /*else*/ {
        __pyx_v_f_part = ((__pyx_v_f_part * 10) + (__Pyx_long_cast(__pyx_v_ch) - 48));

        /* "utils.pxd":1576
 *             else:
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1             # <<<<<<<<<<<<<<
 *             has_digit = True
 *         elif ch == 46:  # '.'
*/
        __pyx_v_f_scale = (__pyx_v_f_scale * 0.1);
      }
      __pyx_L8:;

      /* "utils.pxd":1577
 *                 f_part = f_part * 10 + (ord(ch) - 48)
 *                 f_scale *= 0.1
 *             has_digit = True             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_has_digit = 1;

      /* "utils.pxd":1571
 *     for i in range(token_len):
 *         ch = str_read(token, i)
 *         if is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *             if not has_dot:
 *                 i_part = i_part * 10 + (ord(ch) - 48)
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1578
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 46);
    if (__pyx_t_1) {

      /* "utils.pxd":1579
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1580
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1582
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_dot = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1580, __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(5, 1580, __pyx_L1_error)

        /* "utils.pxd":1579
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1584
 *                     "contains more than one decimal point." % token
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         elif ch == 45:  # '-'
 *             if has_digit:
*/
      __pyx_v_has_dot = 1;

      /* "utils.pxd":1578
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1585
 *                 )
 *             has_dot = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 45);
    if (__pyx_t_1) {

      /* "utils.pxd":1586
 *             has_dot = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1587
 *         elif ch == 45:  # '-'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1589
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_dot:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_negative, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1587, __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(5, 1587, __pyx_L1_error)

        /* "utils.pxd":1586
 *             has_dot = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1591
 *                     "negative sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1592
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1594
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_negative_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1592, __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(5, 1592, __pyx_L1_error)

        /* "utils.pxd":1591
 *                     "negative sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1597
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1599
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_2, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1597, __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(5, 1597, __pyx_L1_error)

        /* "utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1601
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1602
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1604
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             neg = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1604, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1602, __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(5, 1602, __pyx_L1_error)

        /* "utils.pxd":1601
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1606
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "utils.pxd":1585
 *                 )
 *             has_dot = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "utils.pxd":1609
 *         elif ch == 43:  # '+'
 *             if has_digit:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after digits." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1611
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after digits." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_dot:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_positive, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1609, __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(5, 1609, __pyx_L1_error)

        /* "utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1613
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_dot)) {

        /* "utils.pxd":1614
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1616
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after decimal point." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if has_pos:
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_positive_2, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1614, __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(5, 1614, __pyx_L1_error)

        /* "utils.pxd":1613
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1618
 *                     "positive sign found after decimal point." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_pos)) {

        /* "utils.pxd":1619
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_9 = NULL;

        /* "utils.pxd":1621
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one positive sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             if neg:
*/
        __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_4, __pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1621, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1619, __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(5, 1619, __pyx_L1_error)

        /* "utils.pxd":1618
 *                     "positive sign found after decimal point." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "utils.pxd":1624
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

        /* "utils.pxd":1626
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token             # <<<<<<<<<<<<<<
 *                 )
 *             has_pos = True
*/
        __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_contains_3, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1624, __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(5, 1624, __pyx_L1_error)

        /* "utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "utils.pxd":1628
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "utils.pxd":1630
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "utils.pxd":1632
 *             continue
 *         else:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)
*/
    /*else*/ {
      __pyx_t_9 = NULL;

      /* "utils.pxd":1634
 *             raise ValueError(
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "
 *                 "at position %d." % (token, str_chr(ch), i)             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_token); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 1634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_parse;
      __pyx_t_12[1] = __pyx_t_3;
      __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_to_float_contains_invalid_chara;
      __pyx_t_12[3] = __pyx_t_11;
      __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_at_position;
      __pyx_t_12[5] = __pyx_t_10;
      __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

      /* "utils.pxd":1633
 *         else:
 *             raise ValueError(
 *                 "Cannot parse '%s' to float: contains invalid character '%s' "             # <<<<<<<<<<<<<<
 *                 "at position %d." % (token, str_chr(ch), i)
 *             )
*/
      __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
      if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 1633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_13};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1632, __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(5, 1632, __pyx_L1_error)
    }
    __pyx_L7:;
    __pyx_L5_continue:;
  }

  /* "utils.pxd":1637
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token
*/
  __pyx_t_1 = (!__pyx_v_has_digit);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1638
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

    /* "utils.pxd":1639
 *     if not has_digit:
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token             # <<<<<<<<<<<<<<
 *         )
 *     elif not has_dot:
*/
    __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Cannot_parse_s_to_float_no_digit, __pyx_v_token); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1638, __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(5, 1638, __pyx_L1_error)

    /* "utils.pxd":1637
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token
*/
  }

  /* "utils.pxd":1641
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out = (<double> i_part)
 *     else:
*/
  __pyx_t_1 = (!__pyx_v_has_dot);
  if (__pyx_t_1) {

    /* "utils.pxd":1642
 *         )
 *     elif not has_dot:
 *         out = (<double> i_part)             # <<<<<<<<<<<<<<
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale
*/
    __pyx_v_out = ((double)__pyx_v_i_part);

    /* "utils.pxd":1641
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out = (<double> i_part)
 *     else:
*/
    goto __pyx_L18;
  }

  /* "utils.pxd":1644
 *         out = (<double> i_part)
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale             # <<<<<<<<<<<<<<
 *     return -out if neg else out
 * 
*/
  /*else*/ {
    __pyx_v_out = (((double)__pyx_v_i_part) + (((double)__pyx_v_f_part) * __pyx_v_f_scale));
  }
  __pyx_L18:;

  /* "utils.pxd":1645
 *     else:
 *         out = (<double> i_part) + (<double> f_part) * f_scale
 *     return -out if neg else out             # <<<<<<<<<<<<<<
 * 
 * # Time -------------------------------------------------------------------------------------------------
*/
  if (__pyx_v_neg) {
    __pyx_t_14 = (-__pyx_v_out);
  } else {
    __pyx_t_14 = __pyx_v_out;
  }
  __pyx_r = __pyx_t_14;
  goto __pyx_L0;

  /* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_5utils_2parse_to_float, "Parse the first numeric token from a string into a `double` `<'float'>`.\n\n    The parser scans `token` left-to-right and **ignores any characters before the\n    first digit**. Once the first ASCII digit is encountered, it parses a decimal\n    number consisting of:\n\n    - an optional sign (`+` or `-`) **that must appear before any digits and before\n      the decimal point**, and\n    - an optional decimal point (`.`), and\n    - ASCII digits (`0`-`9`) for the integer and/or fractional part.\n\n    After at least one digit has been consumed, any non-digit character other than\n    a single decimal point is considered invalid and raises an error.\n\n    Notice overflow is not checked at both integer and fraction parts\n    and may lead to undefined behavior.\n\n    :param token `<'str'>`: Input string to parse. Must not be `None`.\n    :return `<'float'>`: Parsed floating-point value, or `0.0` for empty strings.\n    :raises `<'ValueError'>`: When the input cannot be parsed as a valid float.\n    ");
static PyMethodDef __pyx_mdef_7cytimes_5utils_3parse_to_float = {"parse_to_float", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_5utils_3parse_to_float, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_5utils_2parse_to_float};
static PyObject *__pyx_pw_7cytimes_5utils_3parse_to_float(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_token = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_to_float (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_token,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 1527, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1527, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse_to_float", 0) < (0)) __PYX_ERR(5, 1527, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse_to_float", 1, 1, 1, i); __PYX_ERR(5, 1527, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 1527, __pyx_L3_error)
    }
    __pyx_v_token = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse_to_float", 1, 1, 1, __pyx_nargs); __PYX_ERR(5, 1527, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(5, 1527, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_5utils_2parse_to_float(__pyx_self, __pyx_v_token);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_5utils_2parse_to_float(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_token) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_to_float", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_parse_to_float(__pyx_v_token, 1); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 1527, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.parse_to_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1649
 * # Time -------------------------------------------------------------------------------------------------
 * # . gmtime
 * cdef inline tm tm_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to UTC calendar time `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_gmtime(double __pyx_v_ts) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_t;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_gmtime", 0);

  /* "utils.pxd":1670
 *     """
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)             # <<<<<<<<<<<<<<
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:
*/
  __pyx_v_tic = ((time_t)floor(__pyx_v_ts));

  /* "utils.pxd":1671
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)             # <<<<<<<<<<<<<<
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
*/
  __pyx_v_t = gmtime((&__pyx_v_tic));

  /* "utils.pxd":1672
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
 * 
*/
  __pyx_t_1 = (__pyx_v_t == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1673
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)             # <<<<<<<<<<<<<<
 * 
 *     # Fix 0-based date values (and the 1900-based year).
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ts); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fail_to_convert_timestamp_s_to_U, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1673, __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(5, 1673, __pyx_L1_error)

    /* "utils.pxd":1672
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.gmtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to UTC calendar time." % ts)
 * 
*/
  }

  /* "utils.pxd":1677
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct             # <<<<<<<<<<<<<<
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
*/
  __pyx_v_out = (__pyx_v_t[0]);

  /* "utils.pxd":1678
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year             # <<<<<<<<<<<<<<
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
*/
  __pyx_v_out.tm_year = (__pyx_v_out.tm_year + 0x76C);

  /* "utils.pxd":1679
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12             # <<<<<<<<<<<<<<
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
*/
  __pyx_v_out.tm_mon = (__pyx_v_out.tm_mon + 1);

  /* "utils.pxd":1680
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  __pyx_t_1 = (__pyx_v_out.tm_sec > 59);
  if (__pyx_t_1) {

    /* "utils.pxd":1681
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59             # <<<<<<<<<<<<<<
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
*/
    __pyx_v_out.tm_sec = 59;

    /* "utils.pxd":1680
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  }

  /* "utils.pxd":1682
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)             # <<<<<<<<<<<<<<
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out
*/
  __pyx_v_out.tm_wday = __Pyx_mod_long((__pyx_v_out.tm_wday + 6), 7, 1);

  /* "utils.pxd":1683
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_yday = (__pyx_v_out.tm_yday + 1);

  /* "utils.pxd":1684
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ts_gmtime(double ts) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1649
 * # Time -------------------------------------------------------------------------------------------------
 * # . gmtime
 * cdef inline tm tm_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to UTC calendar time `<'struct:tm'>`.
 * 
*/

  /* 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("cytimes.utils.tm_gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1686
 *     return out
 * 
 * cdef inline long long ts_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to UTC seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_gmtime(double __pyx_v_ts) {
  struct tm __pyx_v_t;
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_r;
  struct tm __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1694
 *     """
 *     cdef:
 *         tm t = tm_gmtime(ts)             # <<<<<<<<<<<<<<
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1694, __pyx_L1_error)
  __pyx_v_t = __pyx_t_1;

  /* "utils.pxd":1695
 *     cdef:
 *         tm t = tm_gmtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)             # <<<<<<<<<<<<<<
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_t.tm_year, __pyx_v_t.tm_mon, __pyx_v_t.tm_mday);

  /* "utils.pxd":1696
 *         tm t = tm_gmtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour             # <<<<<<<<<<<<<<
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec
*/
  __pyx_t_2 = __pyx_v_t.tm_hour;
  __pyx_v_hh = __pyx_t_2;

  /* "utils.pxd":1697
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min             # <<<<<<<<<<<<<<
 *         long long ss = t.tm_sec
 * 
*/
  __pyx_t_2 = __pyx_v_t.tm_min;
  __pyx_v_mi = __pyx_t_2;

  /* "utils.pxd":1698
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec             # <<<<<<<<<<<<<<
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2 = __pyx_v_t.tm_sec;
  __pyx_v_ss = __pyx_t_2;

  /* "utils.pxd":1700
 *         long long ss = t.tm_sec
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 * # . localtime
*/
  __pyx_r = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
  goto __pyx_L0;

  /* "utils.pxd":1686
 *     return out
 * 
 * cdef inline long long ts_gmtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to UTC seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.ts_gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1703
 * 
 * # . localtime
 * cdef inline tm tm_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to local calendar time `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_localtime(double __pyx_v_ts) {
  time_t __pyx_v_tic;
  struct tm *__pyx_v_t;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_localtime", 0);

  /* "utils.pxd":1724
 *     """
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)             # <<<<<<<<<<<<<<
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:
*/
  __pyx_v_tic = ((time_t)floor(__pyx_v_ts));

  /* "utils.pxd":1725
 *     cdef:
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)             # <<<<<<<<<<<<<<
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
*/
  __pyx_v_t = localtime((&__pyx_v_tic));

  /* "utils.pxd":1726
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
 * 
*/
  __pyx_t_1 = (__pyx_v_t == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1727
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)             # <<<<<<<<<<<<<<
 * 
 *     # Fix 0-based date values (and the 1900-based year).
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ts); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fail_to_convert_timestamp_s_to_l, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 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(5, 1727, __pyx_L1_error)

    /* "utils.pxd":1726
 *         time.time_t tic = <time.time_t> math.floor(ts)
 *         tm* t = time.localtime(&tic)
 *     if t is NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Fail to convert timestamp '%s' to local calendar time." % ts)
 * 
*/
  }

  /* "utils.pxd":1731
 *     # Fix 0-based date values (and the 1900-based year).
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct             # <<<<<<<<<<<<<<
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
*/
  __pyx_v_out = (__pyx_v_t[0]);

  /* "utils.pxd":1732
 *     # See tmtotuple() in https://github.com/python/cpython/blob/master/Modules/timemodule.c
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year             # <<<<<<<<<<<<<<
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
*/
  __pyx_v_out.tm_year = (__pyx_v_out.tm_year + 0x76C);

  /* "utils.pxd":1733
 *     cdef tm out = t[0]                   # copy struct
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12             # <<<<<<<<<<<<<<
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
*/
  __pyx_v_out.tm_mon = (__pyx_v_out.tm_mon + 1);

  /* "utils.pxd":1734
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  __pyx_t_1 = (__pyx_v_out.tm_sec > 59);
  if (__pyx_t_1) {

    /* "utils.pxd":1735
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59             # <<<<<<<<<<<<<<
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
*/
    __pyx_v_out.tm_sec = 59;

    /* "utils.pxd":1734
 *     out.tm_year += 1900                  # years since 1900  Gregorian absolute year
 *     out.tm_mon += 1                      # 0..11 (0-based month)  1..12
 *     if out.tm_sec > 59:                  # clamp leap seconds             # <<<<<<<<<<<<<<
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
*/
  }

  /* "utils.pxd":1736
 *     if out.tm_sec > 59:                  # clamp leap seconds
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)             # <<<<<<<<<<<<<<
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out
*/
  __pyx_v_out.tm_wday = __Pyx_mod_long((__pyx_v_out.tm_wday + 6), 7, 1);

  /* "utils.pxd":1737
 *         out.tm_sec = 59
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_yday = (__pyx_v_out.tm_yday + 1);

  /* "utils.pxd":1738
 *     out.tm_wday = (out.tm_wday + 6) % 7  # 0..6 (Sun..Sat)  0..6 (Mon..Sun)
 *     out.tm_yday += 1                     # 0..365 (0-based day of year)  1..366
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ts_localtime(double ts) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1703
 * 
 * # . localtime
 * cdef inline tm tm_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a Unix timestamp to local calendar time `<'struct:tm'>`.
 * 
*/

  /* 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("cytimes.utils.tm_localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1740
 *     return out
 * 
 * cdef inline long long ts_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to local seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ts_localtime(double __pyx_v_ts) {
  struct tm __pyx_v_t;
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_r;
  struct tm __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1748
 *     """
 *     cdef:
 *         tm t = tm_localtime(ts)             # <<<<<<<<<<<<<<
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_localtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 1748, __pyx_L1_error)
  __pyx_v_t = __pyx_t_1;

  /* "utils.pxd":1749
 *     cdef:
 *         tm t = tm_localtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)             # <<<<<<<<<<<<<<
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_t.tm_year, __pyx_v_t.tm_mon, __pyx_v_t.tm_mday);

  /* "utils.pxd":1750
 *         tm t = tm_localtime(ts)
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour             # <<<<<<<<<<<<<<
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec
*/
  __pyx_t_2 = __pyx_v_t.tm_hour;
  __pyx_v_hh = __pyx_t_2;

  /* "utils.pxd":1751
 *         long long ord = ymd_to_ord(t.tm_year, t.tm_mon, t.tm_mday)
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min             # <<<<<<<<<<<<<<
 *         long long ss = t.tm_sec
 * 
*/
  __pyx_t_2 = __pyx_v_t.tm_min;
  __pyx_v_mi = __pyx_t_2;

  /* "utils.pxd":1752
 *         long long hh = t.tm_hour
 *         long long mi = t.tm_min
 *         long long ss = t.tm_sec             # <<<<<<<<<<<<<<
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2 = __pyx_v_t.tm_sec;
  __pyx_v_ss = __pyx_t_2;

  /* "utils.pxd":1754
 *         long long ss = t.tm_sec
 * 
 *     return (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
  goto __pyx_L0;

  /* "utils.pxd":1740
 *     return out
 * 
 * cdef inline long long ts_localtime(double ts) except *:             # <<<<<<<<<<<<<<
 *     """Convert a timestamp to local seconds ticks since the Unix Epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.ts_localtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1757
 * 
 * # . conversion
 * cdef inline long long sec_to_us(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) to microseconds (int) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_sec_to_us(double __pyx_v_value) {
  PyObject *__pyx_v_s = 0;
  int __pyx_v_neg;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_dot;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  unsigned PY_LONG_LONG __pyx_t_9;
  PY_LONG_LONG __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sec_to_us", 0);

  /* "utils.pxd":1774
 *     ```
 *     """
 *     if not math.isfinite(value):             # <<<<<<<<<<<<<<
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)
 * 
*/
  __pyx_t_1 = (!isfinite(__pyx_v_value));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1775
 *     """
 *     if not math.isfinite(value):
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Seconds_value_must_be_finite_got, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1775, __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(5, 1775, __pyx_L1_error)

    /* "utils.pxd":1774
 *     ```
 *     """
 *     if not math.isfinite(value):             # <<<<<<<<<<<<<<
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)
 * 
*/
  }

  /* "utils.pxd":1778
 * 
 *     cdef:
 *         str s = "%.7f" % value             # <<<<<<<<<<<<<<
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0
*/
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_7f, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_s = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "utils.pxd":1779
 *     cdef:
 *         str s = "%.7f" % value
 *         bint neg = str_read(s, 0) == "-"             # <<<<<<<<<<<<<<
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8
*/
  __pyx_t_7 = PyUnicode_ReadChar(__pyx_v_s, 0); if (unlikely(__pyx_t_7 == ((Py_UCS4)-1))) __PYX_ERR(5, 1779, __pyx_L1_error)
  __pyx_v_neg = (__pyx_t_7 == 45);

  /* "utils.pxd":1780
 *         str s = "%.7f" % value
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)
*/
  if (__pyx_v_neg) {
    __pyx_t_8 = 1;
  } else {
    __pyx_t_8 = 0;
  }
  __pyx_v_start = __pyx_t_8;

  /* "utils.pxd":1781
 *         bint neg = str_read(s, 0) == "-"
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8             # <<<<<<<<<<<<<<
 *         long long sec = slice_to_uint(s, start, dot - start)
 *         long long us = slice_to_uint(s, dot + 1, 6)
*/
  __pyx_v_dot = (PyUnicode_GET_LENGTH(__pyx_v_s) - 8);

  /* "utils.pxd":1782
 *         Py_ssize_t start = 1 if neg else 0
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)             # <<<<<<<<<<<<<<
 *         long long us = slice_to_uint(s, dot + 1, 6)
 * 
*/
  __pyx_t_9 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_v_s, __pyx_v_start, (__pyx_v_dot - __pyx_v_start), NULL); if (unlikely(__pyx_t_9 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(5, 1782, __pyx_L1_error)
  __pyx_v_sec = __pyx_t_9;

  /* "utils.pxd":1783
 *         Py_ssize_t dot = str_len(s) - 8
 *         long long sec = slice_to_uint(s, start, dot - start)
 *         long long us = slice_to_uint(s, dot + 1, 6)             # <<<<<<<<<<<<<<
 * 
 *     us = sec * US_SECOND + us
*/
  __pyx_t_9 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_v_s, (__pyx_v_dot + 1), 6, NULL); if (unlikely(__pyx_t_9 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(5, 1783, __pyx_L1_error)
  __pyx_v_us = __pyx_t_9;

  /* "utils.pxd":1785
 *         long long us = slice_to_uint(s, dot + 1, 6)
 * 
 *     us = sec * US_SECOND + us             # <<<<<<<<<<<<<<
 *     return -us if neg else us
 * 
*/
  __pyx_v_us = ((__pyx_v_sec * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_us);

  /* "utils.pxd":1786
 * 
 *     us = sec * US_SECOND + us
 *     return -us if neg else us             # <<<<<<<<<<<<<<
 * 
 * cdef inline str tm_strformat(tm t, str fmt):
*/
  if (__pyx_v_neg) {
    __pyx_t_10 = (-__pyx_v_us);
  } else {
    __pyx_t_10 = __pyx_v_us;
  }
  __pyx_r = __pyx_t_10;
  goto __pyx_L0;

  /* "utils.pxd":1757
 * 
 * # . conversion
 * cdef inline long long sec_to_us(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) to microseconds (int) `<'int'>`.
 * 
*/

  /* 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("cytimes.utils.sec_to_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1788
 *     return -us if neg else us
 * 
 * cdef inline str tm_strformat(tm t, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a calendar time `tm` using C `strftime`
 *     and return a Unicode string `<'str'>`.
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tm_strformat(struct tm __pyx_v_t, PyObject *__pyx_v_fmt) {
  char const *__pyx_v_cfmt;
  size_t __pyx_v_cap;
  size_t __pyx_v_cap_max;
  char *__pyx_v_buf;
  size_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tm_strformat", 0);

  /* "utils.pxd":1816
 *     """
 *     # Validate format
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
*/
  __pyx_t_1 = (__pyx_v_fmt == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":1817
 *     # Validate format
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")             # <<<<<<<<<<<<<<
 *     if str_len(fmt) == 0:
 *         return fmt
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_fmt_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1817, __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(5, 1817, __pyx_L1_error)

    /* "utils.pxd":1816
 *     """
 *     # Validate format
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
*/
  }

  /* "utils.pxd":1818
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *         return fmt
 * 
*/
  __pyx_t_1 = (PyUnicode_GET_LENGTH(__pyx_v_fmt) == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1819
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
 *         return fmt             # <<<<<<<<<<<<<<
 * 
 *     # Normalize fields back to POSIX conventions
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_fmt);
    __pyx_r = __pyx_v_fmt;
    goto __pyx_L0;

    /* "utils.pxd":1818
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *         return fmt
 * 
*/
  }

  /* "utils.pxd":1822
 * 
 *     # Normalize fields back to POSIX conventions
 *     t.tm_year -= 1900             # <<<<<<<<<<<<<<
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7
*/
  __pyx_v_t.tm_year = (__pyx_v_t.tm_year - 0x76C);

  /* "utils.pxd":1823
 *     # Normalize fields back to POSIX conventions
 *     t.tm_year -= 1900
 *     t.tm_mon -= 1             # <<<<<<<<<<<<<<
 *     t.tm_wday = (t.tm_wday + 1) % 7
 *     t.tm_yday -= 1
*/
  __pyx_v_t.tm_mon = (__pyx_v_t.tm_mon - 1);

  /* "utils.pxd":1824
 *     t.tm_year -= 1900
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7             # <<<<<<<<<<<<<<
 *     t.tm_yday -= 1
 * 
*/
  __pyx_v_t.tm_wday = __Pyx_mod_long((__pyx_v_t.tm_wday + 1), 7, 1);

  /* "utils.pxd":1825
 *     t.tm_mon -= 1
 *     t.tm_wday = (t.tm_wday + 1) % 7
 *     t.tm_yday -= 1             # <<<<<<<<<<<<<<
 * 
 *     # Perform strftime
*/
  __pyx_v_t.tm_yday = (__pyx_v_t.tm_yday - 1);

  /* "utils.pxd":1829
 *     # Perform strftime
 *     cdef:
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)             # <<<<<<<<<<<<<<
 *         size_t cap = <size_t> 256            # Initial buffer size
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB
*/
  __pyx_t_5 = PyUnicode_AsUTF8(__pyx_v_fmt); if (unlikely(__pyx_t_5 == ((void *)NULL))) __PYX_ERR(5, 1829, __pyx_L1_error)
  __pyx_v_cfmt = __pyx_t_5;

  /* "utils.pxd":1830
 *     cdef:
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)
 *         size_t cap = <size_t> 256            # Initial buffer size             # <<<<<<<<<<<<<<
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB
 *         char* buf
*/
  __pyx_v_cap = ((size_t)0x100);

  /* "utils.pxd":1831
 *         const char* cfmt = PyUnicode_AsUTF8(fmt)
 *         size_t cap = <size_t> 256            # Initial buffer size
 *         size_t cap_max = <size_t> (1 << 15)  # Maximum buffer size: 32 KiB             # <<<<<<<<<<<<<<
 *         char* buf
 *         size_t n
*/
  __pyx_v_cap_max = ((size_t)0x8000);

  /* "utils.pxd":1835
 *         size_t n
 * 
 *     while True:             # <<<<<<<<<<<<<<
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
*/
  while (1) {

    /* "utils.pxd":1837
 *     while True:
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)             # <<<<<<<<<<<<<<
 *         if buf == NULL:
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
*/
    __pyx_v_buf = ((char *)malloc(__pyx_v_cap));

    /* "utils.pxd":1838
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
 * 
*/
    __pyx_t_1 = (__pyx_v_buf == NULL);
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1839
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:
 *             raise MemoryError("tm_strformat: failed to allocate buffer")             # <<<<<<<<<<<<<<
 * 
 *         # Returns 0 if buffer too small (or other failure)
*/
      __pyx_t_3 = NULL;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_failed_to_allocate};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1839, __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(5, 1839, __pyx_L1_error)

      /* "utils.pxd":1838
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
 * 
*/
    }

    /* "utils.pxd":1842
 * 
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)             # <<<<<<<<<<<<<<
 *         if n > 0:
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
*/
    __pyx_v_n = strftime(__pyx_v_buf, __pyx_v_cap, __pyx_v_cfmt, (&__pyx_v_t));

    /* "utils.pxd":1843
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)
 *         if n > 0:             # <<<<<<<<<<<<<<
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
*/
    __pyx_t_1 = (__pyx_v_n > 0);
    if (__pyx_t_1) {

      /* "utils.pxd":1845
 *         if n > 0:
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:             # <<<<<<<<<<<<<<
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)
 *             finally:
*/
      /*try:*/ {

        /* "utils.pxd":1846
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)             # <<<<<<<<<<<<<<
 *             finally:
 *                 stdlib.free(buf)
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_buf, __pyx_v_n, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1846, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L11_return;
      }

      /* "utils.pxd":1848
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)
 *             finally:
 *                 stdlib.free(buf)             # <<<<<<<<<<<<<<
 * 
 *         # Retry with larger buffer
*/
      /*finally:*/ {
        __pyx_L12_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
          {
            free(__pyx_v_buf);
          }
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
          goto __pyx_L1_error;
        }
        __pyx_L11_return: {
          __pyx_t_15 = __pyx_r;
          __pyx_r = 0;
          free(__pyx_v_buf);
          __pyx_r = __pyx_t_15;
          __pyx_t_15 = 0;
          goto __pyx_L0;
        }
      }

      /* "utils.pxd":1843
 *         # Returns 0 if buffer too small (or other failure)
 *         n = time.strftime(buf, cap, cfmt, &t)
 *         if n > 0:             # <<<<<<<<<<<<<<
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:
*/
    }

    /* "utils.pxd":1851
 * 
 *         # Retry with larger buffer
 *         stdlib.free(buf)             # <<<<<<<<<<<<<<
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
*/
    free(__pyx_v_buf);

    /* "utils.pxd":1852
 *         # Retry with larger buffer
 *         stdlib.free(buf)
 *         if cap >= cap_max:             # <<<<<<<<<<<<<<
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1
*/
    __pyx_t_1 = (__pyx_v_cap >= __pyx_v_cap_max);
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":1853
 *         stdlib.free(buf)
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")             # <<<<<<<<<<<<<<
 *         cap <<= 1
 * 
*/
      __pyx_t_3 = NULL;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_tm_strformat_expanded_output_exc};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_OverflowError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1853, __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(5, 1853, __pyx_L1_error)

      /* "utils.pxd":1852
 *         # Retry with larger buffer
 *         stdlib.free(buf)
 *         if cap >= cap_max:             # <<<<<<<<<<<<<<
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1
*/
    }

    /* "utils.pxd":1854
 *         if cap >= cap_max:
 *             raise OverflowError("tm_strformat: expanded output exceeds buffer limit")
 *         cap <<= 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:
*/
    __pyx_v_cap = (__pyx_v_cap << 1);
  }

  /* "utils.pxd":1788
 *     return -us if neg else us
 * 
 * cdef inline str tm_strformat(tm t, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a calendar time `tm` using C `strftime`
 *     and return a Unicode string `<'str'>`.
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.tm_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":1856
 *         cap <<= 1
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microseconds since the Unix epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_ord;
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1880
 *     with cython.cdivision(True):
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":1881
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1882
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":1881
 *         # Y/M/D from ordinal
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
*/
  }

  /* "utils.pxd":1883
 *         if r < 0:
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY             # <<<<<<<<<<<<<<
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
  __pyx_v_ord = (__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY);

  /* "utils.pxd":1884
 *             q -= 1; r += US_DAY
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)             # <<<<<<<<<<<<<<
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_ord);

  /* "utils.pxd":1885
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_t_3 = __pyx_v__ymd.month;
  __pyx_t_4 = __pyx_v__ymd.day;
  __pyx_v_yy = __pyx_t_2;
  __pyx_v_mm = __pyx_t_3;
  __pyx_v_dd = __pyx_t_4;

  /* "utils.pxd":1888
 * 
 *         # Time-of-day
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE
 *         out.tm_sec  = r / US_SECOND
*/
  __pyx_v_out.tm_hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1888, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":1889
 *         # Time-of-day
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         out.tm_sec  = r / US_SECOND
 * 
*/
  __pyx_v_out.tm_min = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1889, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":1890
 *         out.tm_hour = r / US_HOUR;   r %= US_HOUR
 *         out.tm_min  = r / US_MINUTE; r %= US_MINUTE
 *         out.tm_sec  = r / US_SECOND             # <<<<<<<<<<<<<<
 * 
 *         # Weekday
*/
  __pyx_v_out.tm_sec = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":1893
 * 
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday             # <<<<<<<<<<<<<<
 *         out.tm_wday = r + 7 if r < 0 else r
 * 
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":1894
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday
 *         out.tm_wday = r + 7 if r < 0 else r             # <<<<<<<<<<<<<<
 * 
 *     # Remaining tm fields
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_5 = (__pyx_v_r + 7);
  } else {
    __pyx_t_5 = __pyx_v_r;
  }
  __pyx_v_out.tm_wday = __pyx_t_5;

  /* "utils.pxd":1897
 * 
 *     # Remaining tm fields
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":1898
 *     # Remaining tm fields
 *     out.tm_year = yy
 *     out.tm_mon  = mm             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":1899
 *     out.tm_year = yy
 *     out.tm_mon  = mm
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":1900
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1  # unknown
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":1901
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":1902
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1856
 *         cap <<= 1
 * 
 * cdef inline tm tm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microseconds since the Unix epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.tm_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1904
 *     return out
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert from seconds (float) epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_fr_sec(double __pyx_v_value) {
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_ord;
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1921
 *     """
 *     cdef:
 *         long long sec = <long long> math.floor(value)             # <<<<<<<<<<<<<<
 *         long long q, r, ord
 *         int yy, mm, dd
*/
  __pyx_v_sec = ((PY_LONG_LONG)floor(__pyx_v_value));

  /* "utils.pxd":1929
 *     with cython.cdivision(True):
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_DAY);
  __pyx_v_r = (__pyx_v_sec % __pyx_v_7cytimes_5utils_SS_DAY);

  /* "utils.pxd":1930
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *             r += SS_DAY
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1931
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":1932
 *         if r < 0:
 *             q -= 1
 *             r += SS_DAY             # <<<<<<<<<<<<<<
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_SS_DAY);

    /* "utils.pxd":1930
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *             r += SS_DAY
*/
  }

  /* "utils.pxd":1933
 *             q -= 1
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY             # <<<<<<<<<<<<<<
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
  __pyx_v_ord = (__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY);

  /* "utils.pxd":1934
 *             r += SS_DAY
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)             # <<<<<<<<<<<<<<
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_ord);

  /* "utils.pxd":1935
 *         ord = q + EPOCH_DAY
 *         _ymd = ymd_fr_ord(ord)
 *         yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_t_3 = __pyx_v__ymd.month;
  __pyx_t_4 = __pyx_v__ymd.day;
  __pyx_v_yy = __pyx_t_2;
  __pyx_v_mm = __pyx_t_3;
  __pyx_v_dd = __pyx_t_4;

  /* "utils.pxd":1938
 * 
 *         # Time-of-day
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR             # <<<<<<<<<<<<<<
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE
 *         out.tm_sec  = r
*/
  __pyx_v_out.tm_hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1938, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":1939
 *         # Time-of-day
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE             # <<<<<<<<<<<<<<
 *         out.tm_sec  = r
 * 
*/
  __pyx_v_out.tm_min = (__pyx_v_r / __pyx_v_7cytimes_5utils_SS_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1939, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_SS_MINUTE, 0);

  /* "utils.pxd":1940
 *         out.tm_hour = r / SS_HOUR;   r %= SS_HOUR
 *         out.tm_min  = r / SS_MINUTE; r %= SS_MINUTE
 *         out.tm_sec  = r             # <<<<<<<<<<<<<<
 * 
 *         # Weekday
*/
  __pyx_v_out.tm_sec = __pyx_v_r;

  /* "utils.pxd":1943
 * 
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday             # <<<<<<<<<<<<<<
 *         out.tm_wday = r + 7 if r < 0 else r
 * 
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":1944
 *         # Weekday
 *         r = (ord - 1) % 7  # 0=Monday
 *         out.tm_wday = r + 7 if r < 0 else r             # <<<<<<<<<<<<<<
 * 
 *     # Remaining tm fields
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {
    __pyx_t_5 = (__pyx_v_r + 7);
  } else {
    __pyx_t_5 = __pyx_v_r;
  }
  __pyx_v_out.tm_wday = __pyx_t_5;

  /* "utils.pxd":1947
 * 
 *     # Remaining tm fields
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":1948
 *     # Remaining tm fields
 *     out.tm_year = yy
 *     out.tm_mon  = mm             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":1949
 *     out.tm_year = yy
 *     out.tm_mon  = mm
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":1950
 *     out.tm_mon  = mm
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1  # unknown
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":1951
 *     out.tm_mday = dd
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":1952
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1  # unknown
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1904
 *     return out
 * 
 * cdef inline tm tm_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert from seconds (float) epoch to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.tm_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1954
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from microsecond ticks since epoch `<'struct:hmsf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_hmsf __pyx_v_out;
  __pyx_t_7cytimes_5utils_hmsf __pyx_r;
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":1971
 *     with cython.cdivision(True):
 *         # Hour
 *         r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += US_DAY
*/
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":1972
 *         # Hour
 *         r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":1973
 *         r = value % US_DAY
 *         if r < 0:
 *             r += US_DAY             # <<<<<<<<<<<<<<
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         # Minute
*/
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":1972
 *         # Hour
 *         r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
*/
  }

  /* "utils.pxd":1974
 *         if r < 0:
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         # Minute
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
*/
  __pyx_v_out.hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1974, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":1976
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         # Minute
 *         out.minute = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         # Second
 *         out.second = r / US_SECOND; r %= US_SECOND
*/
  __pyx_v_out.minute = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1976, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":1978
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         # Second
 *         out.second = r / US_SECOND; r %= US_SECOND             # <<<<<<<<<<<<<<
 *         # Microsecond
 *         out.microsecond = r
*/
  __pyx_v_out.second = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);
  if (unlikely(__pyx_v_7cytimes_5utils_US_SECOND == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 1978, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_SECOND, 0);

  /* "utils.pxd":1980
 *         out.second = r / US_SECOND; r %= US_SECOND
 *         # Microsecond
 *         out.microsecond = r             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
  __pyx_v_out.microsecond = __pyx_v_r;

  /* "utils.pxd":1982
 *         out.microsecond = r
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":1954
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from microsecond ticks since epoch `<'struct:hmsf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.hmsf_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1984
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from seconds (float) since epoch `<'struct:hmsf'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_sec(double __pyx_v_value) {
  __pyx_t_7cytimes_5utils_hmsf __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":1995
 *         - hmsf.microsecond [0..999_999].
 *     """
 *     return hmsf_fr_us(sec_to_us(value))             # <<<<<<<<<<<<<<
 * 
 * # Calendar ---------------------------------------------------------------------------------------------
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 1995, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":1984
 *     return out
 * 
 * cdef inline hmsf hmsf_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Extract time-of-day from seconds (float) since epoch `<'struct:hmsf'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.hmsf_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":1999
 * # Calendar ---------------------------------------------------------------------------------------------
 * # . year
 * cdef inline bint is_leap_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a leap year under
 *     the proleptic Gregorian rules `<'bool'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_leap_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2007
 *     """
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:             # <<<<<<<<<<<<<<
 *             return False
 *         if (year % 100) != 0:
*/
  __pyx_t_1 = ((__pyx_v_year % 4) != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2008
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:
 *             return False             # <<<<<<<<<<<<<<
 *         if (year % 100) != 0:
 *             return True
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2007
 *     """
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:             # <<<<<<<<<<<<<<
 *             return False
 *         if (year % 100) != 0:
*/
  }

  /* "utils.pxd":2009
 *         if (year % 4) != 0:
 *             return False
 *         if (year % 100) != 0:             # <<<<<<<<<<<<<<
 *             return True
 *         return (year % 400) == 0
*/
  __pyx_t_1 = ((__pyx_v_year % 0x64) != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2010
 *             return False
 *         if (year % 100) != 0:
 *             return True             # <<<<<<<<<<<<<<
 *         return (year % 400) == 0
 * 
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":2009
 *         if (year % 4) != 0:
 *             return False
 *         if (year % 100) != 0:             # <<<<<<<<<<<<<<
 *             return True
 *         return (year % 400) == 0
*/
  }

  /* "utils.pxd":2011
 *         if (year % 100) != 0:
 *             return True
 *         return (year % 400) == 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:
*/
  __pyx_r = ((__pyx_v_year % 0x190) == 0);
  goto __pyx_L0;

  /* "utils.pxd":1999
 * # Calendar ---------------------------------------------------------------------------------------------
 * # . year
 * cdef inline bint is_leap_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a leap year under
 *     the proleptic Gregorian rules `<'bool'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2013
 *         return (year % 400) == 0
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a long year (has ISO week 53)
 *     under the proleptic Gregorian rules `<'bool'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_long_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_v_wkd;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2023
 *     :returns `<'bool'>`: True if `year` is a long year, else False.
 *     """
 *     cdef int wkd = ymd_weekday(year, 1, 1)             # <<<<<<<<<<<<<<
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
*/
  __pyx_v_wkd = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_year, 1, 1);

  /* "utils.pxd":2024
 *     """
 *     cdef int wkd = ymd_weekday(year, 1, 1)
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:
*/
  __pyx_t_2 = (__pyx_v_wkd == 3);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_wkd == 2);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":2013
 *         return (year % 400) == 0
 * 
 * cdef inline bint is_long_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine whether `year` is a long year (has ISO week 53)
 *     under the proleptic Gregorian rules `<'bool'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2026
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Count leap years between `year` and `0001-01-01` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leap_years(PY_LONG_LONG __pyx_v_year, int __pyx_v_inclusive) {
  PY_LONG_LONG __pyx_v_yy;
  PY_LONG_LONG __pyx_v_q4;
  PY_LONG_LONG __pyx_v_q100;
  PY_LONG_LONG __pyx_v_q400;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_out;
  PY_LONG_LONG __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;

  /* "utils.pxd":2040
 *     """
 *     cdef:
 *         long long yy = year if inclusive else year - 1             # <<<<<<<<<<<<<<
 *         long long q4, q100, q400, r
 *         long long out
*/
  if (__pyx_v_inclusive) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = (__pyx_v_year - 1);
  }
  __pyx_v_yy = __pyx_t_1;

  /* "utils.pxd":2046
 *     with cython.cdivision(True):
 *         # Positive
 *         if yy >= 0:             # <<<<<<<<<<<<<<
 *             out = (yy // 4) - (yy // 100) + (yy // 400)
 * 
*/
  __pyx_t_2 = (__pyx_v_yy >= 0);
  if (__pyx_t_2) {

    /* "utils.pxd":2047
 *         # Positive
 *         if yy >= 0:
 *             out = (yy // 4) - (yy // 100) + (yy // 400)             # <<<<<<<<<<<<<<
 * 
 *         # Negative
*/
    __pyx_v_out = (((__pyx_v_yy / 4) - (__pyx_v_yy / 0x64)) + (__pyx_v_yy / 0x190));

    /* "utils.pxd":2046
 *     with cython.cdivision(True):
 *         # Positive
 *         if yy >= 0:             # <<<<<<<<<<<<<<
 *             out = (yy // 4) - (yy // 100) + (yy // 400)
 * 
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2052
 *         else:
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q4 -= 1
*/
  /*else*/ {
    __pyx_t_1 = (__pyx_v_yy / 4);
    __pyx_t_3 = (__pyx_v_yy % 4);
    __pyx_v_q4 = __pyx_t_1;
    __pyx_v_r = __pyx_t_3;

    /* "utils.pxd":2053
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q4 -= 1
 *             # floor(yy / 100)
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2054
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:
 *                 q4 -= 1             # <<<<<<<<<<<<<<
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
*/
      __pyx_v_q4 = (__pyx_v_q4 - 1);

      /* "utils.pxd":2053
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q4 -= 1
 *             # floor(yy / 100)
*/
    }

    /* "utils.pxd":2056
 *                 q4 -= 1
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q100 -= 1
*/
    __pyx_t_3 = (__pyx_v_yy / 0x64);
    __pyx_t_1 = (__pyx_v_yy % 0x64);
    __pyx_v_q100 = __pyx_t_3;
    __pyx_v_r = __pyx_t_1;

    /* "utils.pxd":2057
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q100 -= 1
 *             # floor(yy / 400)
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2058
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:
 *                 q100 -= 1             # <<<<<<<<<<<<<<
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
*/
      __pyx_v_q100 = (__pyx_v_q100 - 1);

      /* "utils.pxd":2057
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q100 -= 1
 *             # floor(yy / 400)
*/
    }

    /* "utils.pxd":2060
 *                 q100 -= 1
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400             # <<<<<<<<<<<<<<
 *             if r != 0:
 *                 q400 -= 1
*/
    __pyx_t_1 = (__pyx_v_yy / 0x190);
    __pyx_t_3 = (__pyx_v_yy % 0x190);
    __pyx_v_q400 = __pyx_t_1;
    __pyx_v_r = __pyx_t_3;

    /* "utils.pxd":2061
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q400 -= 1
 *             out = q4 - q100 + q400
*/
    __pyx_t_2 = (__pyx_v_r != 0);
    if (__pyx_t_2) {

      /* "utils.pxd":2062
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:
 *                 q400 -= 1             # <<<<<<<<<<<<<<
 *             out = q4 - q100 + q400
 * 
*/
      __pyx_v_q400 = (__pyx_v_q400 - 1);

      /* "utils.pxd":2061
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q400 -= 1
 *             out = q4 - q100 + q400
*/
    }

    /* "utils.pxd":2063
 *             if r != 0:
 *                 q400 -= 1
 *             out = q4 - q100 + q400             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_v_out = ((__pyx_v_q4 - __pyx_v_q100) + __pyx_v_q400);
  }
  __pyx_L3:;

  /* "utils.pxd":2065
 *             out = q4 - q100 + q400
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2026
 *     return (wkd == 3) or (wkd == 2 and is_leap_year(year))
 * 
 * cdef inline long long leap_years(long long year, bint inclusive) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Count leap years between `year` and `0001-01-01` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2067
 *     return out
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the total number of Gregorian leap years between `year1` and `year2`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_leaps_bt_years(PY_LONG_LONG __pyx_v_year1, PY_LONG_LONG __pyx_v_year2) {
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2075
 *     :returns `<'int'>`: Number of leap years between the two years.
 *     """
 *     if year1 > year2:             # <<<<<<<<<<<<<<
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_year1 > __pyx_v_year2);
  if (__pyx_t_1) {

    /* "utils.pxd":2076
 *     """
 *     if year1 > year2:
 *         return leap_years(year1, False) - leap_years(year2, False)             # <<<<<<<<<<<<<<
 *     else:
 *         return leap_years(year2, False) - leap_years(year1, False)
*/
    __pyx_r = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_year1, 0) - __pyx_f_7cytimes_5utils_leap_years(__pyx_v_year2, 0));
    goto __pyx_L0;

    /* "utils.pxd":2075
 *     :returns `<'int'>`: Number of leap years between the two years.
 *     """
 *     if year1 > year2:             # <<<<<<<<<<<<<<
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
*/
  }

  /* "utils.pxd":2078
 *         return leap_years(year1, False) - leap_years(year2, False)
 *     else:
 *         return leap_years(year2, False) - leap_years(year1, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_year2, 0) - __pyx_f_7cytimes_5utils_leap_years(__pyx_v_year1, 0));
    goto __pyx_L0;
  }

  /* "utils.pxd":2067
 *     return out
 * 
 * cdef inline long long leaps_bt_years(long long year1, long long year2) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the total number of Gregorian leap years between `year1` and `year2`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2080
 *         return leap_years(year2, False) - leap_years(year1, False)
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine the number of days in `year` under the
 *     proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_year(PY_LONG_LONG __pyx_v_year) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2087
 *     :returns `<'int'>`: 366 for leap years, else 365.
 *     """
 *     return 366 if is_leap_year(year) else 365             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  if (__pyx_t_2) {
    __pyx_t_1 = 0x16E;
  } else {
    __pyx_t_1 = 0x16D;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":2080
 *         return leap_years(year2, False) - leap_years(year1, False)
 * 
 * cdef inline int days_in_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Determine the number of days in `year` under the
 *     proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2089
 *     return 366 if is_leap_year(year) else 365
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days strictly before `January 1` of `year`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_days_bf_year(PY_LONG_LONG __pyx_v_year) {
  PY_LONG_LONG __pyx_v_y0;
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2102
 *     :returns `<'int'>`: Signed count of days before Jan-1 of `year`.
 *     """
 *     cdef long long y0 = year - 1  # 0-based year             # <<<<<<<<<<<<<<
 *     return 365 * y0 + leap_years(y0, True)
 * 
*/
  __pyx_v_y0 = (__pyx_v_year - 1);

  /* "utils.pxd":2103
 *     """
 *     cdef long long y0 = year - 1  # 0-based year
 *     return 365 * y0 + leap_years(y0, True)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = ((0x16D * __pyx_v_y0) + __pyx_f_7cytimes_5utils_leap_years(__pyx_v_y0, 1));
  goto __pyx_L0;

  /* "utils.pxd":2089
 *     return 366 if is_leap_year(year) else 365
 * 
 * cdef inline long long days_bf_year(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days strictly before `January 1` of `year`
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2105
 *     return 365 * y0 + leap_years(y0, True)
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the `1-based` ordinal day-of-year for the given Y/M/D
 *     under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_year(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":2116
 *     :returns `<'int'>`: `1..365/366`  ordinal day of year (Jan-01  1).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
  __pyx_t_1 = (__pyx_v_day > 28);
  if (__pyx_t_1) {

    /* "utils.pxd":2117
 *     """
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     elif day < 1:
 *         day = 1
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_3 = __pyx_v_day;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_day = __pyx_t_4;

    /* "utils.pxd":2116
 *     :returns `<'int'>`: `1..365/366`  ordinal day of year (Jan-01  1).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2118
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_month(year, month) + day
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2119
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
 *         day = 1             # <<<<<<<<<<<<<<
 *     return days_bf_month(year, month) + day
 * 
*/
    __pyx_v_day = 1;

    /* "utils.pxd":2118
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_month(year, month) + day
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2120
 *     elif day < 1:
 *         day = 1
 *     return days_bf_month(year, month) + day             # <<<<<<<<<<<<<<
 * 
 * # . quarter
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_year, __pyx_v_month) + __pyx_v_day);
  goto __pyx_L0;

  /* "utils.pxd":2105
 *     return 365 * y0 + leap_years(y0, True)
 * 
 * cdef inline int day_of_year(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the `1-based` ordinal day-of-year for the given Y/M/D
 *     under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2123
 * 
 * # . quarter
 * cdef inline int quarter_of_month(int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the calendar quarter index (1..4) for `month`
 *     under the Gregorian calendar `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_quarter_of_month(int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2133
 *     """
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 1
 *     # Apr - Jun: Q2
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2134
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:
 *         return 1             # <<<<<<<<<<<<<<
 *     # Apr - Jun: Q2
 *     elif month < 7:
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":2133
 *     """
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 1
 *     # Apr - Jun: Q2
*/
  }

  /* "utils.pxd":2136
 *         return 1
 *     # Apr - Jun: Q2
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 2
 *     # Jul - Sep: Q3
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2137
 *     # Apr - Jun: Q2
 *     elif month < 7:
 *         return 2             # <<<<<<<<<<<<<<
 *     # Jul - Sep: Q3
 *     elif month < 10:
*/
    __pyx_r = 2;
    goto __pyx_L0;

    /* "utils.pxd":2136
 *         return 1
 *     # Apr - Jun: Q2
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 2
 *     # Jul - Sep: Q3
*/
  }

  /* "utils.pxd":2139
 *         return 2
 *     # Jul - Sep: Q3
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 3
 *     # Oct - Dec & out-of-range: Q4
*/
  __pyx_t_1 = (__pyx_v_month < 10);
  if (__pyx_t_1) {

    /* "utils.pxd":2140
 *     # Jul - Sep: Q3
 *     elif month < 10:
 *         return 3             # <<<<<<<<<<<<<<
 *     # Oct - Dec & out-of-range: Q4
 *     else:
*/
    __pyx_r = 3;
    goto __pyx_L0;

    /* "utils.pxd":2139
 *         return 2
 *     # Jul - Sep: Q3
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 3
 *     # Oct - Dec & out-of-range: Q4
*/
  }

  /* "utils.pxd":2143
 *     # Oct - Dec & out-of-range: Q4
 *     else:
 *         return 4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 4;
    goto __pyx_L0;
  }

  /* "utils.pxd":2123
 * 
 * # . quarter
 * cdef inline int quarter_of_month(int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the calendar quarter index (1..4) for `month`
 *     under the Gregorian calendar `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2145
 *         return 4
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in calendar quarter containing
 *     `month` in `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2157
 *         - Leap     [Q1=91, Q2=91, Q3=92, Q4=92]
 *     """
 *     if month < 4: # Q1             # <<<<<<<<<<<<<<
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2158
 *     """
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90             # <<<<<<<<<<<<<<
 *     elif month < 7:
 *         return 91  # Q2
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
    if (__pyx_t_1) {
      __pyx_t_2 = 91;
    } else {
      __pyx_t_2 = 90;
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":2157
 *         - Leap     [Q1=91, Q2=91, Q3=92, Q4=92]
 *     """
 *     if month < 4: # Q1             # <<<<<<<<<<<<<<
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
*/
  }

  /* "utils.pxd":2159
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 91  # Q2
 *     else:
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2160
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:
 *         return 91  # Q2             # <<<<<<<<<<<<<<
 *     else:
 *         return 92  # Q3 & Q4
*/
    __pyx_r = 91;
    goto __pyx_L0;

    /* "utils.pxd":2159
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 91  # Q2
 *     else:
*/
  }

  /* "utils.pxd":2162
 *         return 91  # Q2
 *     else:
 *         return 92  # Q3 & Q4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 92;
    goto __pyx_L0;
  }

  /* "utils.pxd":2145
 *         return 4
 * 
 * cdef inline int days_in_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in calendar quarter containing
 *     `month` in `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2164
 *         return 92  # Q3 & Q4
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of the
 *     calendar quarter containing `month` in `year` under the proleptic
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_v_leap;
  int __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2177
 *         - Leap     [Q1=0, Q2=91, Q3=182, Q4=274]
 *     """
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
*/
  __pyx_t_1 = (__pyx_v_month < 4);
  if (__pyx_t_1) {

    /* "utils.pxd":2178
 *     """
 *     if month < 4:
 *         return 0  # Q1             # <<<<<<<<<<<<<<
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2177
 *         - Leap     [Q1=0, Q2=91, Q3=182, Q4=274]
 *     """
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
*/
  }

  /* "utils.pxd":2179
 *     if month < 4:
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)             # <<<<<<<<<<<<<<
 *     if month < 7:
 *         return 90 + leap  # Q2
*/
  __pyx_v_leap = ((int)__pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year));

  /* "utils.pxd":2180
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:             # <<<<<<<<<<<<<<
 *         return 90 + leap  # Q2
 *     elif month < 10:
*/
  __pyx_t_1 = (__pyx_v_month < 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2181
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:
 *         return 90 + leap  # Q2             # <<<<<<<<<<<<<<
 *     elif month < 10:
 *         return 181 + leap # Q3
*/
    __pyx_r = (90 + __pyx_v_leap);
    goto __pyx_L0;

    /* "utils.pxd":2180
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:             # <<<<<<<<<<<<<<
 *         return 90 + leap  # Q2
 *     elif month < 10:
*/
  }

  /* "utils.pxd":2182
 *     if month < 7:
 *         return 90 + leap  # Q2
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 181 + leap # Q3
 *     else:
*/
  __pyx_t_1 = (__pyx_v_month < 10);
  if (__pyx_t_1) {

    /* "utils.pxd":2183
 *         return 90 + leap  # Q2
 *     elif month < 10:
 *         return 181 + leap # Q3             # <<<<<<<<<<<<<<
 *     else:
 *         return 273 + leap # Q4
*/
    __pyx_r = (0xB5 + __pyx_v_leap);
    goto __pyx_L0;

    /* "utils.pxd":2182
 *     if month < 7:
 *         return 90 + leap  # Q2
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 181 + leap # Q3
 *     else:
*/
  }

  /* "utils.pxd":2185
 *         return 181 + leap # Q3
 *     else:
 *         return 273 + leap # Q4             # <<<<<<<<<<<<<<
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = (0x111 + __pyx_v_leap);
    goto __pyx_L0;
  }

  /* "utils.pxd":2164
 *         return 92  # Q3 & Q4
 * 
 * cdef inline int days_bf_quarter(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of the
 *     calendar quarter containing `month` in `year` under the proleptic
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2187
 *         return 273 + leap # Q4
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days between the 1st day of the quarter and the
 *     given Y/M/D under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_day_of_quarter(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;

  /* "utils.pxd":2198
 *     :returns `<'int'>`: 0-based days since the quarter start.
 *     """
 *     return day_of_year(year, month, day) - days_bf_quarter(year, month)             # <<<<<<<<<<<<<<
 * 
 * # . month
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_day_of_year(__pyx_v_year, __pyx_v_month, __pyx_v_day) - __pyx_f_7cytimes_5utils_days_bf_quarter(__pyx_v_year, __pyx_v_month));
  goto __pyx_L0;

  /* "utils.pxd":2187
 *         return 273 + leap # Q4
 * 
 * cdef inline int day_of_quarter(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the number of days between the 1st day of the quarter and the
 *     given Y/M/D under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2201
 * 
 * # . month
 * cdef inline int days_in_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in `month` of `year` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_in_month(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2211
 *     """
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
*/
  __pyx_t_1 = (__pyx_v_month <= 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2212
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:
 *         return 31             # <<<<<<<<<<<<<<
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:
*/
    __pyx_r = 31;
    goto __pyx_L0;

    /* "utils.pxd":2211
 *     """
 *     # Month Jan(1) or out-of-range: 31 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
*/
  }

  /* "utils.pxd":2214
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:             # <<<<<<<<<<<<<<
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
*/
  __pyx_t_1 = (__pyx_v_month == 2);
  if (__pyx_t_1) {

    /* "utils.pxd":2215
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:
 *         return 29 if is_leap_year(year) else 28             # <<<<<<<<<<<<<<
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
    if (__pyx_t_1) {
      __pyx_t_2 = 29;
    } else {
      __pyx_t_2 = 28;
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":2214
 *         return 31
 *     # Month Feb(2): 28 or 29 days (leap)
 *     elif month == 2:             # <<<<<<<<<<<<<<
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
*/
  }

  /* "utils.pxd":2217
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:             # <<<<<<<<<<<<<<
 *         return 30
 *     # Other months: 31 days
*/
  switch (__pyx_v_month) {
    case 4:
    case 6:
    case 9:
    case 11:
    __pyx_t_1 = 1;
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  if (__pyx_t_1) {

    /* "utils.pxd":2218
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:
 *         return 30             # <<<<<<<<<<<<<<
 *     # Other months: 31 days
 *     else:
*/
    __pyx_r = 30;
    goto __pyx_L0;

    /* "utils.pxd":2217
 *         return 29 if is_leap_year(year) else 28
 *     # Month Apr(4), Jun(6), Sep(9), Nov(11): 30 days
 *     elif month == 4 or month == 6 or month == 9 or month == 11:             # <<<<<<<<<<<<<<
 *         return 30
 *     # Other months: 31 days
*/
  }

  /* "utils.pxd":2221
 *     # Other months: 31 days
 *     else:
 *         return 31             # <<<<<<<<<<<<<<
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:
*/
  /*else*/ {
    __pyx_r = 31;
    goto __pyx_L0;
  }

  /* "utils.pxd":2201
 * 
 * # . month
 * cdef inline int days_in_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days in `month` of `year` under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2223
 *         return 31
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of `month`
 *     in `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_days_bf_month(PY_LONG_LONG __pyx_v_year, int __pyx_v_month) {
  int __pyx_v_days;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  long __pyx_t_3;

  /* "utils.pxd":2233
 *     """
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 0
 *     # Feb(2): 31 days
*/
  __pyx_t_1 = (__pyx_v_month <= 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2234
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:
 *         return 0             # <<<<<<<<<<<<<<
 *     # Feb(2): 31 days
 *     if month == 2:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":2233
 *     """
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 0
 *     # Feb(2): 31 days
*/
  }

  /* "utils.pxd":2236
 *         return 0
 *     # Feb(2): 31 days
 *     if month == 2:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Mar(3)..Dec(12)
*/
  __pyx_t_1 = (__pyx_v_month == 2);
  if (__pyx_t_1) {

    /* "utils.pxd":2237
 *     # Feb(2): 31 days
 *     if month == 2:
 *         return 31             # <<<<<<<<<<<<<<
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334
*/
    __pyx_r = 31;
    goto __pyx_L0;

    /* "utils.pxd":2236
 *         return 0
 *     # Feb(2): 31 days
 *     if month == 2:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Mar(3)..Dec(12)
*/
  }

  /* "utils.pxd":2239
 *         return 31
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334             # <<<<<<<<<<<<<<
 *     return days + 1 if is_leap_year(year) else days
 * 
*/
  __pyx_t_1 = (__pyx_v_month < 12);
  if (__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_7cytimes_5utils_DAYS_BR_MONTH[(__pyx_v_month - 1)]);
  } else {
    __pyx_t_2 = 0x14E;
  }
  __pyx_v_days = __pyx_t_2;

  /* "utils.pxd":2240
 *     # Mar(3)..Dec(12)
 *     cdef int days = DAYS_BR_MONTH[month - 1] if month < 12 else 334
 *     return days + 1 if is_leap_year(year) else days             # <<<<<<<<<<<<<<
 * 
 * # . week
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);
  if (__pyx_t_1) {
    __pyx_t_3 = (__pyx_v_days + 1);
  } else {
    __pyx_t_3 = __pyx_v_days;
  }
  __pyx_r = __pyx_t_3;
  goto __pyx_L0;

  /* "utils.pxd":2223
 *         return 31
 * 
 * cdef inline int days_bf_month(long long year, int month) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the number of days strictly before the first day of `month`
 *     in `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2243
 * 
 * # . week
 * cdef inline int ymd_weekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the weekday for Y/M/D (`0=Mon  6=Sun`) under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_weekday(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord0;
  PY_LONG_LONG __pyx_v_r;
  int __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2254
 *     :returns `<'int'>`: Weekday number in 0..6 (Mon=0).
 *     """
 *     cdef long long ord0 = ymd_to_ord(year, month, day) - 1  # 0-based, Mon=0 at 0001-01-01             # <<<<<<<<<<<<<<
 *     cdef long long r
 *     with cython.cdivision(True):
*/
  __pyx_v_ord0 = (__pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day) - 1);

  /* "utils.pxd":2257
 *     cdef long long r
 *     with cython.cdivision(True):
 *         r = ord0 % 7             # <<<<<<<<<<<<<<
 *     return <int> (r + 7 if r < 0 else r)
 * 
*/
  __pyx_v_r = (__pyx_v_ord0 % 7);

  /* "utils.pxd":2258
 *     with cython.cdivision(True):
 *         r = ord0 % 7
 *     return <int> (r + 7 if r < 0 else r)             # <<<<<<<<<<<<<<
 * 
 * # . iso
*/
  __pyx_t_2 = (__pyx_v_r < 0);
  if (__pyx_t_2) {
    __pyx_t_1 = (__pyx_v_r + 7);
  } else {
    __pyx_t_1 = __pyx_v_r;
  }
  __pyx_r = ((int)__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":2243
 * 
 * # . week
 * cdef inline int ymd_weekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the weekday for Y/M/D (`0=Mon  6=Sun`) under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2261
 * 
 * # . iso
 * cdef inline iso ymd_isocalendar(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar from the Gregorian date Y/M/D `<'struct:iso'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_iso __pyx_f_7cytimes_5utils_ymd_isocalendar(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_iso_year;
  PY_LONG_LONG __pyx_v_iso_week;
  PY_LONG_LONG __pyx_v_iso_wday;
  PY_LONG_LONG __pyx_v_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_iso __pyx_v_out;
  __pyx_t_7cytimes_5utils_iso __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2277
 *     # Find ISO year by comparing against ISO week-1 Monday boundaries
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long iso_year, iso_week, iso_wday, w1, w1_next, r
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2278
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long iso_year, iso_week, iso_wday, w1, w1_next, r
 *         iso out
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2283
 * 
 *     # ISO year
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2284
 *     # ISO year
 *     if ord < ord_w1:
 *         iso_year = year - 1             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(iso_year)
 *     else:
*/
    __pyx_v_iso_year = (__pyx_v_year - 1);

    /* "utils.pxd":2285
 *     if ord < ord_w1:
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_v_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_iso_year);

    /* "utils.pxd":2283
 * 
 *     # ISO year
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2287
 *         w1 = iso_week1_mon_ord(iso_year)
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         if ord >= w1_next:
 *             iso_year = year + 1
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2288
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:             # <<<<<<<<<<<<<<
 *             iso_year = year + 1
 *             w1 = w1_next
*/
    __pyx_t_1 = (__pyx_v_ord >= __pyx_v_w1_next);
    if (__pyx_t_1) {

      /* "utils.pxd":2289
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:
 *             iso_year = year + 1             # <<<<<<<<<<<<<<
 *             w1 = w1_next
 *         else:
*/
      __pyx_v_iso_year = (__pyx_v_year + 1);

      /* "utils.pxd":2290
 *         if ord >= w1_next:
 *             iso_year = year + 1
 *             w1 = w1_next             # <<<<<<<<<<<<<<
 *         else:
 *             iso_year = year
*/
      __pyx_v_w1 = __pyx_v_w1_next;

      /* "utils.pxd":2288
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         if ord >= w1_next:             # <<<<<<<<<<<<<<
 *             iso_year = year + 1
 *             w1 = w1_next
*/
      goto __pyx_L4;
    }

    /* "utils.pxd":2292
 *             w1 = w1_next
 *         else:
 *             iso_year = year             # <<<<<<<<<<<<<<
 *             w1 = ord_w1
 * 
*/
    /*else*/ {
      __pyx_v_iso_year = __pyx_v_year;

      /* "utils.pxd":2293
 *         else:
 *             iso_year = year
 *             w1 = ord_w1             # <<<<<<<<<<<<<<
 * 
 *     # ISO week & weekday
*/
      __pyx_v_w1 = __pyx_v_ord_w1;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "utils.pxd":2297
 *     # ISO week & weekday
 *     with cython.cdivision(True):
 *         iso_week = (ord - w1) // 7 + 1             # <<<<<<<<<<<<<<
 *         r = (ord - 1) % 7
 *         if r < 0:
*/
  __pyx_v_iso_week = (((__pyx_v_ord - __pyx_v_w1) / 7) + 1);

  /* "utils.pxd":2298
 *     with cython.cdivision(True):
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += 7
*/
  __pyx_v_r = ((__pyx_v_ord - 1) % 7);

  /* "utils.pxd":2299
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         iso_wday = r + 1
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2300
 *         r = (ord - 1) % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         iso_wday = r + 1
 * 
*/
    __pyx_v_r = (__pyx_v_r + 7);

    /* "utils.pxd":2299
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         iso_wday = r + 1
*/
  }

  /* "utils.pxd":2301
 *         if r < 0:
 *             r += 7
 *         iso_wday = r + 1             # <<<<<<<<<<<<<<
 * 
 *     out.year = iso_year
*/
  __pyx_v_iso_wday = (__pyx_v_r + 1);

  /* "utils.pxd":2303
 *         iso_wday = r + 1
 * 
 *     out.year = iso_year             # <<<<<<<<<<<<<<
 *     out.week = iso_week
 *     out.weekday = iso_wday
*/
  __pyx_v_out.year = __pyx_v_iso_year;

  /* "utils.pxd":2304
 * 
 *     out.year = iso_year
 *     out.week = iso_week             # <<<<<<<<<<<<<<
 *     out.weekday = iso_wday
 *     return out
*/
  __pyx_v_out.week = __pyx_v_iso_week;

  /* "utils.pxd":2305
 *     out.year = iso_year
 *     out.week = iso_week
 *     out.weekday = iso_wday             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.weekday = __pyx_v_iso_wday;

  /* "utils.pxd":2306
 *     out.week = iso_week
 *     out.weekday = iso_wday
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2261
 * 
 * # . iso
 * cdef inline iso ymd_isocalendar(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar from the Gregorian date Y/M/D `<'struct:iso'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2308
 *     return out
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `year` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_isoyear(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;

  /* "utils.pxd":2319
 *     """
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long w1_next
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2320
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long w1_next
 * 
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2323
 *         long long w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         return year - 1
 *     else:
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2324
 * 
 *     if ord < ord_w1:
 *         return year - 1             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_r = (__pyx_v_year - 1);
    goto __pyx_L0;

    /* "utils.pxd":2323
 *         long long w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         return year - 1
 *     else:
*/
  }

  /* "utils.pxd":2326
 *         return year - 1
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         return year if ord < w1_next else year + 1
 * 
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2327
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         return year if ord < w1_next else year + 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:
*/
    __pyx_t_1 = (__pyx_v_ord < __pyx_v_w1_next);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_year;
    } else {
      __pyx_t_2 = (__pyx_v_year + 1);
    }
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;
  }

  /* "utils.pxd":2308
 *     return out
 * 
 * cdef inline long long ymd_isoyear(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `year` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2329
 *         return year if ord < w1_next else year + 1
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `week` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweek(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_w1;
  PY_LONG_LONG __pyx_v_w1_next;
  int __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;

  /* "utils.pxd":2340
 *     """
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)             # <<<<<<<<<<<<<<
 *         long long ord_w1 = iso_week1_mon_ord(year)
 *         long long w1, w1_next
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* "utils.pxd":2341
 *     cdef:
 *         long long ord    = ymd_to_ord(year, month, day)
 *         long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 *         long long w1, w1_next
 * 
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2344
 *         long long w1, w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_ord < __pyx_v_ord_w1);
  if (__pyx_t_1) {

    /* "utils.pxd":2345
 * 
 *     if ord < ord_w1:
 *         w1 = iso_week1_mon_ord(year - 1)             # <<<<<<<<<<<<<<
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
*/
    __pyx_v_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year - 1));

    /* "utils.pxd":2344
 *         long long w1, w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2347
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)             # <<<<<<<<<<<<<<
 *         w1 = ord_w1 if ord < w1_next else w1_next
 * 
*/
  /*else*/ {
    __pyx_v_w1_next = __pyx_f_7cytimes_5utils_iso_week1_mon_ord((__pyx_v_year + 1));

    /* "utils.pxd":2348
 *     else:
 *         w1_next = iso_week1_mon_ord(year + 1)
 *         w1 = ord_w1 if ord < w1_next else w1_next             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
    __pyx_t_1 = (__pyx_v_ord < __pyx_v_w1_next);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_ord_w1;
    } else {
      __pyx_t_2 = __pyx_v_w1_next;
    }
    __pyx_v_w1 = __pyx_t_2;
  }
  __pyx_L3:;

  /* "utils.pxd":2351
 * 
 *     with cython.cdivision(True):
 *         return (ord - w1) // 7 + 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:
*/
  __pyx_r = (((__pyx_v_ord - __pyx_v_w1) / 7) + 1);
  goto __pyx_L0;

  /* "utils.pxd":2329
 *         return year if ord < w1_next else year + 1
 * 
 * cdef inline int ymd_isoweek(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `week` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2353
 *         return (ord - w1) // 7 + 1
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `weekday` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_ymd_isoweekday(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  int __pyx_r;

  /* "utils.pxd":2363
 *     :returns `<'int'>`: The ISO calendar weekday (1=Mon...7=Sun).
 *     """
 *     return ymd_weekday(year, month, day) + 1             # <<<<<<<<<<<<<<
 * 
 * # . Y/M/D
*/
  __pyx_r = (__pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_year, __pyx_v_month, __pyx_v_day) + 1);
  goto __pyx_L0;

  /* "utils.pxd":2353
 *         return (ord - w1) // 7 + 1
 * 
 * cdef inline int ymd_isoweekday(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Compute the ISO calendar `weekday` from the Gregorian date Y/M/D `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2366
 * 
 * # . Y/M/D
 * cdef inline long long ymd_to_ord(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert a Gregorian Y/M/D to a **1-based** ordinal day under
 *     the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_ymd_to_ord(PY_LONG_LONG __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":2381
 *     :returns `<'int'>`: Ordinal day count (1-based).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
  __pyx_t_1 = (__pyx_v_day > 28);
  if (__pyx_t_1) {

    /* "utils.pxd":2382
 *     """
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     elif day < 1:
 *         day = 1
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_3 = __pyx_v_day;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_day = __pyx_t_4;

    /* "utils.pxd":2381
 *     :returns `<'int'>`: Ordinal day count (1-based).
 *     """
 *     if day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2383
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day
*/
  __pyx_t_1 = (__pyx_v_day < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2384
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:
 *         day = 1             # <<<<<<<<<<<<<<
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
*/
    __pyx_v_day = 1;

    /* "utils.pxd":2383
 *     if day > 28:
 *         day = min(day, days_in_month(year, month))
 *     elif day < 1:             # <<<<<<<<<<<<<<
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2385
 *     elif day < 1:
 *         day = 1
 *     return days_bf_year(year) + days_bf_month(year, month) + day             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:
*/
  __pyx_r = ((__pyx_f_7cytimes_5utils_days_bf_year(__pyx_v_year) + __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_year, __pyx_v_month)) + __pyx_v_day);
  goto __pyx_L0;

  /* "utils.pxd":2366
 * 
 * # . Y/M/D
 * cdef inline long long ymd_to_ord(long long year, int month, int day) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert a Gregorian Y/M/D to a **1-based** ordinal day under
 *     the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2387
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert Gregorian ordinal day to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_ord(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_n400;
  PY_LONG_LONG __pyx_v_n100;
  PY_LONG_LONG __pyx_v_n4;
  PY_LONG_LONG __pyx_v_n1;
  PY_LONG_LONG __pyx_v_yy;
  PY_LONG_LONG __pyx_v_mm;
  PY_LONG_LONG __pyx_v_days_bf;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_out;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;

  /* "utils.pxd":2401
 *         long long n, r, n400, n100, n4, n1, yy, mm, days_bf
 *         ymd out
 *     n = value - 1             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
  __pyx_v_n = (__pyx_v_value - 1);

  /* "utils.pxd":2405
 *     with cython.cdivision(True):
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             n400 -= 1; r += 146_097
*/
  __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
  __pyx_v_r = (__pyx_v_n % 0x23AB1);

  /* "utils.pxd":2406
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             n400 -= 1; r += 146_097
 *         n = r
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2407
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:
 *             n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *         n = r
 *         # Number of complete 100-year cycles within the 400-year cycle
*/
    __pyx_v_n400 = (__pyx_v_n400 - 1);
    __pyx_v_r = (__pyx_v_r + 0x23AB1);

    /* "utils.pxd":2406
 *         # Number of complete 400-year cycles
 *         n400 = n / 146_097; r = n % 146_097
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             n400 -= 1; r += 146_097
 *         n = r
*/
  }

  /* "utils.pxd":2408
 *         if r < 0:
 *             n400 -= 1; r += 146_097
 *         n = r             # <<<<<<<<<<<<<<
 *         # Number of complete 100-year cycles within the 400-year cycle
 *         n100 = n / 36_524;  n %= 36_524
*/
  __pyx_v_n = __pyx_v_r;

  /* "utils.pxd":2410
 *         n = r
 *         # Number of complete 100-year cycles within the 400-year cycle
 *         n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *         # Number of complete 4-year cycles within the 100-year cycle
 *         n4   = n / 1_461;   n %= 1_461
*/
  __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x8EAC, 1);

  /* "utils.pxd":2412
 *         n100 = n / 36_524;  n %= 36_524
 *         # Number of complete 4-year cycles within the 100-year cycle
 *         n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *         # Number of complete years within the 4-year cycle
 *         n1   = n / 365;     n %= 365
*/
  __pyx_v_n4 = (__pyx_v_n / 0x5B5);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x5B5, 1);

  /* "utils.pxd":2414
 *         n4   = n / 1_461;   n %= 1_461
 *         # Number of complete years within the 4-year cycle
 *         n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *     # We now know the year and the offset from January 1st.  Leap years are
*/
  __pyx_v_n1 = (__pyx_v_n / 0x16D);
  __pyx_v_n = __Pyx_mod_PY_LONG_LONG(__pyx_v_n, 0x16D, 1);

  /* "utils.pxd":2422
 *     # whether year is divisible by 4.  If not, then we're done -- the answer
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *     if n100 == 4 or n1 == 4:
 *         out.year, out.month, out.day = yy - 1, 12, 31
*/
  __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

  /* "utils.pxd":2423
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy - 1, 12, 31
 * 
*/
  __pyx_t_2 = (__pyx_v_n100 == 4);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_n1 == 4);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2424
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:
 *         out.year, out.month, out.day = yy - 1, 12, 31             # <<<<<<<<<<<<<<
 * 
 *     # Now the year is correct, and n is the offset from January 1.  We find
*/
    __pyx_t_3 = (__pyx_v_yy - 1);
    __pyx_t_4 = 12;
    __pyx_t_5 = 31;
    __pyx_v_out.year = __pyx_t_3;
    __pyx_v_out.month = __pyx_t_4;
    __pyx_v_out.day = __pyx_t_5;

    /* "utils.pxd":2423
 *     # is December 31 at the end of the year.
 *     yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *     if n100 == 4 or n1 == 4:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy - 1, 12, 31
 * 
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":2429
 *     # the month via an estimate that's either exact or one too large.
 *     else:
 *         mm = (n + 50) >> 5             # <<<<<<<<<<<<<<
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
*/
  /*else*/ {
    __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

    /* "utils.pxd":2430
 *     else:
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         if days_bf > n:
 *             mm -= 1
*/
    __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

    /* "utils.pxd":2431
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
*/
    __pyx_t_1 = (__pyx_v_days_bf > __pyx_v_n);
    if (__pyx_t_1) {

      /* "utils.pxd":2432
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
 *             mm -= 1             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm)
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
*/
      __pyx_v_mm = (__pyx_v_mm - 1);

      /* "utils.pxd":2433
 *         if days_bf > n:
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
 * 
*/
      __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

      /* "utils.pxd":2431
 *         mm = (n + 50) >> 5
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
*/
    }

    /* "utils.pxd":2434
 *             mm -= 1
 *             days_bf = days_bf_month(yy, mm)
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_3 = __pyx_v_yy;
    __pyx_t_6 = __pyx_v_mm;
    __pyx_t_7 = ((__pyx_v_n - __pyx_v_days_bf) + 1);
    __pyx_v_out.year = __pyx_t_3;
    __pyx_v_out.month = __pyx_t_6;
    __pyx_v_out.day = __pyx_t_7;
  }
  __pyx_L4:;

  /* "utils.pxd":2436
 *         out.year, out.month, out.day = yy, mm, n - days_bf + 1
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2387
 *     return days_bf_year(year) + days_bf_month(year, month) + day
 * 
 * cdef inline ymd ymd_fr_ord(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert Gregorian ordinal day to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2438
 *     return out
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2451
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":2452
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2453
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":2452
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  }

  /* "utils.pxd":2454
 *         if r < 0:
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2438
 *     return out
 * 
 * cdef inline ymd ymd_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2456
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_sec(double __pyx_v_value) {
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2468
 *     # Convert to ordinal
 *     cdef:
 *         long long sec = <long long> math.floor(value)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     with cython.cdivision(True):
*/
  __pyx_v_sec = ((PY_LONG_LONG)floor(__pyx_v_value));

  /* "utils.pxd":2471
 *         long long q, r
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_DAY);
  __pyx_v_r = (__pyx_v_sec % __pyx_v_7cytimes_5utils_SS_DAY);

  /* "utils.pxd":2472
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2473
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":2472
 *     with cython.cdivision(True):
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)
*/
  }

  /* "utils.pxd":2474
 *         if r < 0:
 *             q -= 1
 *     return ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2456
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_sec(double value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to Y/M/D `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2476
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from ISO calendar values
 *     (ISO year, ISO week, ISO weekday) `<'struct:ymd'>`.
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_iso(PY_LONG_LONG __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday) {
  PY_LONG_LONG __pyx_v_ord_w1;
  PY_LONG_LONG __pyx_v_days;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":2492
 *     """
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:             # <<<<<<<<<<<<<<
 *         weekday = 1
 *     elif weekday > 7:
*/
  __pyx_t_1 = (__pyx_v_weekday < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2493
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:
 *         weekday = 1             # <<<<<<<<<<<<<<
 *     elif weekday > 7:
 *         weekday = 7
*/
    __pyx_v_weekday = 1;

    /* "utils.pxd":2492
 *     """
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:             # <<<<<<<<<<<<<<
 *         weekday = 1
 *     elif weekday > 7:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  __pyx_t_1 = (__pyx_v_weekday > 7);
  if (__pyx_t_1) {

    /* "utils.pxd":2495
 *         weekday = 1
 *     elif weekday > 7:
 *         weekday = 7             # <<<<<<<<<<<<<<
 * 
 *     # Clamp week to [1..53]
*/
    __pyx_v_weekday = 7;

    /* "utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2498
 * 
 *     # Clamp week to [1..53]
 *     if week < 1:             # <<<<<<<<<<<<<<
 *         week = 1
 *     elif week > 53:
*/
  __pyx_t_1 = (__pyx_v_week < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2499
 *     # Clamp week to [1..53]
 *     if week < 1:
 *         week = 1             # <<<<<<<<<<<<<<
 *     elif week > 53:
 *         week = 53
*/
    __pyx_v_week = 1;

    /* "utils.pxd":2498
 * 
 *     # Clamp week to [1..53]
 *     if week < 1:             # <<<<<<<<<<<<<<
 *         week = 1
 *     elif week > 53:
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  __pyx_t_1 = (__pyx_v_week > 53);
  if (__pyx_t_1) {

    /* "utils.pxd":2501
 *         week = 1
 *     elif week > 53:
 *         week = 53             # <<<<<<<<<<<<<<
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
*/
    __pyx_v_week = 53;

    /* "utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":2504
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):             # <<<<<<<<<<<<<<
 *         year += 1
 *         week = 1
*/
  __pyx_t_2 = (__pyx_v_week == 53);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = (!__pyx_f_7cytimes_5utils_is_long_year(__pyx_v_year));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2505
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):
 *         year += 1             # <<<<<<<<<<<<<<
 *         week = 1
 * 
*/
    __pyx_v_year = (__pyx_v_year + 1);

    /* "utils.pxd":2506
 *     if week == 53 and not is_long_year(year):
 *         year += 1
 *         week = 1             # <<<<<<<<<<<<<<
 * 
 *     # Monday of ISO week 1 for the (possibly adjusted) ISO year
*/
    __pyx_v_week = 1;

    /* "utils.pxd":2504
 * 
 *     # Handle week 53 in a non-long ISO year by rolling into the next ISO year.
 *     if week == 53 and not is_long_year(year):             # <<<<<<<<<<<<<<
 *         year += 1
 *         week = 1
*/
  }

  /* "utils.pxd":2509
 * 
 *     # Monday of ISO week 1 for the (possibly adjusted) ISO year
 *     cdef long long ord_w1 = iso_week1_mon_ord(year)             # <<<<<<<<<<<<<<
 * 
 *     # Target ordinal: Monday of week 1 + (week-1)*7 + (weekday-1)
*/
  __pyx_v_ord_w1 = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

  /* "utils.pxd":2512
 * 
 *     # Target ordinal: Monday of week 1 + (week-1)*7 + (weekday-1)
 *     cdef long long days = (week - 1) * 7 + (weekday - 1)             # <<<<<<<<<<<<<<
 * 
 *     # Convert from ordinal to Y/M/D
*/
  __pyx_v_days = (((__pyx_v_week - 1) * 7) + (__pyx_v_weekday - 1));

  /* "utils.pxd":2515
 * 
 *     # Convert from ordinal to Y/M/D
 *     return ymd_fr_ord(ord_w1 + days)             # <<<<<<<<<<<<<<
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_ord_w1 + __pyx_v_days));
  goto __pyx_L0;

  /* "utils.pxd":2476
 *     return ymd_fr_ord(q + EPOCH_DAY)
 * 
 * cdef inline ymd ymd_fr_iso(long long year, int week, int weekday) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from ISO calendar values
 *     (ISO year, ISO week, ISO weekday) `<'struct:ymd'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2517
 *     return ymd_fr_ord(ord_w1 + days)
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from Gregorian year and day-of-year `<'struct:ymd'>`.
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_ymd __pyx_f_7cytimes_5utils_ymd_fr_doy(PY_LONG_LONG __pyx_v_year, int __pyx_v_doy) {
  int __pyx_v_leap;
  int __pyx_v_max_d;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_out;
  int __pyx_v_d_before_mar;
  int __pyx_v_d;
  int __pyx_v_m_from_mar;
  int __pyx_v_mon;
  int __pyx_v_dom;
  __pyx_t_7cytimes_5utils_ymd __pyx_r;
  int __pyx_t_1;
  PY_LONG_LONG __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  long __pyx_t_5;

  /* "utils.pxd":2530
 *     """
 *     cdef:
 *         int leap = is_leap_year(year)             # <<<<<<<<<<<<<<
 *         int max_d = 365 + leap
 *         ymd out
*/
  __pyx_v_leap = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_year);

  /* "utils.pxd":2531
 *     cdef:
 *         int leap = is_leap_year(year)
 *         int max_d = 365 + leap             # <<<<<<<<<<<<<<
 *         ymd out
 * 
*/
  __pyx_v_max_d = (0x16D + __pyx_v_leap);

  /* "utils.pxd":2535
 * 
 *     # Clamp days
 *     if doy < 1:             # <<<<<<<<<<<<<<
 *         doy = 1
 *     elif doy > max_d:
*/
  __pyx_t_1 = (__pyx_v_doy < 1);
  if (__pyx_t_1) {

    /* "utils.pxd":2536
 *     # Clamp days
 *     if doy < 1:
 *         doy = 1             # <<<<<<<<<<<<<<
 *     elif doy > max_d:
 *         doy = max_d
*/
    __pyx_v_doy = 1;

    /* "utils.pxd":2535
 * 
 *     # Clamp days
 *     if doy < 1:             # <<<<<<<<<<<<<<
 *         doy = 1
 *     elif doy > max_d:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2537
 *     if doy < 1:
 *         doy = 1
 *     elif doy > max_d:             # <<<<<<<<<<<<<<
 *         doy = max_d
 * 
*/
  __pyx_t_1 = (__pyx_v_doy > __pyx_v_max_d);
  if (__pyx_t_1) {

    /* "utils.pxd":2538
 *         doy = 1
 *     elif doy > max_d:
 *         doy = max_d             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: Jan
*/
    __pyx_v_doy = __pyx_v_max_d;

    /* "utils.pxd":2537
 *     if doy < 1:
 *         doy = 1
 *     elif doy > max_d:             # <<<<<<<<<<<<<<
 *         doy = max_d
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2541
 * 
 *     # Fast-path: Jan
 *     if doy <= 31:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 1, doy
 *         return out
*/
  __pyx_t_1 = (__pyx_v_doy <= 31);
  if (__pyx_t_1) {

    /* "utils.pxd":2542
 *     # Fast-path: Jan
 *     if doy <= 31:
 *         out.year, out.month, out.day = year, 1, doy             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_3 = 1;
    __pyx_t_4 = __pyx_v_doy;
    __pyx_v_out.year = __pyx_t_2;
    __pyx_v_out.month = __pyx_t_3;
    __pyx_v_out.day = __pyx_t_4;

    /* "utils.pxd":2543
 *     if doy <= 31:
 *         out.year, out.month, out.day = year, 1, doy
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: Feb
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":2541
 * 
 *     # Fast-path: Jan
 *     if doy <= 31:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 1, doy
 *         return out
*/
  }

  /* "utils.pxd":2546
 * 
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1             # <<<<<<<<<<<<<<
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31
*/
  __pyx_v_d_before_mar = (59 + __pyx_v_leap);

  /* "utils.pxd":2547
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out
*/
  __pyx_t_1 = (__pyx_v_doy <= __pyx_v_d_before_mar);
  if (__pyx_t_1) {

    /* "utils.pxd":2548
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_4 = 2;
    __pyx_t_5 = (__pyx_v_doy - 31);
    __pyx_v_out.year = __pyx_t_2;
    __pyx_v_out.month = __pyx_t_4;
    __pyx_v_out.day = __pyx_t_5;

    /* "utils.pxd":2549
 *     if doy <= d_before_mar:
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # March-based conversion using 153-day month blocks
*/
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":2547
 *     # Fast-path: Feb
 *     cdef int d_before_mar = 59 + leap  # days before March 1
 *     if doy <= d_before_mar:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 2, doy - 31
 *         return out
*/
  }

  /* "utils.pxd":2554
 *     # Convert to "days since March 1" (1-based -> 0-based)
 *     cdef int d, m_from_mar, mon, dom
 *     d = doy - d_before_mar - 1  # 1 => # 0..306 (0=Mar-1)             # <<<<<<<<<<<<<<
 * 
 *     with cython.cdivision(True):
*/
  __pyx_v_d = ((__pyx_v_doy - __pyx_v_d_before_mar) - 1);

  /* "utils.pxd":2558
 *     with cython.cdivision(True):
 *         # Month index from March: 0..9
 *         m_from_mar = (5 * d + 2) // 153             # <<<<<<<<<<<<<<
 *         # Day (1-based)
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1
*/
  __pyx_v_m_from_mar = (((5 * __pyx_v_d) + 2) / 0x99);

  /* "utils.pxd":2560
 *         m_from_mar = (5 * d + 2) // 153
 *         # Day (1-based)
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1             # <<<<<<<<<<<<<<
 *         # month (3..12)
 *         mon = m_from_mar + 3
*/
  __pyx_v_dom = ((__pyx_v_d - (((0x99 * __pyx_v_m_from_mar) + 2) / 5)) + 1);

  /* "utils.pxd":2562
 *         dom = d - (153 * m_from_mar + 2) // 5 + 1
 *         # month (3..12)
 *         mon = m_from_mar + 3             # <<<<<<<<<<<<<<
 * 
 *     out.year, out.month, out.day = year, mon, dom
*/
  __pyx_v_mon = (__pyx_v_m_from_mar + 3);

  /* "utils.pxd":2564
 *         mon = m_from_mar + 3
 * 
 *     out.year, out.month, out.day = year, mon, dom             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_t_2 = __pyx_v_year;
  __pyx_t_4 = __pyx_v_mon;
  __pyx_t_3 = __pyx_v_dom;
  __pyx_v_out.year = __pyx_t_2;
  __pyx_v_out.month = __pyx_t_4;
  __pyx_v_out.day = __pyx_t_3;

  /* "utils.pxd":2565
 * 
 *     out.year, out.month, out.day = year, mon, dom
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2517
 *     return ymd_fr_ord(ord_w1 + days)
 * 
 * cdef inline ymd ymd_fr_doy(long long year, int doy) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Create `struct:ymd` from Gregorian year and day-of-year `<'struct:ymd'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2567
 *     return out
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the ordinal (1-based) of the Monday starting ISO week 1
 *     of `year` under the proleptic Gregorian rules `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_iso_week1_mon_ord(PY_LONG_LONG __pyx_v_year) {
  PY_LONG_LONG __pyx_v_jan4;
  PY_LONG_LONG __pyx_v_wkd;
  PY_LONG_LONG __pyx_r;
  int __pyx_t_1;

  /* "utils.pxd":2578
 *     :returns `<'int'>`: Ordinal of the Monday starting ISO week 1.
 *     """
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4             # <<<<<<<<<<<<<<
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:
*/
  __pyx_v_jan4 = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, 1, 4);

  /* "utils.pxd":2579
 *     """
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7             # <<<<<<<<<<<<<<
 *     if wkd < 0:
 *         wkd += 7
*/
  __pyx_v_wkd = __Pyx_mod_PY_LONG_LONG((__pyx_v_jan4 - 1), 7, 1);

  /* "utils.pxd":2580
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:             # <<<<<<<<<<<<<<
 *         wkd += 7
 *     return jan4 - wkd
*/
  __pyx_t_1 = (__pyx_v_wkd < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2581
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:
 *         wkd += 7             # <<<<<<<<<<<<<<
 *     return jan4 - wkd
 * 
*/
    __pyx_v_wkd = (__pyx_v_wkd + 7);

    /* "utils.pxd":2580
 *     cdef long long jan4 = ymd_to_ord(year, 1, 4)  # ordinal of Jan 4
 *     cdef long long wkd  = (jan4 - 1) % 7
 *     if wkd < 0:             # <<<<<<<<<<<<<<
 *         wkd += 7
 *     return jan4 - wkd
*/
  }

  /* "utils.pxd":2582
 *     if wkd < 0:
 *         wkd += 7
 *     return jan4 - wkd             # <<<<<<<<<<<<<<
 * 
 * # . date & time
*/
  __pyx_r = (__pyx_v_jan4 - __pyx_v_wkd);
  goto __pyx_L0;

  /* "utils.pxd":2567
 *     return out
 * 
 * cdef inline long long iso_week1_mon_ord(long long year) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Return the ordinal (1-based) of the Monday starting ISO week 1
 *     of `year` under the proleptic Gregorian rules `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2585
 * 
 * # . date & time
 * cdef inline dtm dtm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_us(PY_LONG_LONG __pyx_v_value) {
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  __pyx_t_7cytimes_5utils_dtm __pyx_v_out;
  __pyx_t_7cytimes_5utils_dtm __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;

  /* "utils.pxd":2606
 *     with cython.cdivision(True):
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":2607
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 * 
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2608
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 * 
 *         # Date
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":2607
 *         # Split into days and remainder (mathematical floor)
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 * 
*/
  }

  /* "utils.pxd":2611
 * 
 *         # Date
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out.year  = _ymd.year
 *         out.month = _ymd.month
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_q + __pyx_v_7cytimes_5utils_EPOCH_DAY));

  /* "utils.pxd":2612
 *         # Date
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)
 *         out.year  = _ymd.year             # <<<<<<<<<<<<<<
 *         out.month = _ymd.month
 *         out.day   = _ymd.day
*/
  __pyx_t_2 = __pyx_v__ymd.year;
  __pyx_v_out.year = __pyx_t_2;

  /* "utils.pxd":2613
 *         _ymd = ymd_fr_ord(q + EPOCH_DAY)
 *         out.year  = _ymd.year
 *         out.month = _ymd.month             # <<<<<<<<<<<<<<
 *         out.day   = _ymd.day
 * 
*/
  __pyx_t_2 = __pyx_v__ymd.month;
  __pyx_v_out.month = __pyx_t_2;

  /* "utils.pxd":2614
 *         out.year  = _ymd.year
 *         out.month = _ymd.month
 *         out.day   = _ymd.day             # <<<<<<<<<<<<<<
 * 
 *         # Time-of-day
*/
  __pyx_t_2 = __pyx_v__ymd.day;
  __pyx_v_out.day = __pyx_t_2;

  /* "utils.pxd":2617
 * 
 *         # Time-of-day
 *         out.hour   = r / US_HOUR;   r %= US_HOUR             # <<<<<<<<<<<<<<
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND
*/
  __pyx_v_out.hour = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_US_HOUR == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 2617, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_HOUR, 0);

  /* "utils.pxd":2618
 *         # Time-of-day
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         out.minute = r / US_MINUTE; r %= US_MINUTE             # <<<<<<<<<<<<<<
 *         out.second = r / US_SECOND
 *         out.microsecond = r % US_SECOND
*/
  __pyx_v_out.minute = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_US_MINUTE == 0)) {
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    __PYX_ERR(5, 2618, __pyx_L1_error)
  }
  __pyx_v_r = __Pyx_mod_PY_LONG_LONG(__pyx_v_r, __pyx_v_7cytimes_5utils_US_MINUTE, 0);

  /* "utils.pxd":2619
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND             # <<<<<<<<<<<<<<
 *         out.microsecond = r % US_SECOND
 * 
*/
  __pyx_v_out.second = (__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":2620
 *         out.minute = r / US_MINUTE; r %= US_MINUTE
 *         out.second = r / US_SECOND
 *         out.microsecond = r % US_SECOND             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
  __pyx_v_out.microsecond = (__pyx_v_r % __pyx_v_7cytimes_5utils_US_SECOND);

  /* "utils.pxd":2622
 *         out.microsecond = r % US_SECOND
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2585
 * 
 * # . date & time
 * cdef inline dtm dtm_fr_us(long long value) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Convert microsecond ticks since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_WriteUnraisable("cytimes.utils.dtm_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2624
 *     return out
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

static CYTHON_INLINE __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_sec(double __pyx_v_value) {
  __pyx_t_7cytimes_5utils_dtm __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":2638
 *         - dtm.microsecond   [0..999999]
 *     """
 *     return dtm_fr_us(sec_to_us(value))             # <<<<<<<<<<<<<<
 * 
 * # . fractions
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 2638, __pyx_L1_error)
  __pyx_r = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_t_1);
  goto __pyx_L0;

  /* "utils.pxd":2624
 *     return out
 * 
 * cdef inline dtm dtm_fr_sec(double value) except *:             # <<<<<<<<<<<<<<
 *     """Convert seconds (float) since the Unix epoch to `struct:dtm` (date + time).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dtm_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2641
 * 
 * # . fractions
 * cdef inline int combine_absolute_ms_us(int ms, int us) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Combine milliseconds and microseconds into total microseconds (replacement semantics) `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_combine_absolute_ms_us(int __pyx_v_ms, int __pyx_v_us) {
  int __pyx_r;
  int __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;

  /* "utils.pxd":2660
 *     """
 *     # Valid millisecond
 *     if ms >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000
*/
  __pyx_t_1 = (__pyx_v_ms >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2662
 *     if ms >= 0:
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000             # <<<<<<<<<<<<<<
 *         # 'us' acts only as sub-ms remainder
 *         us = ms + (us % 1_000) if us > 0 else ms
*/
    __pyx_t_2 = 0x3E7;
    __pyx_t_3 = __pyx_v_ms;
    __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_4 = __pyx_t_2;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_v_ms = (__pyx_t_4 * 0x3E8);

    /* "utils.pxd":2664
 *         ms = min(ms, 999) * 1_000
 *         # 'us' acts only as sub-ms remainder
 *         us = ms + (us % 1_000) if us > 0 else ms             # <<<<<<<<<<<<<<
 * 
 *     # Valid microsecond
*/
    __pyx_t_1 = (__pyx_v_us > 0);
    if (__pyx_t_1) {
      __pyx_t_4 = (__pyx_v_ms + __Pyx_mod_long(__pyx_v_us, 0x3E8, 1));
    } else {
      __pyx_t_4 = __pyx_v_ms;
    }
    __pyx_v_us = __pyx_t_4;

    /* "utils.pxd":2660
 *     """
 *     # Valid millisecond
 *     if ms >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2667
 * 
 *     # Valid microsecond
 *     elif us >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)
*/
  __pyx_t_1 = (__pyx_v_us >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":2669
 *     elif us >= 0:
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)             # <<<<<<<<<<<<<<
 * 
 *     # Both invalid
*/
    __pyx_t_4 = 0xF423F;
    __pyx_t_3 = __pyx_v_us;
    __pyx_t_1 = (__pyx_t_4 < __pyx_t_3);
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    __pyx_v_us = __pyx_t_2;

    /* "utils.pxd":2667
 * 
 *     # Valid microsecond
 *     elif us >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2673
 *     # Both invalid
 *     else:
 *         us = -1             # <<<<<<<<<<<<<<
 * 
 *     return us
*/
  /*else*/ {
    __pyx_v_us = -1;
  }
  __pyx_L3:;

  /* "utils.pxd":2675
 *         us = -1
 * 
 *     return us             # <<<<<<<<<<<<<<
 * 
 * # datetime.date ----------------------------------------------------------------------------------------
*/
  __pyx_r = __pyx_v_us;
  goto __pyx_L0;

  /* "utils.pxd":2641
 * 
 * # . fractions
 * cdef inline int combine_absolute_ms_us(int ms, int us) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """Combine milliseconds and microseconds into total microseconds (replacement semantics) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_new(struct __pyx_opt_args_7cytimes_5utils_date_new *__pyx_optional_args) {
  int __pyx_v_year = ((int)1);
  int __pyx_v_month = ((int)1);
  int __pyx_v_day = ((int)1);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Date *__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;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15[4];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dclass = __pyx_optional_args->dclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":2690
 *     """
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:             # <<<<<<<<<<<<<<
 *         try:
 *             return dclass(year=year, month=month, day=day)
*/
  __pyx_t_2 = (__pyx_v_dclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
    {
      __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:*/ {

        /* "utils.pxd":2692
 *     if dclass is not None and dclass is not datetime.date:
 *         try:
 *             return dclass(year=year, month=month, day=day)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_dclass);
        __pyx_t_8 = __pyx_v_dclass; 
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 2692, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_year, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_month, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_day, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 2692, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(5, 2692, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Date *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 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;

      /* "utils.pxd":2693
 *         try:
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cytimes.utils.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_13) < 0) __PYX_ERR(5, 2693, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":2694
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.date_new(year, month, day)
 * 
*/
          __pyx_t_10 = NULL;
          __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_dclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_date_using_custom;
          __pyx_t_15[1] = __pyx_t_9;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_15[3] = __pyx_t_7;
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 2694, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 2694, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 2694, __pyx_L17_error)
        }

        /* "utils.pxd":2693
 *         try:
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":2691
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:
 *         try:             # <<<<<<<<<<<<<<
 *             return dclass(year=year, month=month, day=day)
 *         except Exception as err:
*/
      __pyx_L8_except_error:;
      __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_L10_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;
    }

    /* "utils.pxd":2690
 *     """
 *     # Construct date
 *     if dclass is not None and dclass is not datetime.date:             # <<<<<<<<<<<<<<
 *         try:
 *             return dclass(year=year, month=month, day=day)
*/
  }

  /* "utils.pxd":2695
 *         except Exception as err:
 *             raise ValueError("Cannot create date using custom 'dclass' %s, %s" % (dclass, err)) from err
 *     return datetime.date_new(year, month, day)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_13 = ((PyObject *)__pyx_f_7cpython_8datetime_date_new(__pyx_v_year, __pyx_v_month, __pyx_v_day)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 2695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_13);
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2679
 * # datetime.date ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.date date_new(int year=1, int month=1, int day=1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.date_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_now(struct __pyx_opt_args_7cytimes_5utils_date_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dclass = __pyx_optional_args->dclass;
      }
    }
  }

  /* "utils.pxd":2710
 *     :returns `<'datetime.date'>`: Today's date (or subclass if `dclass` is specified).
 *     """
 *     return date_fr_dt(dt_now(tzinfo, None), dclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.dclass = __pyx_v_dclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Date *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2697
 *     return datetime.date_new(year, month, day)
 * 
 * cdef inline datetime.date date_now(object tzinfo=None, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Get today's date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.date_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2713
 * 
 * # . type check
 * cdef inline bint is_date(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.date` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":2722
 *     >>> isinstance(obj, datetime.date)
 *     """
 *     return datetime.PyDate_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_date_exact(object obj) except -1:
*/
  __pyx_r = PyDate_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":2713
 * 
 * # . type check
 * cdef inline bint is_date(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.date` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2724
 *     return datetime.PyDate_Check(obj)
 * 
 * cdef inline bint is_date_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.date` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_date_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":2733
 *     >>> type(obj) is datetime.date
 *     """
 *     return datetime.PyDate_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDate_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":2724
 *     return datetime.PyDate_Check(obj)
 * 
 * cdef inline bint is_date_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.date` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2736
 * 
 * # . conversion: to
 * cdef inline str date_strformat(datetime.date date, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.date` with a strftime-style format `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_strformat(PyDateTime_Date *__pyx_v_date, PyObject *__pyx_v_fmt) {
  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_strformat", 0);

  /* "utils.pxd":2749
 *     >>> date.strftime(fmt)
 *     """
 *     return tm_strformat(date_to_tm(date), fmt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str date_isoformat(datetime.date date):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tm_strformat(__pyx_f_7cytimes_5utils_date_to_tm(__pyx_v_date), __pyx_v_fmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2736
 * 
 * # . conversion: to
 * cdef inline str date_strformat(datetime.date date, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.date` with a strftime-style format `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2751
 *     return tm_strformat(date_to_tm(date), fmt)
 * 
 * cdef inline str date_isoformat(datetime.date date):             # <<<<<<<<<<<<<<
 *     """Format `datetime.date` to the ISO-8601 calendar string `YYYY-MM-DD` `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_isoformat(PyDateTime_Date *__pyx_v_date) {
  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[5];
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_isoformat", 0);

  /* "utils.pxd":2757
 *     :returns `<'str'>`: ISO string in the form `YYYY-MM-DD`.
 *     """
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date), 4, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_t_1;
  __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u__4;
  __pyx_t_4[2] = __pyx_t_2;
  __pyx_t_4[3] = __pyx_mstate_global->__pyx_kp_u__4;
  __pyx_t_4[4] = __pyx_t_3;
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127);
  if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 2757, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2751
 *     return tm_strformat(date_to_tm(date), fmt)
 * 
 * cdef inline str date_isoformat(datetime.date date):             # <<<<<<<<<<<<<<
 *     """Format `datetime.date` to the ISO-8601 calendar string `YYYY-MM-DD` `<'str'>`.
 * 
*/

  /* 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("cytimes.utils.date_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2759
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_date_to_tm(PyDateTime_Date *__pyx_v_date) {
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  struct tm __pyx_v_out;
  struct tm __pyx_r;

  /* "utils.pxd":2776
 *     """
 *     cdef:
 *         int yy = date.year             # <<<<<<<<<<<<<<
 *         int mm = date.month
 *         int dd = date.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);

  /* "utils.pxd":2777
 *     cdef:
 *         int yy = date.year
 *         int mm = date.month             # <<<<<<<<<<<<<<
 *         int dd = date.day
 *         tm out
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);

  /* "utils.pxd":2778
 *         int yy = date.year
 *         int mm = date.month
 *         int dd = date.day             # <<<<<<<<<<<<<<
 *         tm out
 * 
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);

  /* "utils.pxd":2781
 *         tm out
 * 
 *     out.tm_sec = 0             # <<<<<<<<<<<<<<
 *     out.tm_min = 0
 *     out.tm_hour = 0
*/
  __pyx_v_out.tm_sec = 0;

  /* "utils.pxd":2782
 * 
 *     out.tm_sec = 0
 *     out.tm_min = 0             # <<<<<<<<<<<<<<
 *     out.tm_hour = 0
 *     out.tm_mday = dd
*/
  __pyx_v_out.tm_min = 0;

  /* "utils.pxd":2783
 *     out.tm_sec = 0
 *     out.tm_min = 0
 *     out.tm_hour = 0             # <<<<<<<<<<<<<<
 *     out.tm_mday = dd
 *     out.tm_mon = mm
*/
  __pyx_v_out.tm_hour = 0;

  /* "utils.pxd":2784
 *     out.tm_min = 0
 *     out.tm_hour = 0
 *     out.tm_mday = dd             # <<<<<<<<<<<<<<
 *     out.tm_mon = mm
 *     out.tm_year = yy
*/
  __pyx_v_out.tm_mday = __pyx_v_dd;

  /* "utils.pxd":2785
 *     out.tm_hour = 0
 *     out.tm_mday = dd
 *     out.tm_mon = mm             # <<<<<<<<<<<<<<
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
*/
  __pyx_v_out.tm_mon = __pyx_v_mm;

  /* "utils.pxd":2786
 *     out.tm_mday = dd
 *     out.tm_mon = mm
 *     out.tm_year = yy             # <<<<<<<<<<<<<<
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_v_out.tm_year = __pyx_v_yy;

  /* "utils.pxd":2787
 *     out.tm_mon = mm
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1
*/
  __pyx_v_out.tm_wday = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":2788
 *     out.tm_year = yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = -1
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":2789
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = -1;

  /* "utils.pxd":2790
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = -1
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":2759
 *     return "%04d-%02d-%02d" % (date.year, date.month, date.day)
 * 
 * cdef inline tm date_to_tm(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2792
 *     return out
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to microseconds since the
 *     Unix epoch (UTC midnight) `<'int'>`.
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_us(PyDateTime_Date *__pyx_v_date) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2800
 *         Negative for dates before 1970-01-01.
 *     """
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY             # <<<<<<<<<<<<<<
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:
*/
  __pyx_r = ((__pyx_f_7cytimes_5utils_date_to_ord(__pyx_v_date) - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY);
  goto __pyx_L0;

  /* "utils.pxd":2792
 *     return out
 * 
 * cdef inline long long date_to_us(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to microseconds since the
 *     Unix epoch (UTC midnight) `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2802
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to seconds since the
 *     Unix epoch (UTC midnight) `<'float'>`.
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_date_to_sec(PyDateTime_Date *__pyx_v_date) {
  double __pyx_r;

  /* "utils.pxd":2810
 *         Negative for dates before 1970-01-01.
 *     """
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:
*/
  __pyx_r = ((double)((__pyx_f_7cytimes_5utils_date_to_ord(__pyx_v_date) - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY));
  goto __pyx_L0;

  /* "utils.pxd":2802
 *     return (date_to_ord(date) - EPOCH_DAY) * US_DAY
 * 
 * cdef inline double date_to_sec(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to seconds since the
 *     Unix epoch (UTC midnight) `<'float'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2812
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to the Gregorian ordinal (0001-01-01 = 1) `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_date_to_ord(PyDateTime_Date *__pyx_v_date) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":2818
 *     :returns `<'int'>`: Ordinal day number in the proleptic Gregorian calendar.
 *     """
 *     return ymd_to_ord(date.year, date.month, date.day)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date), __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date), __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date));
  goto __pyx_L0;

  /* "utils.pxd":2812
 *     return <double> ((date_to_ord(date) - EPOCH_DAY) * SS_DAY)
 * 
 * cdef inline long long date_to_ord(datetime.date date) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.date` to the Gregorian ordinal (0001-01-01 = 1) `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2829
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_us(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_us(__pyx_v_value);

  /* "utils.pxd":2830
 *     """
 *     cdef ymd _ymd = ymd_fr_us(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2821
 * 
 * # . conversion: from
 * cdef inline datetime.date date_fr_us(long long value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from microseconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2840
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_sec(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_sec(__pyx_v_value);

  /* "utils.pxd":2841
 *     """
 *     cdef ymd _ymd = ymd_fr_sec(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2832
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_sec(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from seconds since the Unix epoch `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ord(int __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_ord *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2851
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_value);

  /* "utils.pxd":2852
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2843
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ord(int value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_iso(int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_date_fr_iso *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2866
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday);

  /* "utils.pxd":2867
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2854
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_iso(int year, int week, int weekday, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from ISO calendar values (year, week, weekday) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_doy(int __pyx_v_year, int __pyx_v_doy, struct __pyx_opt_args_7cytimes_5utils_date_fr_doy *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_doy", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2879
 *     :returns `<'datetime.date'>`: The resulting date (or subclass if `dclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)             # <<<<<<<<<<<<<<
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_v_year, __pyx_v_doy);

  /* "utils.pxd":2880
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2869
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_doy(int year, int doy, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from Gregorian year and day-of-year `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_doy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ts(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_date_fr_ts *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_v_date = 0;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2891
 *         in the system **local** timezone.
 *     """
 *     cdef datetime.date date = datetime.date_from_timestamp(value)             # <<<<<<<<<<<<<<
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_date_from_timestamp(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_date = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":2892
 *     """
 *     cdef datetime.date date = datetime.date_from_timestamp(value)
 *     return date if dclass is None else date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = (__pyx_v_dclass == Py_None);
  if (__pyx_t_3) {
    __Pyx_INCREF((PyObject *)__pyx_v_date);
    __pyx_t_2 = ((PyObject *)__pyx_v_date);
  } else {
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dclass = __pyx_v_dclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2882
 *     return date_new(_ymd.year, _ymd.month, _ymd.day, dclass)
 * 
 * cdef inline datetime.date date_fr_ts(double value, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a POSIX timestamp in **local** time `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.date_fr_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_date);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_date(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_fr_date *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }
  __Pyx_INCREF(__pyx_v_dclass);

  /* "utils.pxd":2904
 *         with the same date fields.
 *     """
 *     if dclass is None:             # <<<<<<<<<<<<<<
 *         dclass = datetime.date
 *     if dclass is type(date):
*/
  __pyx_t_1 = (__pyx_v_dclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":2905
 *     """
 *     if dclass is None:
 *         dclass = datetime.date             # <<<<<<<<<<<<<<
 *     if dclass is type(date):
 *         return date
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date);
    __Pyx_DECREF_SET(__pyx_v_dclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date));

    /* "utils.pxd":2904
 *         with the same date fields.
 *     """
 *     if dclass is None:             # <<<<<<<<<<<<<<
 *         dclass = datetime.date
 *     if dclass is type(date):
*/
  }

  /* "utils.pxd":2906
 *     if dclass is None:
 *         dclass = datetime.date
 *     if dclass is type(date):             # <<<<<<<<<<<<<<
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)
*/
  __pyx_t_1 = (__pyx_v_dclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_date))));
  if (__pyx_t_1) {

    /* "utils.pxd":2907
 *         dclass = datetime.date
 *     if dclass is type(date):
 *         return date             # <<<<<<<<<<<<<<
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_date);
    __pyx_r = __pyx_v_date;
    goto __pyx_L0;

    /* "utils.pxd":2906
 *     if dclass is None:
 *         dclass = datetime.date
 *     if dclass is type(date):             # <<<<<<<<<<<<<<
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)
*/
  }

  /* "utils.pxd":2908
 *     if dclass is type(date):
 *         return date
 *     return date_new(date.year, date.month, date.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.year = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_3.month = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_3.day = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_t_3.dclass = __pyx_v_dclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 2908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2894
 *     return date if dclass is None else date_fr_date(date, dclass)
 * 
 * cdef inline datetime.date date_fr_date(datetime.date date, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from another date (or subclass) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.date_fr_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_date_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dclass = __pyx_optional_args->dclass;
    }
  }

  /* "utils.pxd":2919
 *         with the same date fields.
 *     """
 *     return date_new(dt.year, dt.month, dt.day, dclass)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_2.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_2.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_2.dclass = __pyx_v_dclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 2919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2910
 *     return date_new(date.year, date.month, date.day, dclass)
 * 
 * cdef inline datetime.date date_fr_dt(datetime.datetime dt, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Create date from a datetime (include subclass) `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.date_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_replace(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_replace *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_replace", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dclass = __pyx_optional_args->dclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":2939
 *     # Get old fields
 *     cdef int yy, mm, dd
 *     yy, mm, dd = date.year, date.month, date.day             # <<<<<<<<<<<<<<
 * 
 *     # Gen new fields
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_3 = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_v_yy = __pyx_t_1;
  __pyx_v_mm = __pyx_t_2;
  __pyx_v_dd = __pyx_t_3;

  /* "utils.pxd":2942
 * 
 *     # Gen new fields
 *     year  = yy if year < 1 else min(year, 9999)             # <<<<<<<<<<<<<<
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:
*/
  __pyx_t_5 = (__pyx_v_year < 1);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_v_yy;
  } else {
    __pyx_t_6 = 0x270F;
    __pyx_t_3 = __pyx_v_year;
    __pyx_t_8 = (__pyx_t_6 < __pyx_t_3);
    if (__pyx_t_8) {
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_4 = __pyx_t_7;
  }
  __pyx_v_year = __pyx_t_4;

  /* "utils.pxd":2943
 *     # Gen new fields
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)             # <<<<<<<<<<<<<<
 *     if day < 1:
 *         day = dd
*/
  __pyx_t_5 = (__pyx_v_month < 1);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_v_mm;
  } else {
    __pyx_t_7 = 12;
    __pyx_t_3 = __pyx_v_month;
    __pyx_t_8 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_8) {
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_3;
    }
    __pyx_t_4 = __pyx_t_6;
  }
  __pyx_v_month = __pyx_t_4;

  /* "utils.pxd":2944
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
  __pyx_t_5 = (__pyx_v_day < 1);
  if (__pyx_t_5) {

    /* "utils.pxd":2945
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:
 *         day = dd             # <<<<<<<<<<<<<<
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
*/
    __pyx_v_day = __pyx_v_dd;

    /* "utils.pxd":2944
 *     year  = yy if year < 1 else min(year, 9999)
 *     month = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":2946
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 * 
*/
  __pyx_t_5 = (__pyx_v_day > 28);
  if (__pyx_t_5) {

    /* "utils.pxd":2947
 *         day = dd
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fields
*/
    __pyx_t_3 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_2 = __pyx_v_day;
    __pyx_t_5 = (__pyx_t_3 < __pyx_t_2);
    if (__pyx_t_5) {
      __pyx_t_1 = __pyx_t_3;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    __pyx_v_day = __pyx_t_1;

    /* "utils.pxd":2946
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 * 
*/
  }
  __pyx_L3:;

  /* "utils.pxd":2950
 * 
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  __pyx_t_8 = (__pyx_v_yy == __pyx_v_year);
  if (__pyx_t_8) {
  } else {
    __pyx_t_5 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_mm == __pyx_v_month);
  if (__pyx_t_8) {
  } else {
    __pyx_t_5 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_dd == __pyx_v_day);
  __pyx_t_5 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "utils.pxd":2951
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:
 *         return date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 *     # New date
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.dclass = __pyx_v_dclass;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_r = ((PyDateTime_Date *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":2950
 * 
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "utils.pxd":2954
 * 
 *     # New date
 *     return date_new(year, month, day, dclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_11.__pyx_n = 4;
  __pyx_t_11.year = __pyx_v_year;
  __pyx_t_11.month = __pyx_v_month;
  __pyx_t_11.day = __pyx_v_day;
  __pyx_t_11.dclass = __pyx_v_dclass;
  __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 2954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_9);
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2922
 * 
 * # . manipulation
 * cdef inline datetime.date date_replace(datetime.date date, int year=-1, int month=-1, int day=-1, object dclass=None):             # <<<<<<<<<<<<<<
 *     """Replace specified fields in date `<'datetime.date'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.date_replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_add_delta(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_date_add_delta *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  PY_LONG_LONG __pyx_v_days = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_hours = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_minutes = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_seconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_milliseconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_microseconds = ((PY_LONG_LONG)0);
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_weekday = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_millisecond = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);

  /* "utils.pxd":2960
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
 *     int year=-1, int month=-1, int day=-1, int weekday=-1, int hour=-1, int minute=-1,
 *     int second=-1, int millisecond=-1, int microsecond=-1, object dclass=None             # <<<<<<<<<<<<<<
 * ):
 *     """Add relative and absolute deltas to date `<'datetime.date'>`.
*/
  PyObject *__pyx_v_dclass = ((PyObject *)Py_None);
  int __pyx_v_o_yy;
  int __pyx_v_yy;
  int __pyx_v_o_mm;
  int __pyx_v_mm;
  int __pyx_v_o_dd;
  int __pyx_v_dd;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_rel_days;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_old_ord;
  PY_LONG_LONG __pyx_v_new_ord;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  long __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_year = __pyx_optional_args->year;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_month = __pyx_optional_args->month;
                            if (__pyx_optional_args->__pyx_n > 12) {
                              __pyx_v_day = __pyx_optional_args->day;
                              if (__pyx_optional_args->__pyx_n > 13) {
                                __pyx_v_weekday = __pyx_optional_args->weekday;
                                if (__pyx_optional_args->__pyx_n > 14) {
                                  __pyx_v_hour = __pyx_optional_args->hour;
                                  if (__pyx_optional_args->__pyx_n > 15) {
                                    __pyx_v_minute = __pyx_optional_args->minute;
                                    if (__pyx_optional_args->__pyx_n > 16) {
                                      __pyx_v_second = __pyx_optional_args->second;
                                      if (__pyx_optional_args->__pyx_n > 17) {
                                        __pyx_v_millisecond = __pyx_optional_args->millisecond;
                                        if (__pyx_optional_args->__pyx_n > 18) {
                                          __pyx_v_microsecond = __pyx_optional_args->microsecond;
                                          if (__pyx_optional_args->__pyx_n > 19) {
                                            __pyx_v_dclass = __pyx_optional_args->dclass;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3001
 *     # ----------------------------------------------------
 *     cdef:
 *         int o_yy = date.year             # <<<<<<<<<<<<<<
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month
*/
  __pyx_v_o_yy = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);

  /* "utils.pxd":3002
 *     cdef:
 *         int o_yy = date.year
 *         int yy = (year if year > 0 else o_yy) + years             # <<<<<<<<<<<<<<
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
*/
  __pyx_t_2 = (__pyx_v_year > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = __pyx_v_o_yy;
  }
  __pyx_v_yy = (__pyx_t_1 + __pyx_v_years);

  /* "utils.pxd":3003
 *         int o_yy = date.year
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month             # <<<<<<<<<<<<<<
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day
*/
  __pyx_v_o_mm = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);

  /* "utils.pxd":3004
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)             # <<<<<<<<<<<<<<
 *         int o_dd = date.day
 *         int dd = (day if day > 0 else o_dd)
*/
  __pyx_t_2 = (__pyx_v_month > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_month;
  } else {
    __pyx_t_1 = __pyx_v_o_mm;
  }
  __pyx_v_mm = ((__pyx_t_1 + __pyx_v_months) + (__pyx_v_quarters * 3));

  /* "utils.pxd":3005
 *         int o_mm = date.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day             # <<<<<<<<<<<<<<
 *         int dd = (day if day > 0 else o_dd)
 *         long long q, r
*/
  __pyx_v_o_dd = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);

  /* "utils.pxd":3006
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = date.day
 *         int dd = (day if day > 0 else o_dd)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     # . normalize month
*/
  __pyx_t_2 = (__pyx_v_day > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_day;
  } else {
    __pyx_t_1 = __pyx_v_o_dd;
  }
  __pyx_v_dd = __pyx_t_1;

  /* "utils.pxd":3009
 *         long long q, r
 *     # . normalize month
 *     if mm != o_mm:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  __pyx_t_2 = (__pyx_v_mm != __pyx_v_o_mm);
  if (__pyx_t_2) {

    /* "utils.pxd":3010
 *     # . normalize month
 *     if mm != o_mm:
 *         mm -= 1             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
*/
    __pyx_v_mm = (__pyx_v_mm - 1);

    /* "utils.pxd":3012
 *         mm -= 1
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 12
*/
    __pyx_v_q = (((long)__pyx_v_mm) / 12);
    __pyx_v_r = (__pyx_v_mm % 12);

    /* "utils.pxd":3013
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3014
 *             q = mm / 12; r = mm % 12
 *         if r < 0:
 *             q -= 1; r += 12             # <<<<<<<<<<<<<<
 *         yy += q; mm = r + 1
 *     # . relative days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":3013
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    }

    /* "utils.pxd":3015
 *         if r < 0:
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1             # <<<<<<<<<<<<<<
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)
*/
    __pyx_v_yy = (__pyx_v_yy + __pyx_v_q);
    __pyx_v_mm = (__pyx_v_r + 1);

    /* "utils.pxd":3009
 *         long long q, r
 *     # . normalize month
 *     if mm != o_mm:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":3017
 *         yy += q; mm = r + 1
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)             # <<<<<<<<<<<<<<
 * 
 *     # Time fields
*/
  __pyx_v_rel_days = (__pyx_v_days + (__pyx_v_weeks * 7));

  /* "utils.pxd":3021
 *     # Time fields
 *     # ----------------------------------------------------
 *     cdef long long us = combine_absolute_ms_us(millisecond, microsecond)             # <<<<<<<<<<<<<<
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_combine_absolute_ms_us(__pyx_v_millisecond, __pyx_v_microsecond);

  /* "utils.pxd":3023
 *     cdef long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +             # <<<<<<<<<<<<<<
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
*/
  __pyx_t_2 = (__pyx_v_us >= 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_us;
  } else {
    __pyx_t_3 = 0;
  }

  /* "utils.pxd":3024
 *     us = (
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +             # <<<<<<<<<<<<<<
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
*/
  __pyx_t_2 = (__pyx_v_second >= 0);
  if (__pyx_t_2) {
    __pyx_t_4 = __pyx_v_second;
  } else {
    __pyx_t_4 = 0;
  }

  /* "utils.pxd":3025
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +             # <<<<<<<<<<<<<<
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
 *     )
*/
  __pyx_t_2 = (__pyx_v_minute >= 0);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_v_minute;
  } else {
    __pyx_t_5 = 0;
  }

  /* "utils.pxd":3026
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR             # <<<<<<<<<<<<<<
 *     )
 *     # . normalize time to days
*/
  __pyx_t_2 = (__pyx_v_hour >= 0);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_v_hour;
  } else {
    __pyx_t_6 = 0;
  }

  /* "utils.pxd":3025
 *         (us if us >= 0 else 0) + milliseconds * US_MILLISECOND + microseconds +
 *         ((second if second >= 0 else 0) + seconds) * US_SECOND +
 *         ((minute if minute >= 0 else 0) + minutes) * US_MINUTE +             # <<<<<<<<<<<<<<
 *         ((hour if hour >= 0 else 0) + hours)       * US_HOUR
 *     )
*/
  __pyx_v_us = (((((__pyx_t_3 + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds) + ((__pyx_t_4 + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((__pyx_t_5 + __pyx_v_minutes) * __pyx_v_7cytimes_5utils_US_MINUTE)) + ((__pyx_t_6 + __pyx_v_hours) * __pyx_v_7cytimes_5utils_US_HOUR));

  /* "utils.pxd":3029
 *     )
 *     # . normalize time to days
 *     if us != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
*/
  __pyx_t_2 = (__pyx_v_us != 0);
  if (__pyx_t_2) {

    /* "utils.pxd":3031
 *     if us != 0:
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_us / __pyx_v_7cytimes_5utils_US_DAY);
    __pyx_v_r = (__pyx_v_us % __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":3032
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         rel_days += q
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3033
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         rel_days += q
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":3032
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         rel_days += q
*/
    }

    /* "utils.pxd":3034
 *         if r < 0:
 *             q -= 1
 *         rel_days += q             # <<<<<<<<<<<<<<
 * 
 *     # Handle day delta
*/
    __pyx_v_rel_days = (__pyx_v_rel_days + __pyx_v_q);

    /* "utils.pxd":3029
 *     )
 *     # . normalize time to days
 *     if us != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
*/
  }

  /* "utils.pxd":3040
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  __pyx_t_7 = (__pyx_v_rel_days != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_weekday >= 0);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":3041
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
*/
    __pyx_v_old_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

    /* "utils.pxd":3042
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days             # <<<<<<<<<<<<<<
 *         # . adjust to weekday if needed
 *         if weekday >= 0:
*/
    __pyx_v_new_ord = (__pyx_v_old_ord + __pyx_v_rel_days);

    /* "utils.pxd":3044
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    __pyx_t_2 = (__pyx_v_weekday >= 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3046
 *         if weekday >= 0:
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     r += 7
*/
      __pyx_v_r = ((__pyx_v_new_ord + 6) % 7);

      /* "utils.pxd":3047
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      __pyx_t_2 = (__pyx_v_r < 0);
      if (__pyx_t_2) {

        /* "utils.pxd":3048
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:
 *                     r += 7             # <<<<<<<<<<<<<<
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
*/
        __pyx_v_r = (__pyx_v_r + 7);

        /* "utils.pxd":3047
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      }

      /* "utils.pxd":3049
 *                 if r < 0:
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6             # <<<<<<<<<<<<<<
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
*/
      __pyx_t_8 = 6;
      __pyx_t_1 = __pyx_v_weekday;
      __pyx_t_2 = (__pyx_t_8 < __pyx_t_1);
      if (__pyx_t_2) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_1;
      }
      __pyx_v_new_ord = (__pyx_v_new_ord + (__pyx_t_9 - __pyx_v_r));

      /* "utils.pxd":3044
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    }

    /* "utils.pxd":3050
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    __pyx_t_2 = (__pyx_v_old_ord != __pyx_v_new_ord);
    if (__pyx_t_2) {

      /* "utils.pxd":3051
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_new_ord);

      /* "utils.pxd":3052
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *     # Compare new dates
*/
      __pyx_t_1 = __pyx_v__ymd.year;
      __pyx_t_10 = __pyx_v__ymd.month;
      __pyx_t_11 = __pyx_v__ymd.day;
      __pyx_v_yy = __pyx_t_1;
      __pyx_v_mm = __pyx_t_10;
      __pyx_v_dd = __pyx_t_11;

      /* "utils.pxd":3050
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    }

    /* "utils.pxd":3040
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  }

  /* "utils.pxd":3055
 * 
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  __pyx_t_7 = (__pyx_v_yy == __pyx_v_o_yy);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_mm == __pyx_v_o_mm);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_dd == __pyx_v_o_dd);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":3056
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:
 *         return date_fr_date(date, dclass)             # <<<<<<<<<<<<<<
 * 
 *     # Clamp day to valid days in month
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.dclass = __pyx_v_dclass;
    __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(__pyx_v_date, &__pyx_t_13)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_r = ((PyDateTime_Date *)__pyx_t_12);
    __pyx_t_12 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3055
 * 
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "utils.pxd":3059
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  __pyx_t_2 = (__pyx_v_dd > 28);
  if (__pyx_t_2) {

    /* "utils.pxd":3060
 *     # Clamp day to valid days in month
 *     if dd > 28:
 *         dd = min(dd, days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *     # New date
*/
    __pyx_t_11 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_10 = __pyx_v_dd;
    __pyx_t_2 = (__pyx_t_11 < __pyx_t_10);
    if (__pyx_t_2) {
      __pyx_t_1 = __pyx_t_11;
    } else {
      __pyx_t_1 = __pyx_t_10;
    }
    __pyx_v_dd = __pyx_t_1;

    /* "utils.pxd":3059
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "utils.pxd":3063
 * 
 *     # New date
 *     return date_new(yy, mm, dd, dclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.datetime ------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_14.__pyx_n = 4;
  __pyx_t_14.year = __pyx_v_yy;
  __pyx_t_14.month = __pyx_v_mm;
  __pyx_t_14.day = __pyx_v_dd;
  __pyx_t_14.dclass = __pyx_v_dclass;
  __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_14)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_12);
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "utils.pxd":2956
 *     return date_new(year, month, day, dclass)
 * 
 * cdef inline datetime.date date_add_delta(datetime.date date,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils.date_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_new(struct __pyx_opt_args_7cytimes_5utils_dt_new *__pyx_optional_args) {
  int __pyx_v_year = ((int)1);
  int __pyx_v_month = ((int)1);
  int __pyx_v_day = ((int)1);
  int __pyx_v_hour = ((int)0);
  int __pyx_v_minute = ((int)0);
  int __pyx_v_second = ((int)0);
  int __pyx_v_microsecond = ((int)0);

  /* "utils.pxd":3069
 * cdef inline datetime.datetime dt_new(
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Create a new datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  int __pyx_v_fold = ((int)0);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  size_t __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  PyObject *__pyx_t_20[4];
  int __pyx_t_21;
  char const *__pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_new __pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_fold = __pyx_optional_args->fold;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_dtclass = __pyx_optional_args->dtclass;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3088
 *     """
 *     # Construct datetime
 *     fold = fold == 1             # <<<<<<<<<<<<<<
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
*/
  __pyx_v_fold = (__pyx_v_fold == 1);

  /* "utils.pxd":3089
 *     # Construct datetime
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:             # <<<<<<<<<<<<<<
 *         try:
 *             return dtclass(
*/
  __pyx_t_2 = (__pyx_v_dtclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dtclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
    {
      __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:*/ {

        /* "utils.pxd":3091
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
 *             return dtclass(             # <<<<<<<<<<<<<<
 *                 year=year,
 *                 month=month,
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_dtclass);
        __pyx_t_8 = __pyx_v_dtclass; 

        /* "utils.pxd":3092
 *         try:
 *             return dtclass(
 *                 year=year,             # <<<<<<<<<<<<<<
 *                 month=month,
 *                 day=day,
*/
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3092, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "utils.pxd":3093
 *             return dtclass(
 *                 year=year,
 *                 month=month,             # <<<<<<<<<<<<<<
 *                 day=day,
 *                 hour=hour,
*/
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3093, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "utils.pxd":3094
 *                 year=year,
 *                 month=month,
 *                 day=day,             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 3094, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "utils.pxd":3095
 *                 month=month,
 *                 day=day,
 *                 hour=hour,             # <<<<<<<<<<<<<<
 *                 minute=minute,
 *                 second=second,
*/
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3095, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":3096
 *                 day=day,
 *                 hour=hour,
 *                 minute=minute,             # <<<<<<<<<<<<<<
 *                 second=second,
 *                 microsecond=microsecond,
*/
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 3096, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":3097
 *                 hour=hour,
 *                 minute=minute,
 *                 second=second,             # <<<<<<<<<<<<<<
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
*/
        __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3097, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":3098
 *                 minute=minute,
 *                 second=second,
 *                 microsecond=microsecond,             # <<<<<<<<<<<<<<
 *                 tzinfo=tzinfo,
 *                 fold=fold,
*/
        __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 3098, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":3100
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
 *                 fold=fold,             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
        __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 3100, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_17 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_year, __pyx_t_9, __pyx_t_18, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_month, __pyx_t_10, __pyx_t_18, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_day, __pyx_t_11, __pyx_t_18, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_t_12, __pyx_t_18, __pyx_callargs+1, 3) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_t_13, __pyx_t_18, __pyx_callargs+1, 4) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_t_14, __pyx_t_18, __pyx_callargs+1, 5) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_15, __pyx_t_18, __pyx_callargs+1, 6) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_18, __pyx_callargs+1, 7) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_t_16, __pyx_t_18, __pyx_callargs+1, 8) < (0)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_17, (1-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 3091, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }

        /* "utils.pxd":3091
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:
 *             return dtclass(             # <<<<<<<<<<<<<<
 *                 year=year,
 *                 month=month,
*/
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(5, 3091, __pyx_L6_error)
        __pyx_r = ((PyDateTime_DateTime *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_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_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "utils.pxd":3102
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
*/
      __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_19) {
        __Pyx_AddTraceback("cytimes.utils.dt_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_18) < 0) __PYX_ERR(5, 3102, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_18);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":3103
 *             )
 *         except Exception as err:
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
*/
          __pyx_t_15 = NULL;
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_dtclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_20[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_datetime_using_cus;
          __pyx_t_20[1] = __pyx_t_14;
          __pyx_t_20[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_20[3] = __pyx_t_13;
          __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_20, 4, 46 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
          if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3103, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_17 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_12};
            __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 3103, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_16);
          }
          __Pyx_Raise(__pyx_t_16, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __PYX_ERR(5, 3103, __pyx_L17_error)
        }

        /* "utils.pxd":3102
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_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_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
            if ( unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __Pyx_XGOTREF(__pyx_t_26);
            __Pyx_XGOTREF(__pyx_t_27);
            __Pyx_XGOTREF(__pyx_t_28);
            __pyx_t_19 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_26);
            __Pyx_XGIVEREF(__pyx_t_27);
            __Pyx_XGIVEREF(__pyx_t_28);
            __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
            __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":3090
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:
 *         try:             # <<<<<<<<<<<<<<
 *             return dtclass(
 *                 year=year,
*/
      __pyx_L8_except_error:;
      __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_L10_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;
    }

    /* "utils.pxd":3089
 *     # Construct datetime
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:             # <<<<<<<<<<<<<<
 *         try:
 *             return dtclass(
*/
  }

  /* "utils.pxd":3104
 *         except Exception as err:
 *             raise ValueError("Cannot create datetime using custom 'dtclass' %s, %s" % (dtclass, err)) from err
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_29.__pyx_n = 1;
  __pyx_t_29.fold = __pyx_v_fold;
  __pyx_t_18 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, &__pyx_t_29)); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_18);
  __pyx_t_18 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3067
 * # datetime.datetime ------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.datetime dt_new(             # <<<<<<<<<<<<<<
 *     int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0,
 *     int microsecond=0, object tzinfo=None, int fold=0, object dtclass=None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("cytimes.utils.dt_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_now(struct __pyx_opt_args_7cytimes_5utils_dt_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  double __pyx_v_tic;
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3122
 *     >>> datetime.datetime.now(tzinfo)
 *     """
 *     cdef double tic = unix_time()             # <<<<<<<<<<<<<<
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
*/
  __pyx_v_tic = __pyx_f_7cpython_4time_time();

  /* "utils.pxd":3123
 *     """
 *     cdef double tic = unix_time()
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)             # <<<<<<<<<<<<<<
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_tic); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tz = __pyx_v_tzinfo;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_from_timestamp(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3124
 *     cdef double tic = unix_time()
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(tic, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_4) {
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_t_2 = ((PyObject *)__pyx_v_dt);
  } else {
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3106
 *     return datetime.datetime_new(year, month, day, hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.datetime dt_now(object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current datetime `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3127
 * 
 * # . type check
 * cdef inline bint is_dt(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.datetime` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":3136
 *     >>> isinstance(obj, datetime.datetime)
 *     """
 *     return datetime.PyDateTime_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:
*/
  __pyx_r = PyDateTime_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":3127
 * 
 * # . type check
 * cdef inline bint is_dt(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.datetime` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3138
 *     return datetime.PyDateTime_Check(obj)
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.datetime` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":3147
 *     >>> type(obj) is datetime.datetime
 *     """
 *     return datetime.PyDateTime_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDateTime_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":3138
 *     return datetime.PyDateTime_Check(obj)
 * 
 * cdef inline bint is_dt_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.datetime` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3150
 * 
 * # . conversion: to
 * cdef inline long long dt_local_mktime(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Interpret a naive `datetime.datetime` as local POSIX timestamp `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_local_mktime(PyDateTime_DateTime *__pyx_v_dt) {
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_t;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_adj1;
  PY_LONG_LONG __pyx_v_adj2;
  PY_LONG_LONG __pyx_v_u1;
  PY_LONG_LONG __pyx_v_u2;
  PY_LONG_LONG __pyx_v_t1;
  PY_LONG_LONG __pyx_v_t2;
  PY_LONG_LONG __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  PY_LONG_LONG __pyx_t_8;
  PY_LONG_LONG __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":3165
 * 
 *     # Seconds since epoch from local wall fields (no timezone adjustment here)
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper             # <<<<<<<<<<<<<<
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3165, __pyx_L1_error)
  __pyx_v_ord = __pyx_t_1;

  /* "utils.pxd":3166
 *     # Seconds since epoch from local wall fields (no timezone adjustment here)
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper
 *     hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_5 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_v_hh = __pyx_t_3;
  __pyx_v_mi = __pyx_t_4;
  __pyx_v_ss = __pyx_t_5;

  /* "utils.pxd":3167
 *     ord = dt_to_ord(dt, False)            # <-- make sure this is the right helper
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     t = (ord - EPOCH_DAY) * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 *     # local(u) := ts_localtime(u)
*/
  __pyx_v_t = (((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);

  /* "utils.pxd":3170
 * 
 *     # local(u) := ts_localtime(u)
 *     adj1 = ts_localtime(t) - t             # <<<<<<<<<<<<<<
 *     u1 = t - adj1
 *     t1 = ts_localtime(u1)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_t); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3170, __pyx_L1_error)
  __pyx_v_adj1 = (__pyx_t_1 - __pyx_v_t);

  /* "utils.pxd":3171
 *     # local(u) := ts_localtime(u)
 *     adj1 = ts_localtime(t) - t
 *     u1 = t - adj1             # <<<<<<<<<<<<<<
 *     t1 = ts_localtime(u1)
 * 
*/
  __pyx_v_u1 = (__pyx_v_t - __pyx_v_adj1);

  /* "utils.pxd":3172
 *     adj1 = ts_localtime(t) - t
 *     u1 = t - adj1
 *     t1 = ts_localtime(u1)             # <<<<<<<<<<<<<<
 * 
 *     if t1 == t:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u1); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3172, __pyx_L1_error)
  __pyx_v_t1 = __pyx_t_1;

  /* "utils.pxd":3174
 *     t1 = ts_localtime(u1)
 * 
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         # We found one solution, but it may not be the one we need.
 *         # Look for an earlier solution (if `fold` is 0), or a later
*/
  __pyx_t_6 = (__pyx_v_t1 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3178
 *         # Look for an earlier solution (if `fold` is 0), or a later
 *         # one (if `fold` is 1).
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY             # <<<<<<<<<<<<<<
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:
*/
    __pyx_t_6 = (__pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt) == 0);
    if (__pyx_t_6) {
      __pyx_t_1 = (__pyx_v_u1 - __pyx_v_7cytimes_5utils_SS_DAY);
    } else {
      __pyx_t_1 = (__pyx_v_u1 + __pyx_v_7cytimes_5utils_SS_DAY);
    }
    __pyx_v_u2 = __pyx_t_1;

    /* "utils.pxd":3179
 *         # one (if `fold` is 1).
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2             # <<<<<<<<<<<<<<
 *         if adj1 == adj2:
 *             return u1
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3179, __pyx_L1_error)
    __pyx_v_adj2 = (__pyx_t_1 - __pyx_v_u2);

    /* "utils.pxd":3180
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:             # <<<<<<<<<<<<<<
 *             return u1
 *     else:
*/
    __pyx_t_6 = (__pyx_v_adj1 == __pyx_v_adj2);
    if (__pyx_t_6) {

      /* "utils.pxd":3181
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:
 *             return u1             # <<<<<<<<<<<<<<
 *     else:
 *         adj2 = t1 - u1
*/
      __pyx_r = __pyx_v_u1;
      goto __pyx_L0;

      /* "utils.pxd":3180
 *         u2  = u1 - SS_DAY if dt.fold == 0 else u1 + SS_DAY
 *         adj2 = ts_localtime(u2) - u2
 *         if adj1 == adj2:             # <<<<<<<<<<<<<<
 *             return u1
 *     else:
*/
    }

    /* "utils.pxd":3174
 *     t1 = ts_localtime(u1)
 * 
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         # We found one solution, but it may not be the one we need.
 *         # Look for an earlier solution (if `fold` is 0), or a later
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3183
 *             return u1
 *     else:
 *         adj2 = t1 - u1             # <<<<<<<<<<<<<<
 * 
 *     # Final attempt with the other offset
*/
  /*else*/ {
    __pyx_v_adj2 = (__pyx_v_t1 - __pyx_v_u1);
  }
  __pyx_L3:;

  /* "utils.pxd":3186
 * 
 *     # Final attempt with the other offset
 *     u2 = t - adj2             # <<<<<<<<<<<<<<
 *     t2 = ts_localtime(u2)
 *     if t2 == t:
*/
  __pyx_v_u2 = (__pyx_v_t - __pyx_v_adj2);

  /* "utils.pxd":3187
 *     # Final attempt with the other offset
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)             # <<<<<<<<<<<<<<
 *     if t2 == t:
 *         return u2
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_ts_localtime(__pyx_v_u2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3187, __pyx_L1_error)
  __pyx_v_t2 = __pyx_t_1;

  /* "utils.pxd":3188
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)
 *     if t2 == t:             # <<<<<<<<<<<<<<
 *         return u2
 *     if t1 == t:
*/
  __pyx_t_6 = (__pyx_v_t2 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3189
 *     t2 = ts_localtime(u2)
 *     if t2 == t:
 *         return u2             # <<<<<<<<<<<<<<
 *     if t1 == t:
 *         return u1
*/
    __pyx_r = __pyx_v_u2;
    goto __pyx_L0;

    /* "utils.pxd":3188
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)
 *     if t2 == t:             # <<<<<<<<<<<<<<
 *         return u2
 *     if t1 == t:
*/
  }

  /* "utils.pxd":3190
 *     if t2 == t:
 *         return u2
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         return u1
 * 
*/
  __pyx_t_6 = (__pyx_v_t1 == __pyx_v_t);
  if (__pyx_t_6) {

    /* "utils.pxd":3191
 *         return u2
 *     if t1 == t:
 *         return u1             # <<<<<<<<<<<<<<
 * 
 *     # We have found both offsets adj1 and adj2,
*/
    __pyx_r = __pyx_v_u1;
    goto __pyx_L0;

    /* "utils.pxd":3190
 *     if t2 == t:
 *         return u2
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         return u1
 * 
*/
  }

  /* "utils.pxd":3196
 *     # but neither t - adj1 nor t - adj2 is the
 *     # solution. This means t is in the gap.
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):
*/
  __pyx_t_6 = (__pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt) == 0);
  if (__pyx_t_6) {
    __pyx_t_7 = __pyx_v_u2;
    __pyx_t_8 = __pyx_v_u1;
    __pyx_t_10 = (__pyx_t_7 > __pyx_t_8);
    if (__pyx_t_10) {
      __pyx_t_9 = __pyx_t_7;
    } else {
      __pyx_t_9 = __pyx_t_8;
    }
    __pyx_t_1 = __pyx_t_9;
  } else {
    __pyx_t_9 = __pyx_v_u2;
    __pyx_t_7 = __pyx_v_u1;
    __pyx_t_10 = (__pyx_t_9 < __pyx_t_7);
    if (__pyx_t_10) {
      __pyx_t_8 = __pyx_t_9;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    __pyx_t_1 = __pyx_t_8;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":3150
 * 
 * # . conversion: to
 * cdef inline long long dt_local_mktime(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Interpret a naive `datetime.datetime` as local POSIX timestamp `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_local_mktime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3198
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.datetime` with a strftime-style format `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_strformat(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_parts = 0;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_frepl = 0;
  PyObject *__pyx_v_zrepl = 0;
  PyObject *__pyx_v_Zrepl = 0;
  PyObject *__pyx_v_s_tmp = 0;
  Py_UCS4 __pyx_v_ch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __pyx_t_7;
  struct tm __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_strformat", 0);

  /* "utils.pxd":3208
 *     >>> dt.strftime(fmt)
 *     """
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_fmt == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":3209
 *     """
 *     if fmt is None:
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")             # <<<<<<<<<<<<<<
 *     cdef:
 *         list parts = []
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_dt_strformat_fmt_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3209, __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(5, 3209, __pyx_L1_error)

    /* "utils.pxd":3208
 *     >>> dt.strftime(fmt)
 *     """
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
*/
  }

  /* "utils.pxd":3211
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
 *         list parts = []             # <<<<<<<<<<<<<<
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_parts = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3212
 *     cdef:
 *         list parts = []
 *         Py_ssize_t size = str_len(fmt)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i = 0
 *         str frepl = None
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_fmt);

  /* "utils.pxd":3213
 *         list parts = []
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 *         str frepl = None
 *         str zrepl = None
*/
  __pyx_v_i = 0;

  /* "utils.pxd":3214
 *         Py_ssize_t size = str_len(fmt)
 *         Py_ssize_t i = 0
 *         str frepl = None             # <<<<<<<<<<<<<<
 *         str zrepl = None
 *         str Zrepl = None
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_frepl = ((PyObject*)Py_None);

  /* "utils.pxd":3215
 *         Py_ssize_t i = 0
 *         str frepl = None
 *         str zrepl = None             # <<<<<<<<<<<<<<
 *         str Zrepl = None
 *         str s_tmp = None
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_zrepl = ((PyObject*)Py_None);

  /* "utils.pxd":3216
 *         str frepl = None
 *         str zrepl = None
 *         str Zrepl = None             # <<<<<<<<<<<<<<
 *         str s_tmp = None
 *         Py_UCS4 ch
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_Zrepl = ((PyObject*)Py_None);

  /* "utils.pxd":3217
 *         str zrepl = None
 *         str Zrepl = None
 *         str s_tmp = None             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_s_tmp = ((PyObject*)Py_None);

  /* "utils.pxd":3221
 * 
 *     # Scan once, expand %f/%z/%Z, pass through others
 *     while i < size:             # <<<<<<<<<<<<<<
 *         ch = str_read(fmt, i)
 *         i += 1
*/
  while (1) {
    __pyx_t_1 = (__pyx_v_i < __pyx_v_size);
    if (!__pyx_t_1) break;

    /* "utils.pxd":3222
 *     # Scan once, expand %f/%z/%Z, pass through others
 *     while i < size:
 *         ch = str_read(fmt, i)             # <<<<<<<<<<<<<<
 *         i += 1
 * 
*/
    __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_fmt, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 3222, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_5;

    /* "utils.pxd":3223
 *     while i < size:
 *         ch = str_read(fmt, i)
 *         i += 1             # <<<<<<<<<<<<<<
 * 
 *         # Format identifier: '%'
*/
    __pyx_v_i = (__pyx_v_i + 1);

    /* "utils.pxd":3226
 * 
 *         # Format identifier: '%'
 *         if ch == "%":             # <<<<<<<<<<<<<<
 *             if i < size:
 *                 ch = str_read(fmt, i)
*/
    __pyx_t_1 = (__pyx_v_ch == 37);
    if (__pyx_t_1) {

      /* "utils.pxd":3227
 *         # Format identifier: '%'
 *         if ch == "%":
 *             if i < size:             # <<<<<<<<<<<<<<
 *                 ch = str_read(fmt, i)
 *                 i += 1
*/
      __pyx_t_1 = (__pyx_v_i < __pyx_v_size);
      if (__pyx_t_1) {

        /* "utils.pxd":3228
 *         if ch == "%":
 *             if i < size:
 *                 ch = str_read(fmt, i)             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 # . fraction
*/
        __pyx_t_5 = PyUnicode_ReadChar(__pyx_v_fmt, __pyx_v_i); if (unlikely(__pyx_t_5 == ((Py_UCS4)-1))) __PYX_ERR(5, 3228, __pyx_L1_error)
        __pyx_v_ch = __pyx_t_5;

        /* "utils.pxd":3229
 *             if i < size:
 *                 ch = str_read(fmt, i)
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 # . fraction
 *                 if ch == "f":
*/
        __pyx_v_i = (__pyx_v_i + 1);

        /* "utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
        switch (__pyx_v_ch) {
          case 0x66:

          /* "utils.pxd":3232
 *                 # . fraction
 *                 if ch == "f":
 *                     if frepl is None:             # <<<<<<<<<<<<<<
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)
*/
          __pyx_t_1 = (__pyx_v_frepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3233
 *                 if ch == "f":
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond             # <<<<<<<<<<<<<<
 *                     parts.append(frepl)
 *                 # . utc offset
*/
            __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3233, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_06d, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3233, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF_SET(__pyx_v_frepl, ((PyObject*)__pyx_t_3));
            __pyx_t_3 = 0;

            /* "utils.pxd":3232
 *                 # . fraction
 *                 if ch == "f":
 *                     if frepl is None:             # <<<<<<<<<<<<<<
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)
*/
          }

          /* "utils.pxd":3234
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)             # <<<<<<<<<<<<<<
 *                 # . utc offset
 *                 elif ch == "z":
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_frepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3234, __pyx_L1_error)

          /* "utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
          break;
          case 0x7A:

          /* "utils.pxd":3237
 *                 # . utc offset
 *                 elif ch == "z":
 *                     if zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
*/
          __pyx_t_1 = (__pyx_v_zrepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3238
 *                 elif ch == "z":
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 *                         zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(zrepl)
*/
            __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_7.__pyx_n = 1;
            __pyx_t_7.dt = __pyx_v_dt;
            __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_3, &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF_SET(__pyx_v_s_tmp, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3239
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp             # <<<<<<<<<<<<<<
 *                     parts.append(zrepl)
 *                 # . timezone name
*/
            __pyx_t_1 = (__pyx_v_s_tmp == ((PyObject*)Py_None));
            if (__pyx_t_1) {
              __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
              __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u__5;
            } else {
              __Pyx_INCREF(__pyx_v_s_tmp);
              __pyx_t_2 = __pyx_v_s_tmp;
            }
            __Pyx_DECREF_SET(__pyx_v_zrepl, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3237
 *                 # . utc offset
 *                 elif ch == "z":
 *                     if zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
*/
          }

          /* "utils.pxd":3240
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
 *                         zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(zrepl)             # <<<<<<<<<<<<<<
 *                 # . timezone name
 *                 elif ch == "Z":
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_zrepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3240, __pyx_L1_error)

          /* "utils.pxd":3236
 *                     parts.append(frepl)
 *                 # . utc offset
 *                 elif ch == "z":             # <<<<<<<<<<<<<<
 *                     if zrepl is None:
 *                         s_tmp = tz_utcformat(dt.tzinfo, dt)
*/
          break;
          case 90:

          /* "utils.pxd":3243
 *                 # . timezone name
 *                 elif ch == "Z":
 *                     if Zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
*/
          __pyx_t_1 = (__pyx_v_Zrepl == ((PyObject*)Py_None));
          if (__pyx_t_1) {

            /* "utils.pxd":3244
 *                 elif ch == "Z":
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)             # <<<<<<<<<<<<<<
 *                         Zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(Zrepl)
*/
            __pyx_t_2 = __pyx_f_7cytimes_5utils_dt_tzname(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3244, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF_SET(__pyx_v_s_tmp, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3245
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp             # <<<<<<<<<<<<<<
 *                     parts.append(Zrepl)
 *                 # . Pass through unknown/regular specifiers and %%
*/
            __pyx_t_1 = (__pyx_v_s_tmp == ((PyObject*)Py_None));
            if (__pyx_t_1) {
              __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5);
              __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u__5;
            } else {
              __Pyx_INCREF(__pyx_v_s_tmp);
              __pyx_t_2 = __pyx_v_s_tmp;
            }
            __Pyx_DECREF_SET(__pyx_v_Zrepl, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

            /* "utils.pxd":3243
 *                 # . timezone name
 *                 elif ch == "Z":
 *                     if Zrepl is None:             # <<<<<<<<<<<<<<
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
*/
          }

          /* "utils.pxd":3246
 *                         s_tmp = dt_tzname(dt)
 *                         Zrepl = "" if s_tmp is None else s_tmp
 *                     parts.append(Zrepl)             # <<<<<<<<<<<<<<
 *                 # . Pass through unknown/regular specifiers and %%
 *                 else:
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_v_Zrepl); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3246, __pyx_L1_error)

          /* "utils.pxd":3242
 *                     parts.append(zrepl)
 *                 # . timezone name
 *                 elif ch == "Z":             # <<<<<<<<<<<<<<
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)
*/
          break;
          default:

          /* "utils.pxd":3249
 *                 # . Pass through unknown/regular specifiers and %%
 *                 else:
 *                     parts.append("%")             # <<<<<<<<<<<<<<
 *                     parts.append(str_chr(ch))
 * 
*/
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3249, __pyx_L1_error)

          /* "utils.pxd":3250
 *                 else:
 *                     parts.append("%")
 *                     parts.append(str_chr(ch))             # <<<<<<<<<<<<<<
 * 
 *             else:
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3250, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3250, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          break;
        }

        /* "utils.pxd":3227
 *         # Format identifier: '%'
 *         if ch == "%":
 *             if i < size:             # <<<<<<<<<<<<<<
 *                 ch = str_read(fmt, i)
 *                 i += 1
*/
        goto __pyx_L7;
      }

      /* "utils.pxd":3254
 *             else:
 *                 # Trailing '%': treat as literal '%'
 *                 parts.append("%")             # <<<<<<<<<<<<<<
 * 
 *         # Normal character
*/
      /*else*/ {
        __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3254, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "utils.pxd":3226
 * 
 *         # Format identifier: '%'
 *         if ch == "%":             # <<<<<<<<<<<<<<
 *             if i < size:
 *                 ch = str_read(fmt, i)
*/
      goto __pyx_L6;
    }

    /* "utils.pxd":3258
 *         # Normal character
 *         else:
 *             parts.append(str_chr(ch))             # <<<<<<<<<<<<<<
 * 
 *     # Format to string
*/
    /*else*/ {
      __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(5, 3258, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L6:;
  }

  /* "utils.pxd":3261
 * 
 *     # Format to string
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_8 = __pyx_f_7cytimes_5utils_dt_to_tm(__pyx_v_dt, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 3261, __pyx_L1_error)
  __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__5, __pyx_v_parts); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_7cytimes_5utils_tm_strformat(__pyx_t_8, ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3198
 *     return max(u1, u2) if dt.fold == 0 else min(u1, u2)
 * 
 * cdef inline str dt_strformat(datetime.datetime dt, str fmt):             # <<<<<<<<<<<<<<
 *     """Format a `datetime.datetime` with a strftime-style format `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_strformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_frepl);
  __Pyx_XDECREF(__pyx_v_zrepl);
  __Pyx_XDECREF(__pyx_v_Zrepl);
  __Pyx_XDECREF(__pyx_v_s_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_isoformat(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_isoformat *__pyx_optional_args) {
  PyObject *__pyx_v_sep = ((PyObject*)__pyx_mstate_global->__pyx_n_u_T);
  int __pyx_v_utc = ((int)0);
  int __pyx_v_us;
  PyObject *__pyx_v_s_utc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __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[11];
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13[12];
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[13];
  PyObject *__pyx_t_16[14];
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_isoformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sep = __pyx_optional_args->sep;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_utc = __pyx_optional_args->utc;
      }
    }
  }

  /* "utils.pxd":3275
 *     :returns `<'str'>`: Formatted text.
 *     """
 *     if sep is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_sep == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":3276
 *     """
 *     if sep is None:
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")             # <<<<<<<<<<<<<<
 *     cdef:
 *         int us = dt.microsecond
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_dt_isoformat_sep_cannot_be_None};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3276, __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(5, 3276, __pyx_L1_error)

    /* "utils.pxd":3275
 *     :returns `<'str'>`: Formatted text.
 *     """
 *     if sep is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
*/
  }

  /* "utils.pxd":3278
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
 *         int us = dt.microsecond             # <<<<<<<<<<<<<<
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);

  /* "utils.pxd":3279
 *     cdef:
 *         int us = dt.microsecond
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None             # <<<<<<<<<<<<<<
 * 
 *     if us == 0:
*/
  if (__pyx_v_utc) {
    __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_3, &__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_2 = Py_None;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(5, 3279, __pyx_L1_error)
  __pyx_v_s_utc = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3281
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
*/
  __pyx_t_1 = (__pyx_v_us == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":3282
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    __pyx_t_1 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_1) {

      /* "utils.pxd":3283
 *     if us == 0:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,
*/
      __Pyx_XDECREF(__pyx_r);

      /* "utils.pxd":3284
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *                 dt.hour, dt.minute, dt.second,
 *             )
*/
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "utils.pxd":3285
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,             # <<<<<<<<<<<<<<
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
*/
      __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11[0] = __pyx_t_2;
      __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_11[2] = __pyx_t_5;
      __pyx_t_11[3] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_11[4] = __pyx_t_3;
      __pyx_t_11[5] = __pyx_t_7;
      __pyx_t_11[6] = __pyx_t_8;
      __pyx_t_11[7] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_11[8] = __pyx_t_9;
      __pyx_t_11[9] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_11[10] = __pyx_t_10;

      /* "utils.pxd":3283
 *     if us == 0:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second,
*/
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 11, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1 * 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = ((PyObject*)__pyx_t_12);
      __pyx_t_12 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3282
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    }

    /* "utils.pxd":3287
 *                 dt.hour, dt.minute, dt.second,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "utils.pxd":3288
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
 *             dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *             dt.hour, dt.minute, dt.second, s_utc,
 *         )
*/
    __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "utils.pxd":3289
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13[0] = __pyx_t_12;
    __pyx_t_13[1] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_13[2] = __pyx_t_10;
    __pyx_t_13[3] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_13[4] = __pyx_t_9;
    __pyx_t_13[5] = __pyx_t_8;
    __pyx_t_13[6] = __pyx_t_7;
    __pyx_t_13[7] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_13[8] = __pyx_t_3;
    __pyx_t_13[9] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_13[10] = __pyx_t_5;
    __pyx_t_13[11] = __pyx_t_2;

    /* "utils.pxd":3287
 *                 dt.hour, dt.minute, dt.second,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, s_utc,
*/
    __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
    if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = ((PyObject*)__pyx_t_14);
    __pyx_t_14 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3281
 *         str s_utc = tz_utcformat(dt.tzinfo, dt) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d" % (
*/
  }

  /* "utils.pxd":3292
 *         )
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
  /*else*/ {
    __pyx_t_1 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_1) {

      /* "utils.pxd":3293
 *     else:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,
*/
      __Pyx_XDECREF(__pyx_r);

      /* "utils.pxd":3294
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
*/
      __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "utils.pxd":3295
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,             # <<<<<<<<<<<<<<
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
*/
      __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_15[0] = __pyx_t_14;
      __pyx_t_15[1] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_15[2] = __pyx_t_2;
      __pyx_t_15[3] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_15[4] = __pyx_t_5;
      __pyx_t_15[5] = __pyx_t_3;
      __pyx_t_15[6] = __pyx_t_7;
      __pyx_t_15[7] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_15[8] = __pyx_t_8;
      __pyx_t_15[9] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_15[10] = __pyx_t_9;
      __pyx_t_15[11] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_15[12] = __pyx_t_10;

      /* "utils.pxd":3293
 *     else:
 *         if s_utc is None:
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, sep,
 *                 dt.hour, dt.minute, dt.second, us,
*/
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_15, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1 * 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
      if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_r = ((PyObject*)__pyx_t_12);
      __pyx_t_12 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3292
 *         )
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d" % (
 *                 dt.year, dt.month, dt.day, sep,
*/
    }

    /* "utils.pxd":3297
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "utils.pxd":3298
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
 *             dt.year, dt.month, dt.day, sep,             # <<<<<<<<<<<<<<
 *             dt.hour, dt.minute, dt.second, us, s_utc,
 *         )
*/
    __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), 4, '0', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 3298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "utils.pxd":3299
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt), 2, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 3299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16[0] = __pyx_t_12;
    __pyx_t_16[1] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_16[2] = __pyx_t_10;
    __pyx_t_16[3] = __pyx_mstate_global->__pyx_kp_u__4;
    __pyx_t_16[4] = __pyx_t_9;
    __pyx_t_16[5] = __pyx_t_8;
    __pyx_t_16[6] = __pyx_t_7;
    __pyx_t_16[7] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_16[8] = __pyx_t_3;
    __pyx_t_16[9] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_16[10] = __pyx_t_5;
    __pyx_t_16[11] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_16[12] = __pyx_t_2;
    __pyx_t_16[13] = __pyx_t_14;

    /* "utils.pxd":3297
 *                 dt.hour, dt.minute, dt.second, us,
 *             )
 *         return "%04d-%02d-%02d%s%02d:%02d:%02d.%06d%s" % (             # <<<<<<<<<<<<<<
 *             dt.year, dt.month, dt.day, sep,
 *             dt.hour, dt.minute, dt.second, us, s_utc,
*/
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 14, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
    if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 3297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_r = ((PyObject*)__pyx_t_17);
    __pyx_t_17 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":3263
 *     return tm_strformat(dt_to_tm(dt, False), "".join(parts))
 * 
 * cdef inline str dt_isoformat(datetime.datetime dt, str sep="T", bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to ISO string `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cytimes.utils.dt_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_utc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/

static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_dt_to_tm(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_tm *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  PyObject *__pyx_v_tzinfo = 0;
  int __pyx_v_isdst;
  PyDateTime_Delta *__pyx_v_off = 0;
  struct tm __pyx_v_out;
  struct tm __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_tz_dst __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_tm", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "utils.pxd":3329
 *     """
 *     cdef:
 *         int yy = dt.year             # <<<<<<<<<<<<<<
 *         int mm = dt.month
 *         int dd = dt.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3330
 *     cdef:
 *         int yy = dt.year
 *         int mm = dt.month             # <<<<<<<<<<<<<<
 *         int dd = dt.day
 *         int hh = dt.hour
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3331
 *         int yy = dt.year
 *         int mm = dt.month
 *         int dd = dt.day             # <<<<<<<<<<<<<<
 *         int hh = dt.hour
 *         int mi = dt.minute
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3332
 *         int mm = dt.month
 *         int dd = dt.day
 *         int hh = dt.hour             # <<<<<<<<<<<<<<
 *         int mi = dt.minute
 *         int ss = dt.second
*/
  __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3333
 *         int dd = dt.day
 *         int hh = dt.hour
 *         int mi = dt.minute             # <<<<<<<<<<<<<<
 *         int ss = dt.second
 *         object tzinfo = dt.tzinfo
*/
  __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3334
 *         int hh = dt.hour
 *         int mi = dt.minute
 *         int ss = dt.second             # <<<<<<<<<<<<<<
 *         object tzinfo = dt.tzinfo
 *         int isdst
*/
  __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3335
 *         int mi = dt.minute
 *         int ss = dt.second
 *         object tzinfo = dt.tzinfo             # <<<<<<<<<<<<<<
 *         int isdst
 *         datetime.timedelta off
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tzinfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":3341
 * 
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         isdst = 0 if utc else -1
 * 
*/
  __pyx_t_2 = (__pyx_v_tzinfo == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":3342
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:
 *         isdst = 0 if utc else -1             # <<<<<<<<<<<<<<
 * 
 *     # Aware -> UTC: subtract utcoffset
*/
    if (__pyx_v_utc) {
      __pyx_t_3 = 0;
    } else {
      __pyx_t_3 = -1;
    }
    __pyx_v_isdst = __pyx_t_3;

    /* "utils.pxd":3341
 * 
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         isdst = 0 if utc else -1
 * 
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "utils.pxd":3346
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tzinfo, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":3347
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
*/
    __pyx_t_2 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":3348
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
*/
      __pyx_t_5.__pyx_n = 4;
      __pyx_t_5.days = (-__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off));
      __pyx_t_5.seconds = (-__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));
      __pyx_t_5.microseconds = (-__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off));
      __pyx_t_5.dtclass = Py_None;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "utils.pxd":3349
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day             # <<<<<<<<<<<<<<
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
 *         isdst = 0
*/
      __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
      __pyx_t_6 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
      __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
      __pyx_v_yy = __pyx_t_3;
      __pyx_v_mm = __pyx_t_6;
      __pyx_v_dd = __pyx_t_7;

      /* "utils.pxd":3350
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *         isdst = 0
 * 
*/
      __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
      __pyx_t_6 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
      __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
      __pyx_v_hh = __pyx_t_7;
      __pyx_v_mi = __pyx_t_6;
      __pyx_v_ss = __pyx_t_3;

      /* "utils.pxd":3347
 *     elif utc:
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 *             yy, mm, dd = dt.year, dt.month, dt.day
*/
    }

    /* "utils.pxd":3351
 *             yy, mm, dd = dt.year, dt.month, dt.day
 *             hh, mi, ss = dt.hour, dt.minute, dt.second
 *         isdst = 0             # <<<<<<<<<<<<<<
 * 
 *     # Aware, local wall time: set DST flag from tzinfo.dst(dt)
*/
    __pyx_v_isdst = 0;

    /* "utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":3355
 *     # Aware, local wall time: set DST flag from tzinfo.dst(dt)
 *     else:
 *         off = tz_dst(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             isdst = 1 if td_to_us(off) else 0
*/
  /*else*/ {
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_v_tzinfo, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":3356
 *     else:
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
*/
    __pyx_t_2 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":3357
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:
 *             isdst = 1 if td_to_us(off) else 0             # <<<<<<<<<<<<<<
 *         else:
 *             isdst = -1
*/
      __pyx_t_2 = (__pyx_f_7cytimes_5utils_td_to_us(__pyx_v_off) != 0);
      if (__pyx_t_2) {
        __pyx_t_3 = 1;
      } else {
        __pyx_t_3 = 0;
      }
      __pyx_v_isdst = __pyx_t_3;

      /* "utils.pxd":3356
 *     else:
 *         off = tz_dst(tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
*/
      goto __pyx_L5;
    }

    /* "utils.pxd":3359
 *             isdst = 1 if td_to_us(off) else 0
 *         else:
 *             isdst = -1             # <<<<<<<<<<<<<<
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
*/
    /*else*/ {
      __pyx_v_isdst = -1;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "utils.pxd":3361
 *             isdst = -1
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh             # <<<<<<<<<<<<<<
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
*/
  __pyx_t_3 = __pyx_v_ss;
  __pyx_t_6 = __pyx_v_mi;
  __pyx_t_7 = __pyx_v_hh;
  __pyx_v_out.tm_sec = __pyx_t_3;
  __pyx_v_out.tm_min = __pyx_t_6;
  __pyx_v_out.tm_hour = __pyx_t_7;

  /* "utils.pxd":3362
 * 
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy             # <<<<<<<<<<<<<<
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
*/
  __pyx_t_7 = __pyx_v_dd;
  __pyx_t_6 = __pyx_v_mm;
  __pyx_t_3 = __pyx_v_yy;
  __pyx_v_out.tm_mday = __pyx_t_7;
  __pyx_v_out.tm_mon = __pyx_t_6;
  __pyx_v_out.tm_year = __pyx_t_3;

  /* "utils.pxd":3363
 *     out.tm_sec, out.tm_min, out.tm_hour = ss, mi, hh
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst
*/
  __pyx_v_out.tm_wday = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":3364
 *     out.tm_mday, out.tm_mon, out.tm_year = dd, mm, yy
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd             # <<<<<<<<<<<<<<
 *     out.tm_isdst = isdst
 *     return out
*/
  __pyx_v_out.tm_yday = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) + __pyx_v_dd);

  /* "utils.pxd":3365
 *     out.tm_wday = ymd_weekday(yy, mm, dd)
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  __pyx_v_out.tm_isdst = __pyx_v_isdst;

  /* "utils.pxd":3366
 *     out.tm_yday = days_bf_month(yy, mm) + dd
 *     out.tm_isdst = isdst
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):
*/
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":3302
 *         )
 * 
 * cdef inline tm dt_to_tm(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to 'struct:tm' `<'struct:tm'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_to_tm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3368
 *     return out
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Convert a datetime to a C `ctime-style` string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_to_ctime(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_wkd;
  PyObject *__pyx_v_s_wkd = 0;
  PyObject *__pyx_v_s_mm = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[13];
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ctime", 0);

  /* "utils.pxd":3379
 *     """
 *     cdef:
 *         int yy = dt.year             # <<<<<<<<<<<<<<
 *         int mm = dt.month
 *         int dd = dt.day
*/
  __pyx_v_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3380
 *     cdef:
 *         int yy = dt.year
 *         int mm = dt.month             # <<<<<<<<<<<<<<
 *         int dd = dt.day
 *         int hh = dt.hour
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3381
 *         int yy = dt.year
 *         int mm = dt.month
 *         int dd = dt.day             # <<<<<<<<<<<<<<
 *         int hh = dt.hour
 *         int mi = dt.minute
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3382
 *         int mm = dt.month
 *         int dd = dt.day
 *         int hh = dt.hour             # <<<<<<<<<<<<<<
 *         int mi = dt.minute
 *         int ss = dt.second
*/
  __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3383
 *         int dd = dt.day
 *         int hh = dt.hour
 *         int mi = dt.minute             # <<<<<<<<<<<<<<
 *         int ss = dt.second
 *         int wkd = ymd_weekday(yy, mm, dd)
*/
  __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3384
 *         int hh = dt.hour
 *         int mi = dt.minute
 *         int ss = dt.second             # <<<<<<<<<<<<<<
 *         int wkd = ymd_weekday(yy, mm, dd)
 *         str s_wkd, s_mm
*/
  __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3385
 *         int mi = dt.minute
 *         int ss = dt.second
 *         int wkd = ymd_weekday(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         str s_wkd, s_mm
 * 
*/
  __pyx_v_wkd = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

  /* "utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
  switch (__pyx_v_wkd) {
    case 0:

    /* "utils.pxd":3390
 *     # Weekday
 *     if wkd == 0:
 *         s_wkd = "Mon"             # <<<<<<<<<<<<<<
 *     elif wkd == 1:
 *         s_wkd = "Tue"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Mon);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Mon;

    /* "utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
    break;
    case 1:

    /* "utils.pxd":3392
 *         s_wkd = "Mon"
 *     elif wkd == 1:
 *         s_wkd = "Tue"             # <<<<<<<<<<<<<<
 *     elif wkd == 2:
 *         s_wkd = "Wed"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Tue);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Tue;

    /* "utils.pxd":3391
 *     if wkd == 0:
 *         s_wkd = "Mon"
 *     elif wkd == 1:             # <<<<<<<<<<<<<<
 *         s_wkd = "Tue"
 *     elif wkd == 2:
*/
    break;
    case 2:

    /* "utils.pxd":3394
 *         s_wkd = "Tue"
 *     elif wkd == 2:
 *         s_wkd = "Wed"             # <<<<<<<<<<<<<<
 *     elif wkd == 3:
 *         s_wkd = "Thu"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Wed);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Wed;

    /* "utils.pxd":3393
 *     elif wkd == 1:
 *         s_wkd = "Tue"
 *     elif wkd == 2:             # <<<<<<<<<<<<<<
 *         s_wkd = "Wed"
 *     elif wkd == 3:
*/
    break;
    case 3:

    /* "utils.pxd":3396
 *         s_wkd = "Wed"
 *     elif wkd == 3:
 *         s_wkd = "Thu"             # <<<<<<<<<<<<<<
 *     elif wkd == 4:
 *         s_wkd = "Fri"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Thu);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Thu;

    /* "utils.pxd":3395
 *     elif wkd == 2:
 *         s_wkd = "Wed"
 *     elif wkd == 3:             # <<<<<<<<<<<<<<
 *         s_wkd = "Thu"
 *     elif wkd == 4:
*/
    break;
    case 4:

    /* "utils.pxd":3398
 *         s_wkd = "Thu"
 *     elif wkd == 4:
 *         s_wkd = "Fri"             # <<<<<<<<<<<<<<
 *     elif wkd == 5:
 *         s_wkd = "Sat"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Fri);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Fri;

    /* "utils.pxd":3397
 *     elif wkd == 3:
 *         s_wkd = "Thu"
 *     elif wkd == 4:             # <<<<<<<<<<<<<<
 *         s_wkd = "Fri"
 *     elif wkd == 5:
*/
    break;
    case 5:

    /* "utils.pxd":3400
 *         s_wkd = "Fri"
 *     elif wkd == 5:
 *         s_wkd = "Sat"             # <<<<<<<<<<<<<<
 *     else:
 *         s_wkd = "Sun"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sat);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Sat;

    /* "utils.pxd":3399
 *     elif wkd == 4:
 *         s_wkd = "Fri"
 *     elif wkd == 5:             # <<<<<<<<<<<<<<
 *         s_wkd = "Sat"
 *     else:
*/
    break;
    default:

    /* "utils.pxd":3402
 *         s_wkd = "Sat"
 *     else:
 *         s_wkd = "Sun"             # <<<<<<<<<<<<<<
 * 
 *     # Month
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sun);
    __pyx_v_s_wkd = __pyx_mstate_global->__pyx_n_u_Sun;
    break;
  }

  /* "utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
  switch (__pyx_v_mm) {
    case 1:

    /* "utils.pxd":3406
 *     # Month
 *     if mm == 1:
 *         s_mm = "Jan"             # <<<<<<<<<<<<<<
 *     elif mm == 2:
 *         s_mm = "Feb"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jan);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jan;

    /* "utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
    break;
    case 2:

    /* "utils.pxd":3408
 *         s_mm = "Jan"
 *     elif mm == 2:
 *         s_mm = "Feb"             # <<<<<<<<<<<<<<
 *     elif mm == 3:
 *         s_mm = "Mar"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Feb);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Feb;

    /* "utils.pxd":3407
 *     if mm == 1:
 *         s_mm = "Jan"
 *     elif mm == 2:             # <<<<<<<<<<<<<<
 *         s_mm = "Feb"
 *     elif mm == 3:
*/
    break;
    case 3:

    /* "utils.pxd":3410
 *         s_mm = "Feb"
 *     elif mm == 3:
 *         s_mm = "Mar"             # <<<<<<<<<<<<<<
 *     elif mm == 4:
 *         s_mm = "Apr"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Mar);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Mar;

    /* "utils.pxd":3409
 *     elif mm == 2:
 *         s_mm = "Feb"
 *     elif mm == 3:             # <<<<<<<<<<<<<<
 *         s_mm = "Mar"
 *     elif mm == 4:
*/
    break;
    case 4:

    /* "utils.pxd":3412
 *         s_mm = "Mar"
 *     elif mm == 4:
 *         s_mm = "Apr"             # <<<<<<<<<<<<<<
 *     elif mm == 5:
 *         s_mm = "May"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Apr);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Apr;

    /* "utils.pxd":3411
 *     elif mm == 3:
 *         s_mm = "Mar"
 *     elif mm == 4:             # <<<<<<<<<<<<<<
 *         s_mm = "Apr"
 *     elif mm == 5:
*/
    break;
    case 5:

    /* "utils.pxd":3414
 *         s_mm = "Apr"
 *     elif mm == 5:
 *         s_mm = "May"             # <<<<<<<<<<<<<<
 *     elif mm == 6:
 *         s_mm = "Jun"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_May);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_May;

    /* "utils.pxd":3413
 *     elif mm == 4:
 *         s_mm = "Apr"
 *     elif mm == 5:             # <<<<<<<<<<<<<<
 *         s_mm = "May"
 *     elif mm == 6:
*/
    break;
    case 6:

    /* "utils.pxd":3416
 *         s_mm = "May"
 *     elif mm == 6:
 *         s_mm = "Jun"             # <<<<<<<<<<<<<<
 *     elif mm == 7:
 *         s_mm = "Jul"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jun);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jun;

    /* "utils.pxd":3415
 *     elif mm == 5:
 *         s_mm = "May"
 *     elif mm == 6:             # <<<<<<<<<<<<<<
 *         s_mm = "Jun"
 *     elif mm == 7:
*/
    break;
    case 7:

    /* "utils.pxd":3418
 *         s_mm = "Jun"
 *     elif mm == 7:
 *         s_mm = "Jul"             # <<<<<<<<<<<<<<
 *     elif mm == 8:
 *         s_mm = "Aug"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Jul);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Jul;

    /* "utils.pxd":3417
 *     elif mm == 6:
 *         s_mm = "Jun"
 *     elif mm == 7:             # <<<<<<<<<<<<<<
 *         s_mm = "Jul"
 *     elif mm == 8:
*/
    break;
    case 8:

    /* "utils.pxd":3420
 *         s_mm = "Jul"
 *     elif mm == 8:
 *         s_mm = "Aug"             # <<<<<<<<<<<<<<
 *     elif mm == 9:
 *         s_mm = "Sep"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Aug);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Aug;

    /* "utils.pxd":3419
 *     elif mm == 7:
 *         s_mm = "Jul"
 *     elif mm == 8:             # <<<<<<<<<<<<<<
 *         s_mm = "Aug"
 *     elif mm == 9:
*/
    break;
    case 9:

    /* "utils.pxd":3422
 *         s_mm = "Aug"
 *     elif mm == 9:
 *         s_mm = "Sep"             # <<<<<<<<<<<<<<
 *     elif mm == 10:
 *         s_mm = "Oct"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Sep);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Sep;

    /* "utils.pxd":3421
 *     elif mm == 8:
 *         s_mm = "Aug"
 *     elif mm == 9:             # <<<<<<<<<<<<<<
 *         s_mm = "Sep"
 *     elif mm == 10:
*/
    break;
    case 10:

    /* "utils.pxd":3424
 *         s_mm = "Sep"
 *     elif mm == 10:
 *         s_mm = "Oct"             # <<<<<<<<<<<<<<
 *     elif mm == 11:
 *         s_mm = "Nov"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Oct);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Oct;

    /* "utils.pxd":3423
 *     elif mm == 9:
 *         s_mm = "Sep"
 *     elif mm == 10:             # <<<<<<<<<<<<<<
 *         s_mm = "Oct"
 *     elif mm == 11:
*/
    break;
    case 11:

    /* "utils.pxd":3426
 *         s_mm = "Oct"
 *     elif mm == 11:
 *         s_mm = "Nov"             # <<<<<<<<<<<<<<
 *     else:
 *         s_mm = "Dec"
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Nov);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Nov;

    /* "utils.pxd":3425
 *     elif mm == 10:
 *         s_mm = "Oct"
 *     elif mm == 11:             # <<<<<<<<<<<<<<
 *         s_mm = "Nov"
 *     else:
*/
    break;
    default:

    /* "utils.pxd":3428
 *         s_mm = "Nov"
 *     else:
 *         s_mm = "Dec"             # <<<<<<<<<<<<<<
 * 
 *     # Fromat
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Dec);
    __pyx_v_s_mm = __pyx_mstate_global->__pyx_n_u_Dec;
    break;
  }

  /* "utils.pxd":3431
 * 
 *     # Fromat
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_dd, 2, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_hh, 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_mi, 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_ss, 2, '0', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_yy, 4, '0', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6[0] = __pyx_v_s_wkd;
  __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[2] = __pyx_v_s_mm;
  __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[4] = __pyx_t_1;
  __pyx_t_6[5] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[6] = __pyx_t_2;
  __pyx_t_6[7] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_6[8] = __pyx_t_3;
  __pyx_t_6[9] = __pyx_mstate_global->__pyx_kp_u__7;
  __pyx_t_6[10] = __pyx_t_4;
  __pyx_t_6[11] = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_6[12] = __pyx_t_5;
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s_wkd) + 1 * 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s_mm) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_s_wkd) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_s_mm));
  if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3368
 *     return out
 * 
 * cdef inline str dt_to_ctime(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Convert a datetime to a C `ctime-style` string `<'str'>`.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ctime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_wkd);
  __Pyx_XDECREF(__pyx_v_s_mm);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_us(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_us *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_ord;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_Delta *__pyx_v_off = 0;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __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("dt_to_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3448
 *     # Compute microseconds
 *     cdef:
 *         long long ord = dt_to_ord(dt, False)             # <<<<<<<<<<<<<<
 *         long long us  = (
 *             (ord - EPOCH_DAY)           * US_DAY +
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3448, __pyx_L1_error)
  __pyx_v_ord = __pyx_t_1;

  /* "utils.pxd":3453
 *             (<long long> dt.hour)       * US_HOUR +
 *             (<long long> dt.minute)     * US_MINUTE +
 *             (<long long> dt.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *             (<long long> dt.microsecond)
 *         )
*/
  __pyx_v_us = ((((((__pyx_v_ord - __pyx_v_7cytimes_5utils_EPOCH_DAY) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_HOUR)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)));

  /* "utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  __pyx_t_3 = (!__pyx_v_utc);
  if (__pyx_t_3) {

    /* "utils.pxd":3457
 *         )
 *     if not utc:
 *         return us             # <<<<<<<<<<<<<<
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
*/
    __pyx_r = __pyx_v_us;
    goto __pyx_L0;

    /* "utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  }

  /* "utils.pxd":3460
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)             # <<<<<<<<<<<<<<
 *     return us if off is None else us - td_to_us(off)
 * 
*/
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(__pyx_v_dt)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "utils.pxd":3461
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     return us if off is None else us - td_to_us(off)             # <<<<<<<<<<<<<<
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:
*/
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_us;
  } else {
    __pyx_t_1 = (__pyx_v_us - __pyx_f_7cytimes_5utils_td_to_us(__pyx_v_off));
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":3433
 *     return "%s %s %2d %02d:%02d:%02d %04d" % (s_wkd, s_mm, dd, hh, mi, ss, yy)
 * 
 * cdef inline long long dt_to_us(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to microseconds since the Unix epoch `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.dt_to_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_sec(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_sec *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_us;
  double __pyx_r;
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3476
 *     :returns `<'float'>`: Seconds since the Unix epoch.
 *     """
 *     cdef long long us = dt_to_us(dt, utc)             # <<<<<<<<<<<<<<
 *     return <double> us * 1e-6
 * 
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = __pyx_v_utc;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3476, __pyx_L1_error)
  __pyx_v_us = __pyx_t_1;

  /* "utils.pxd":3477
 *     """
 *     cdef long long us = dt_to_us(dt, utc)
 *     return <double> us * 1e-6             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:
*/
  __pyx_r = (((double)__pyx_v_us) * 1e-6);
  goto __pyx_L0;

  /* "utils.pxd":3463
 *     return us if off is None else us - td_to_us(off)
 * 
 * cdef inline double dt_to_sec(datetime.datetime dt, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to seconds since the Unix epoch `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_to_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_to_ord(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_to_ord *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_ord;
  PyDateTime_Delta *__pyx_v_off = 0;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_us_off;
  PY_LONG_LONG __pyx_v_adj;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3494
 *     """
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)             # <<<<<<<<<<<<<<
 *     if not utc:
 *         return ord
*/
  __pyx_v_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt));

  /* "utils.pxd":3495
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  __pyx_t_1 = (!__pyx_v_utc);
  if (__pyx_t_1) {

    /* "utils.pxd":3496
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:
 *         return ord             # <<<<<<<<<<<<<<
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
*/
    __pyx_r = __pyx_v_ord;
    goto __pyx_L0;

    /* "utils.pxd":3495
 *     # Compute ordinal from Y/M/D
 *     cdef long long ord = ymd_to_ord(dt.year, dt.month, dt.day)
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  }

  /* "utils.pxd":3499
 * 
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)             # <<<<<<<<<<<<<<
 *     if off is None:
 *         return ord
*/
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(__pyx_v_dt)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3500
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3501
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:
 *         return ord             # <<<<<<<<<<<<<<
 * 
 *     # Compare at microsecond precision: local TOD vs offset
*/
    __pyx_r = __pyx_v_ord;
    goto __pyx_L0;

    /* "utils.pxd":3500
 *     # Aware-only: get UTC offset; None means treat as naive
 *     cdef datetime.timedelta off = dt_utcoffset(dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return ord
 * 
*/
  }

  /* "utils.pxd":3508
 *         (<long long>dt.hour)            * US_HOUR +
 *         (<long long>dt.minute)          * US_MINUTE +
 *         (<long long>dt.second)          * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long>dt.microsecond)
 *     )
*/
  __pyx_v_us = ((((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_HOUR) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)));

  /* "utils.pxd":3515
 *     cdef long long us_off = (
 *         (<long long> off.day)        * US_DAY +
 *         (<long long> off.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> off.microsecond)
 *     )
*/
  __pyx_v_us_off = (((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off)) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off)));

  /* "utils.pxd":3520
 * 
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off             # <<<<<<<<<<<<<<
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
*/
  __pyx_v_adj = (__pyx_v_us - __pyx_v_us_off);

  /* "utils.pxd":3521
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off
 *     if adj < 0:             # <<<<<<<<<<<<<<
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
*/
  __pyx_t_1 = (__pyx_v_adj < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":3522
 *     cdef long long adj = us - us_off
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day             # <<<<<<<<<<<<<<
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day
*/
    __pyx_v_ord = (__pyx_v_ord - 1);

    /* "utils.pxd":3521
 *     # Adjust ordinal according to the offset
 *     cdef long long adj = us - us_off
 *     if adj < 0:             # <<<<<<<<<<<<<<
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":3523
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:             # <<<<<<<<<<<<<<
 *         ord += 1          # UTC is "later" calendar day
 *     return ord
*/
  __pyx_t_1 = (__pyx_v_adj >= __pyx_v_7cytimes_5utils_US_DAY);
  if (__pyx_t_1) {

    /* "utils.pxd":3524
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day             # <<<<<<<<<<<<<<
 *     return ord
 * 
*/
    __pyx_v_ord = (__pyx_v_ord + 1);

    /* "utils.pxd":3523
 *     if adj < 0:
 *         ord -= 1          # UTC is "earlier" calendar day
 *     elif adj >= US_DAY:             # <<<<<<<<<<<<<<
 *         ord += 1          # UTC is "later" calendar day
 *     return ord
*/
  }
  __pyx_L5:;

  /* "utils.pxd":3525
 *     elif adj >= US_DAY:
 *         ord += 1          # UTC is "later" calendar day
 *     return ord             # <<<<<<<<<<<<<<
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:
*/
  __pyx_r = __pyx_v_ord;
  goto __pyx_L0;

  /* "utils.pxd":3479
 *     return <double> us * 1e-6
 * 
 * cdef inline long long dt_to_ord(datetime.datetime dt, bint utc=False) except -1:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to its Gregorian ordinal day `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3527
 *     return ord
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to POSIX timestamp (seconds since the Unix epoch) `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_dt_to_ts(PyDateTime_DateTime *__pyx_v_dt) {
  double __pyx_v_t;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  double __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_to_ts", 0);

  /* "utils.pxd":3541
 *     """
 *     # Timezone-aware
 *     if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *         return dt_to_sec(dt, True)
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3541, __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 (__pyx_t_2) {

    /* "utils.pxd":3542
 *     # Timezone-aware
 *     if dt.tzinfo is not None:
 *         return dt_to_sec(dt, True)             # <<<<<<<<<<<<<<
 * 
 *     # Timezone-naive: interpret as local time
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.utc = 1;
    __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_to_sec(__pyx_v_dt, &__pyx_t_4); if (unlikely(__pyx_t_3 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 3542, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;

    /* "utils.pxd":3541
 *     """
 *     # Timezone-aware
 *     if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *         return dt_to_sec(dt, True)
 * 
*/
  }

  /* "utils.pxd":3545
 * 
 *     # Timezone-naive: interpret as local time
 *     cdef double t = <double> dt_local_mktime(dt)             # <<<<<<<<<<<<<<
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
*/
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_local_mktime(__pyx_v_dt); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3545, __pyx_L1_error)
  __pyx_v_t = ((double)__pyx_t_5);

  /* "utils.pxd":3546
 *     # Timezone-naive: interpret as local time
 *     cdef double t = <double> dt_local_mktime(dt)
 *     return t + (<double> dt.microsecond) * 1e-6             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:
*/
  __pyx_r = (__pyx_v_t + (((double)__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt)) * 1e-6));
  goto __pyx_L0;

  /* "utils.pxd":3527
 *     return ord
 * 
 * cdef inline double dt_to_ts(datetime.datetime dt) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to POSIX timestamp (seconds since the Unix epoch) `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_to_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PyDateTime_Delta *__pyx_v_off = 0;
  Py_ssize_t __pyx_v_size;
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_us;
  Py_UCS4 __pyx_v_ch;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_8;
  int __pyx_t_9;
  int __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("dt_as_epoch", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_dt);

  /* "utils.pxd":3583
 *         * 'us' reproduces the exact microsecond field.
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":3584
 *     """
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         datetime.timedelta off
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 3584, __pyx_L1_error)

    /* "utils.pxd":3583
 *         * 'us' reproduces the exact microsecond field.
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  }

  /* "utils.pxd":3587
 *     cdef:
 *         datetime.timedelta off
 *         Py_ssize_t size = str_len(as_unit)             # <<<<<<<<<<<<<<
 *         long long n, q, r, hh, mi, ss, us
 *         Py_UCS4 ch
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_as_unit);

  /* "utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "utils.pxd":3593
 *     # Optional UTC adjustment
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
*/
    __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = __pyx_v_dt;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_t_2, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":3594
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 * 
*/
    __pyx_t_1 = (((PyObject *)__pyx_v_off) != Py_None);
    if (__pyx_t_1) {

      /* "utils.pxd":3595
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
*/
      __pyx_t_5.__pyx_n = 4;
      __pyx_t_5.days = (-__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off));
      __pyx_t_5.seconds = (-__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));
      __pyx_t_5.microseconds = (-__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_off));
      __pyx_t_5.dtclass = Py_None;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":3594
 *     if utc:
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:             # <<<<<<<<<<<<<<
 *             dt = dt_add(dt, -off.day, -off.second, -off.microsecond, None)
 * 
*/
    }

    /* "utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  }

  /* "utils.pxd":3598
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . year
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":3599
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         # . year
 *         if ch == "Y":
*/
    __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3599, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_6;

    /* "utils.pxd":3601
 *         ch = str_read(as_unit, 0)
 *         # . year
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":3602
 *         # . year
 *         if ch == "Y":
 *             return dt.year - EPOCH_YEAR             # <<<<<<<<<<<<<<
 *         # . quarter
 *         if ch == "Q":
*/
      __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR);
      goto __pyx_L0;

      /* "utils.pxd":3601
 *         ch = str_read(as_unit, 0)
 *         # . year
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
*/
    }

    /* "utils.pxd":3604
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
*/
    __pyx_t_1 = (__pyx_v_ch == 81);
    if (__pyx_t_1) {

      /* "utils.pxd":3605
 *         # . quarter
 *         if ch == "Q":
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1             # <<<<<<<<<<<<<<
 *         # . month
 *         if ch == "M":
*/
      __pyx_r = ((((__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 4) + __pyx_f_7cytimes_5utils_quarter_of_month(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt))) - 1);
      goto __pyx_L0;

      /* "utils.pxd":3604
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
*/
    }

    /* "utils.pxd":3607
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":3608
 *         # . month
 *         if ch == "M":
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1             # <<<<<<<<<<<<<<
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
*/
      __pyx_r = ((((__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt) - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12) + __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt)) - 1);
      goto __pyx_L0;

      /* "utils.pxd":3607
 *             return (dt.year - EPOCH_YEAR) * 4 + quarter_of_month(dt.month) - 1
 *         # . month
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
*/
    }

    /* "utils.pxd":3610
 *             return (dt.year - EPOCH_YEAR) * 12 + dt.month - 1
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             with cython.cdivision(True):
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3610, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3611
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":3613
 *         if ch == "W":
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     q -= 1
*/
      __pyx_v_q = (__pyx_v_n / 7);
      __pyx_v_r = (__pyx_v_n % 7);

      /* "utils.pxd":3614
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1
 *             return q
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {

        /* "utils.pxd":3615
 *                 q = n / 7; r = n % 7
 *                 if r < 0:
 *                     q -= 1             # <<<<<<<<<<<<<<
 *             return q
 *         # . day
*/
        __pyx_v_q = (__pyx_v_q - 1);

        /* "utils.pxd":3614
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1
 *             return q
*/
      }

      /* "utils.pxd":3616
 *                 if r < 0:
 *                     q -= 1
 *             return q             # <<<<<<<<<<<<<<
 *         # . day
 *         if ch == "D":
*/
      __pyx_r = __pyx_v_q;
      goto __pyx_L0;

      /* "utils.pxd":3611
 *         # . week
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
*/
    }

    /* "utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":3619
 *         # . day
 *         if ch == "D":
 *             return n             # <<<<<<<<<<<<<<
 *         # . hour
 *         hh = dt.hour
*/
      __pyx_r = __pyx_v_n;
      goto __pyx_L0;

      /* "utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    }

    /* "utils.pxd":3621
 *             return n
 *         # . hour
 *         hh = dt.hour             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return n * 24 + hh
*/
    __pyx_v_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

    /* "utils.pxd":3622
 *         # . hour
 *         hh = dt.hour
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return n * 24 + hh
 *         # . minute
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":3623
 *         hh = dt.hour
 *         if ch == "h":
 *             return n * 24 + hh             # <<<<<<<<<<<<<<
 *         # . minute
 *         mi = dt.minute
*/
      __pyx_r = ((__pyx_v_n * 24) + __pyx_v_hh);
      goto __pyx_L0;

      /* "utils.pxd":3622
 *         # . hour
 *         hh = dt.hour
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return n * 24 + hh
 *         # . minute
*/
    }

    /* "utils.pxd":3625
 *             return n * 24 + hh
 *         # . minute
 *         mi = dt.minute             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return n * 1_440 + hh * 60 + mi
*/
    __pyx_v_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

    /* "utils.pxd":3626
 *         # . minute
 *         mi = dt.minute
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":3627
 *         mi = dt.minute
 *         if ch == "m":
 *             return n * 1_440 + hh * 60 + mi             # <<<<<<<<<<<<<<
 *         # . second
 *         ss = dt.second
*/
      __pyx_r = (((__pyx_v_n * 0x5A0) + (__pyx_v_hh * 60)) + __pyx_v_mi);
      goto __pyx_L0;

      /* "utils.pxd":3626
 *         # . minute
 *         mi = dt.minute
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
*/
    }

    /* "utils.pxd":3629
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
 *         ss = dt.second             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
*/
    __pyx_v_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

    /* "utils.pxd":3630
 *         # . second
 *         ss = dt.second
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":3631
 *         ss = dt.second
 *         if ch == "s":
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms'
*/
      __pyx_r = ((((__pyx_v_n * __pyx_v_7cytimes_5utils_SS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_SS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_SS_MINUTE)) + __pyx_v_ss);
      goto __pyx_L0;

      /* "utils.pxd":3630
 *         # . second
 *         ss = dt.second
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
    }

    /* "utils.pxd":3598
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . year
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":3634
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
*/
  __pyx_t_9 = (__pyx_v_size == 2);
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 1); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3634, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_6 == 0x73);
  __pyx_t_1 = __pyx_t_9;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3635
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
*/
    __pyx_t_6 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_6 == ((Py_UCS4)-1))) __PYX_ERR(5, 3635, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_6;

    /* "utils.pxd":3637
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3637, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3638
 *         # . millisecond
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             with cython.cdivision(True):
*/
    __pyx_t_10 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_11 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_t_12 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
    __pyx_t_13 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
    __pyx_v_hh = __pyx_t_10;
    __pyx_v_mi = __pyx_t_11;
    __pyx_v_ss = __pyx_t_12;
    __pyx_v_us = __pyx_t_13;

    /* "utils.pxd":3639
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 us = us / 1_000
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":3641
 *         if ch == "m":
 *             with cython.cdivision(True):
 *                 us = us / 1_000             # <<<<<<<<<<<<<<
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
*/
      __pyx_v_us = (__pyx_v_us / 0x3E8);

      /* "utils.pxd":3642
 *             with cython.cdivision(True):
 *                 us = us / 1_000
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us             # <<<<<<<<<<<<<<
 *         # . microsecond
 *         if ch == "u":
*/
      __pyx_r = (((((__pyx_v_n * __pyx_v_7cytimes_5utils_MS_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_MS_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_MS_MINUTE)) + (__pyx_v_ss * __pyx_v_7cytimes_5utils_MS_SECOND)) + __pyx_v_us);
      goto __pyx_L0;

      /* "utils.pxd":3639
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi, ss, us = dt.hour, dt.minute, dt.second, dt.microsecond
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 us = us / 1_000
*/
    }

    /* "utils.pxd":3644
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":3645
 *         # . microsecond
 *         if ch == "u":
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __pyx_r = (((((__pyx_v_n * __pyx_v_7cytimes_5utils_US_DAY) + (__pyx_v_hh * __pyx_v_7cytimes_5utils_US_HOUR)) + (__pyx_v_mi * __pyx_v_7cytimes_5utils_US_MINUTE)) + (__pyx_v_ss * __pyx_v_7cytimes_5utils_US_SECOND)) + __pyx_v_us);
      goto __pyx_L0;

      /* "utils.pxd":3644
 *             return n * MS_DAY + hh * MS_HOUR + mi * MS_MINUTE + ss * MS_SECOND + us
 *         # . microsecond
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return n * US_DAY + hh * US_HOUR + mi * US_MINUTE + ss * US_SECOND + us
 * 
*/
    }

    /* "utils.pxd":3634
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         # . millisecond
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":3648
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
*/
  __pyx_t_9 = (__pyx_v_size == 3);
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_as_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(5, 3648, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_9;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3649
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":
 *         n = dt_to_ord(dt, False) - EPOCH_DAY             # <<<<<<<<<<<<<<
 *         hh, mi = dt.hour, dt.minute
 *         return n * 1_440 + hh * 60 + mi
*/
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.utc = 0;
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3649, __pyx_L1_error)
    __pyx_v_n = (__pyx_t_7 - __pyx_v_7cytimes_5utils_EPOCH_DAY);

    /* "utils.pxd":3650
 *     elif size == 3 and as_unit == "min":
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute             # <<<<<<<<<<<<<<
 *         return n * 1_440 + hh * 60 + mi
 * 
*/
    __pyx_t_13 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_12 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_v_hh = __pyx_t_13;
    __pyx_v_mi = __pyx_t_12;

    /* "utils.pxd":3651
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
 *         return n * 1_440 + hh * 60 + mi             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_r = (((__pyx_v_n * 0x5A0) + (__pyx_v_hh * 60)) + __pyx_v_mi);
    goto __pyx_L0;

    /* "utils.pxd":3648
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         n = dt_to_ord(dt, False) - EPOCH_DAY
 *         hh, mi = dt.hour, dt.minute
*/
  }
  __pyx_L6:;

  /* "utils.pxd":3654
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 3654, __pyx_L1_error)

  /* "utils.pxd":3548
 *     return t + (<double> dt.microsecond) * 1e-6
 * 
 * cdef inline long long dt_as_epoch(datetime.datetime dt, str as_unit, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count since the Unix epoch `<'int'>`,
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_as_epoch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_dt_as_epoch_W_iso(PyDateTime_DateTime *__pyx_v_dt, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_v_adj;
  PY_LONG_LONG __pyx_v_n;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_r;
  long __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":3678
 *     - Uses mathematical floor division so dates before the epoch are handled correctly.
 *     """
 *     cdef long long adj = 4 - min(max(weekday, 1), 7)             # <<<<<<<<<<<<<<
 *     cdef long long n = dt_to_ord(dt, utc) - EPOCH_DAY + adj
 *     cdef long long q, r
*/
  __pyx_t_1 = 7;
  __pyx_t_2 = 1;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_5 = (__pyx_t_2 > __pyx_t_3);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_2 = __pyx_t_4;
  __pyx_t_5 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_v_adj = (4 - __pyx_t_4);

  /* "utils.pxd":3679
 *     """
 *     cdef long long adj = 4 - min(max(weekday, 1), 7)
 *     cdef long long n = dt_to_ord(dt, utc) - EPOCH_DAY + adj             # <<<<<<<<<<<<<<
 *     cdef long long q, r
 *     with cython.cdivision(True):
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = __pyx_v_utc;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3679, __pyx_L1_error)
  __pyx_v_n = ((__pyx_t_6 - __pyx_v_7cytimes_5utils_EPOCH_DAY) + __pyx_v_adj);

  /* "utils.pxd":3682
 *     cdef long long q, r
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
  __pyx_v_q = (__pyx_v_n / 7);
  __pyx_v_r = (__pyx_v_n % 7);

  /* "utils.pxd":3683
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return q
*/
  __pyx_t_5 = (__pyx_v_r < 0);
  if (__pyx_t_5) {

    /* "utils.pxd":3684
 *         q = n / 7; r = n % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return q
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "utils.pxd":3683
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return q
*/
  }

  /* "utils.pxd":3685
 *         if r < 0:
 *             q -= 1
 *     return q             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = __pyx_v_q;
  goto __pyx_L0;

  /* "utils.pxd":3656
 *     _raise_invalid_nptime_str_unit_error(as_unit)
 * 
 * cdef inline long long dt_as_epoch_W_iso(datetime.datetime dt, int weekday, bint utc=False) except *:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to an integer count of whole
 *     weeks since the Unix epoch, where weeks are aligned to a chosen
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt_as_epoch_W_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_dtm __pyx_v__dtm;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3697
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef dtm _dtm = dtm_fr_us(value)             # <<<<<<<<<<<<<<
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
*/
  __pyx_v__dtm = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_v_value);

  /* "utils.pxd":3698
 *     """
 *     cdef dtm _dtm = dtm_fr_us(value)
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, tzinfo, 0, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3700
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, tzinfo, 0, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__dtm.year;
  __pyx_t_2.month = __pyx_v__dtm.month;
  __pyx_t_2.day = __pyx_v__dtm.day;
  __pyx_t_2.hour = __pyx_v__dtm.hour;
  __pyx_t_2.minute = __pyx_v__dtm.minute;
  __pyx_t_2.second = __pyx_v__dtm.second;
  __pyx_t_2.microsecond = __pyx_v__dtm.microsecond;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3688
 * 
 * # . conversion: from
 * cdef inline datetime.datetime dt_fr_us(long long value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from microseconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3712
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3712, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_v_tzinfo;
  __pyx_t_3.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3703
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_sec(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from seconds since the Unix epoch `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ord(int __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3723
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_value);

  /* "utils.pxd":3724
 *     """
 *     cdef ymd _ymd = ymd_fr_ord(value)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3714
 *     return dt_fr_us(sec_to_us(value), tzinfo, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ord(int value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a Gregorian ordinal (0001-01-01 = 1) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_iso(int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3739
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday);

  /* "utils.pxd":3740
 *     """
 *     cdef ymd _ymd = ymd_fr_iso(year, week, weekday)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3726
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_iso(int year, int week, int weekday, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from ISO calendar values (year, week, weekday) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_doy(int __pyx_v_year, int __pyx_v_doy, struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_doy", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3753
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)             # <<<<<<<<<<<<<<
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
*/
  __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_v_year, __pyx_v_doy);

  /* "utils.pxd":3754
 *     """
 *     cdef ymd _ymd = ymd_fr_doy(year, doy)
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_v__ymd.year;
  __pyx_t_2.month = __pyx_v__ymd.month;
  __pyx_t_2.day = __pyx_v__ymd.day;
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3742
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_doy(int year, int doy, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from Gregorian year and day-of-year `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_doy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_ts(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cpython_8datetime_datetime_from_timestamp __pyx_t_3;
  int __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3772
 *     >>> datetime.datetime.fromtimestamp(value, tzinfo)
 *     """
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(value, tzinfo)             # <<<<<<<<<<<<<<
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tz = __pyx_v_tzinfo;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_from_timestamp(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":3773
 *     """
 *     cdef datetime.datetime dt = datetime.datetime_from_timestamp(value, tzinfo)
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_4) {
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_t_2 = ((PyObject *)__pyx_v_dt);
  } else {
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3756
 *     return dt_new(_ymd.year, _ymd.month, _ymd.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_ts(double value, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from a POSIX timestamp with optional timezone `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_date(PyDateTime_Date *__pyx_v_date, struct __pyx_opt_args_7cytimes_5utils_dt_fr_date *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":3785
 *         with the same date fields (time fields are set to 0).
 *     """
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.year = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_2.month = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_2.day = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_t_2.hour = 0;
  __pyx_t_2.minute = 0;
  __pyx_t_2.second = 0;
  __pyx_t_2.microsecond = 0;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3775
 *     return dt if dtclass is None else dt_fr_dt(dt, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_date(datetime.date date, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from date (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }
  __Pyx_INCREF(__pyx_v_dtclass);

  /* "utils.pxd":3797
 *         with the same fields and tzinfo.
 *     """
 *     if dtclass is None:             # <<<<<<<<<<<<<<
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
*/
  __pyx_t_1 = (__pyx_v_dtclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3798
 *     """
 *     if dtclass is None:
 *         dtclass = datetime.datetime             # <<<<<<<<<<<<<<
 *     if dtclass is type(dt):
 *         return dt
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
    __Pyx_DECREF_SET(__pyx_v_dtclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime));

    /* "utils.pxd":3797
 *         with the same fields and tzinfo.
 *     """
 *     if dtclass is None:             # <<<<<<<<<<<<<<
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
*/
  }

  /* "utils.pxd":3799
 *     if dtclass is None:
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):             # <<<<<<<<<<<<<<
 *         return dt
 *     return dt_new(
*/
  __pyx_t_1 = (__pyx_v_dtclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt))));
  if (__pyx_t_1) {

    /* "utils.pxd":3800
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
 *         return dt             # <<<<<<<<<<<<<<
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_dt);
    __pyx_r = __pyx_v_dt;
    goto __pyx_L0;

    /* "utils.pxd":3799
 *     if dtclass is None:
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):             # <<<<<<<<<<<<<<
 *         return dt
 *     return dt_new(
*/
  }

  /* "utils.pxd":3801
 *     if dtclass is type(dt):
 *         return dt
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3803
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":3801
 *     if dtclass is type(dt):
 *         return dt
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_4.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_4.tzinfo = __pyx_t_2;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3787
 *     return dt_new(date.year, date.month, date.day, 0, 0, 0, 0, tzinfo, 0, dtclass)
 * 
 * cdef inline datetime.datetime dt_fr_dt(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from another datetime (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dtclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_fr_time(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_dt_fr_time *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_fr_time", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":3815
 *         with the same time fields and tzinfo (date fields are set to 1970-01-01).
 *     """
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3817
 *     return dt_new(
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "utils.pxd":3815
 *         with the same time fields and tzinfo (date fields are set to 1970-01-01).
 *     """
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         1970, 1, 1, time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, dtclass,
*/
  __pyx_t_3.__pyx_n = 10;
  __pyx_t_3.year = 0x7B2;
  __pyx_t_3.month = 1;
  __pyx_t_3.day = 1;
  __pyx_t_3.hour = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
  __pyx_t_3.minute = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
  __pyx_t_3.second = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
  __pyx_t_3.microsecond = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.fold = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
  __pyx_t_3.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3806
 *     )
 * 
 * cdef inline datetime.datetime dt_fr_time(datetime.time time, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create datetime from time (include subclass) `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_fr_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_combine(struct __pyx_opt_args_7cytimes_5utils_dt_combine *__pyx_optional_args) {
  PyDateTime_Date *__pyx_v_date = ((PyDateTime_Date *)Py_None);
  PyDateTime_Time *__pyx_v_time = ((PyDateTime_Time *)Py_None);
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_us;
  int __pyx_v_fold;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_now __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_combine", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_date = __pyx_optional_args->date;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_time = __pyx_optional_args->time;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dtclass = __pyx_optional_args->dtclass;
          }
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_date);
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "utils.pxd":3835
 *     cdef int yy, mm, dd, hh, mi, ss, us, fold
 *     # Date
 *     if date is None:             # <<<<<<<<<<<<<<
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_date) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3836
 *     # Date
 *     if date is None:
 *         date = date_now(None, None)             # <<<<<<<<<<<<<<
 *     yy, mm, dd = date.year, date.month, date.day
 * 
*/
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.tzinfo = Py_None;
    __pyx_t_3.dclass = Py_None;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_date, ((PyDateTime_Date *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":3835
 *     cdef int yy, mm, dd, hh, mi, ss, us, fold
 *     # Date
 *     if date is None:             # <<<<<<<<<<<<<<
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day
*/
  }

  /* "utils.pxd":3837
 *     if date is None:
 *         date = date_now(None, None)
 *     yy, mm, dd = date.year, date.month, date.day             # <<<<<<<<<<<<<<
 * 
 *     # Time
*/
  __pyx_t_4 = __pyx_f_7cpython_8datetime_4date_4year_year(__pyx_v_date);
  __pyx_t_5 = __pyx_f_7cpython_8datetime_4date_5month_month(__pyx_v_date);
  __pyx_t_6 = __pyx_f_7cpython_8datetime_4date_3day_day(__pyx_v_date);
  __pyx_v_yy = __pyx_t_4;
  __pyx_v_mm = __pyx_t_5;
  __pyx_v_dd = __pyx_t_6;

  /* "utils.pxd":3840
 * 
 *     # Time
 *     if time is None:             # <<<<<<<<<<<<<<
 *         hh = mi = ss = us = fold = 0
 *     else:
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_time) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":3841
 *     # Time
 *     if time is None:
 *         hh = mi = ss = us = fold = 0             # <<<<<<<<<<<<<<
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second
*/
    __pyx_v_hh = 0;
    __pyx_v_mi = 0;
    __pyx_v_ss = 0;
    __pyx_v_us = 0;
    __pyx_v_fold = 0;

    /* "utils.pxd":3840
 * 
 *     # Time
 *     if time is None:             # <<<<<<<<<<<<<<
 *         hh = mi = ss = us = fold = 0
 *     else:
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":3843
 *         hh = mi = ss = us = fold = 0
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second             # <<<<<<<<<<<<<<
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:
*/
  /*else*/ {
    __pyx_t_6 = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
    __pyx_t_5 = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
    __pyx_t_4 = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
    __pyx_v_hh = __pyx_t_6;
    __pyx_v_mi = __pyx_t_5;
    __pyx_v_ss = __pyx_t_4;

    /* "utils.pxd":3844
 *     else:
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold             # <<<<<<<<<<<<<<
 *         if tzinfo is None:
 *             tzinfo = time.tzinfo
*/
    __pyx_t_4 = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
    __pyx_t_5 = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
    __pyx_v_us = __pyx_t_4;
    __pyx_v_fold = __pyx_t_5;

    /* "utils.pxd":3845
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             tzinfo = time.tzinfo
 * 
*/
    __pyx_t_1 = (__pyx_v_tzinfo == Py_None);
    if (__pyx_t_1) {

      /* "utils.pxd":3846
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:
 *             tzinfo = time.tzinfo             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
      __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "utils.pxd":3845
 *         hh, mi, ss = time.hour, time.minute, time.second
 *         us, fold   = time.microsecond, time.fold
 *         if tzinfo is None:             # <<<<<<<<<<<<<<
 *             tzinfo = time.tzinfo
 * 
*/
    }
  }
  __pyx_L4:;

  /* "utils.pxd":3849
 * 
 *     # New datetime
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, tzinfo, fold, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 10;
  __pyx_t_7.year = __pyx_v_yy;
  __pyx_t_7.month = __pyx_v_mm;
  __pyx_t_7.day = __pyx_v_dd;
  __pyx_t_7.hour = __pyx_v_hh;
  __pyx_t_7.minute = __pyx_v_mi;
  __pyx_t_7.second = __pyx_v_ss;
  __pyx_t_7.microsecond = __pyx_v_us;
  __pyx_t_7.tzinfo = __pyx_v_tzinfo;
  __pyx_t_7.fold = __pyx_v_fold;
  __pyx_t_7.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3820
 *     )
 * 
 * cdef inline datetime.datetime dt_combine(datetime.date date=None, datetime.time time=None, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a `datetime.datetime` by combining a date and a time `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_add *__pyx_optional_args) {
  int __pyx_v_days = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PY_LONG_LONG __pyx_v_us;
  __pyx_t_7cytimes_5utils_dtm __pyx_v__dtm;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_4;
  PY_LONG_LONG __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_add", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_days = __pyx_optional_args->days;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_seconds = __pyx_optional_args->seconds;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_microseconds = __pyx_optional_args->microseconds;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_dtclass = __pyx_optional_args->dtclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":3873
 *     # Fast-path: days only  preserve time fields and bump ordinal
 *     cdef ymd _ymd
 *     if seconds == 0 and microseconds == 0:             # <<<<<<<<<<<<<<
 *         # Early exit
 *         if days == 0:
*/
  __pyx_t_2 = (__pyx_v_seconds == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_microseconds == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":3875
 *     if seconds == 0 and microseconds == 0:
 *         # Early exit
 *         if days == 0:             # <<<<<<<<<<<<<<
 *             return dt_fr_dt(dt, dtclass)
 * 
*/
    __pyx_t_1 = (__pyx_v_days == 0);
    if (__pyx_t_1) {

      /* "utils.pxd":3876
 *         # Early exit
 *         if days == 0:
 *             return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *         # Compute new ordinal, then back to Y/M/D
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.dtclass = __pyx_v_dtclass;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":3875
 *     if seconds == 0 and microseconds == 0:
 *         # Early exit
 *         if days == 0:             # <<<<<<<<<<<<<<
 *             return dt_fr_dt(dt, dtclass)
 * 
*/
    }

    /* "utils.pxd":3879
 * 
 *         # Compute new ordinal, then back to Y/M/D
 *         _ymd = ymd_fr_ord(dt_to_ord(dt, False) + days)             # <<<<<<<<<<<<<<
 * 
 *         # New datetime
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.utc = 0;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_ord(__pyx_v_dt, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(5, 3879, __pyx_L1_error)
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_t_5 + __pyx_v_days));

    /* "utils.pxd":3882
 * 
 *         # New datetime
 *         return dt_new(             # <<<<<<<<<<<<<<
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "utils.pxd":3884
 *         return dt_new(
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "utils.pxd":3882
 * 
 *         # New datetime
 *         return dt_new(             # <<<<<<<<<<<<<<
 *             _ymd.year, _ymd.month, _ymd.day, dt.hour, dt.minute,
 *             dt.second, dt.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
    __pyx_t_8.__pyx_n = 10;
    __pyx_t_8.year = __pyx_v__ymd.year;
    __pyx_t_8.month = __pyx_v__ymd.month;
    __pyx_t_8.day = __pyx_v__ymd.day;
    __pyx_t_8.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_8.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_t_8.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
    __pyx_t_8.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
    __pyx_t_8.tzinfo = __pyx_t_3;
    __pyx_t_8.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
    __pyx_t_8.dtclass = __pyx_v_dtclass;
    __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "utils.pxd":3873
 *     # Fast-path: days only  preserve time fields and bump ordinal
 *     cdef ymd _ymd
 *     if seconds == 0 and microseconds == 0:             # <<<<<<<<<<<<<<
 *         # Early exit
 *         if days == 0:
*/
  }

  /* "utils.pxd":3888
 * 
 *     # General path: add delta in microseconds
 *     cdef long long us = dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *     us += (
 *         (<long long> days)          * US_DAY +
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_5 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_9); if (unlikely(__pyx_t_5 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 3888, __pyx_L1_error)
  __pyx_v_us = __pyx_t_5;

  /* "utils.pxd":3889
 *     # General path: add delta in microseconds
 *     cdef long long us = dt_to_us(dt, False)
 *     us += (             # <<<<<<<<<<<<<<
 *         (<long long> days)          * US_DAY +
 *         (<long long> seconds)       * US_SECOND +
*/
  __pyx_v_us = (__pyx_v_us + (((((PY_LONG_LONG)__pyx_v_days) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_v_microseconds)));

  /* "utils.pxd":3896
 * 
 *     # Compute new date & time
 *     cdef dtm _dtm = dtm_fr_us(us)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
  __pyx_v__dtm = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_v_us);

  /* "utils.pxd":3899
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":3901
 *     return dt_new(
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_7 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 3901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "utils.pxd":3899
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         _dtm.year, _dtm.month, _dtm.day, _dtm.hour, _dtm.minute,
 *         _dtm.second, _dtm.microsecond, dt.tzinfo, dt.fold, dtclass,
*/
  __pyx_t_8.__pyx_n = 10;
  __pyx_t_8.year = __pyx_v__dtm.year;
  __pyx_t_8.month = __pyx_v__dtm.month;
  __pyx_t_8.day = __pyx_v__dtm.day;
  __pyx_t_8.hour = __pyx_v__dtm.hour;
  __pyx_t_8.minute = __pyx_v__dtm.minute;
  __pyx_t_8.second = __pyx_v__dtm.second;
  __pyx_t_8.microsecond = __pyx_v__dtm.microsecond;
  __pyx_t_8.tzinfo = __pyx_t_7;
  __pyx_t_8.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_8.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3852
 * 
 * # . manipulation
 * cdef inline datetime.datetime dt_add(datetime.datetime dt, int days=0, int seconds=0, int microseconds=0, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Add a day/second/microsecond delta to a `datetime.datetime` `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils.dt_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_add_delta(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_add_delta *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  PY_LONG_LONG __pyx_v_days = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_hours = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_minutes = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_seconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_milliseconds = ((PY_LONG_LONG)0);
  PY_LONG_LONG __pyx_v_microseconds = ((PY_LONG_LONG)0);
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_weekday = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_millisecond = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);

  /* "utils.pxd":3908
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
 *     int year=-1, int month=-1, int day=-1, int weekday=-1, int hour=-1, int minute=-1,
 *     int second=-1, int millisecond=-1, int microsecond=-1, object dtclass=None             # <<<<<<<<<<<<<<
 * ):
 *     """Add relative and absolute deltas to datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_o_yy;
  int __pyx_v_yy;
  int __pyx_v_o_mm;
  int __pyx_v_mm;
  int __pyx_v_o_dd;
  int __pyx_v_dd;
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  PY_LONG_LONG __pyx_v_rel_days;
  PY_LONG_LONG __pyx_v_o_hh;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_o_mi;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_o_ss;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_o_us;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_old_ord;
  PY_LONG_LONG __pyx_v_new_ord;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  long __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_year = __pyx_optional_args->year;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_month = __pyx_optional_args->month;
                            if (__pyx_optional_args->__pyx_n > 12) {
                              __pyx_v_day = __pyx_optional_args->day;
                              if (__pyx_optional_args->__pyx_n > 13) {
                                __pyx_v_weekday = __pyx_optional_args->weekday;
                                if (__pyx_optional_args->__pyx_n > 14) {
                                  __pyx_v_hour = __pyx_optional_args->hour;
                                  if (__pyx_optional_args->__pyx_n > 15) {
                                    __pyx_v_minute = __pyx_optional_args->minute;
                                    if (__pyx_optional_args->__pyx_n > 16) {
                                      __pyx_v_second = __pyx_optional_args->second;
                                      if (__pyx_optional_args->__pyx_n > 17) {
                                        __pyx_v_millisecond = __pyx_optional_args->millisecond;
                                        if (__pyx_optional_args->__pyx_n > 18) {
                                          __pyx_v_microsecond = __pyx_optional_args->microsecond;
                                          if (__pyx_optional_args->__pyx_n > 19) {
                                            __pyx_v_dtclass = __pyx_optional_args->dtclass;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":3949
 *     # ----------------------------------------------------
 *     cdef:
 *         int o_yy = dt.year             # <<<<<<<<<<<<<<
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month
*/
  __pyx_v_o_yy = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);

  /* "utils.pxd":3950
 *     cdef:
 *         int o_yy = dt.year
 *         int yy = (year if year > 0 else o_yy) + years             # <<<<<<<<<<<<<<
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
*/
  __pyx_t_2 = (__pyx_v_year > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_year;
  } else {
    __pyx_t_1 = __pyx_v_o_yy;
  }
  __pyx_v_yy = (__pyx_t_1 + __pyx_v_years);

  /* "utils.pxd":3951
 *         int o_yy = dt.year
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month             # <<<<<<<<<<<<<<
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day
*/
  __pyx_v_o_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":3952
 *         int yy = (year if year > 0 else o_yy) + years
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)             # <<<<<<<<<<<<<<
 *         int o_dd = dt.day
 *         int dd = (day if day > 0 else o_dd)
*/
  __pyx_t_2 = (__pyx_v_month > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_month;
  } else {
    __pyx_t_1 = __pyx_v_o_mm;
  }
  __pyx_v_mm = ((__pyx_t_1 + __pyx_v_months) + (__pyx_v_quarters * 3));

  /* "utils.pxd":3953
 *         int o_mm = dt.month
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day             # <<<<<<<<<<<<<<
 *         int dd = (day if day > 0 else o_dd)
 *         long long q, r
*/
  __pyx_v_o_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":3954
 *         int mm = (month if month > 0 else o_mm) + months + (quarters * 3)
 *         int o_dd = dt.day
 *         int dd = (day if day > 0 else o_dd)             # <<<<<<<<<<<<<<
 *         long long q, r
 *     # . normalize month
*/
  __pyx_t_2 = (__pyx_v_day > 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_v_day;
  } else {
    __pyx_t_1 = __pyx_v_o_dd;
  }
  __pyx_v_dd = __pyx_t_1;

  /* "utils.pxd":3957
 *         long long q, r
 *     # . normalize month
 *     if not 0 < mm <= 12:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  __pyx_t_2 = (0 < __pyx_v_mm);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_mm <= 12);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":3958
 *     # . normalize month
 *     if not 0 < mm <= 12:
 *         mm -= 1             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
*/
    __pyx_v_mm = (__pyx_v_mm - 1);

    /* "utils.pxd":3960
 *         mm -= 1
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 12
*/
    __pyx_v_q = (((long)__pyx_v_mm) / 12);
    __pyx_v_r = (__pyx_v_mm % 12);

    /* "utils.pxd":3961
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":3962
 *             q = mm / 12; r = mm % 12
 *         if r < 0:
 *             q -= 1; r += 12             # <<<<<<<<<<<<<<
 *         yy += q; mm = r + 1
 *     # . relative days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":3961
 *         with cython.cdivision(True):
 *             q = mm / 12; r = mm % 12
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1
*/
    }

    /* "utils.pxd":3963
 *         if r < 0:
 *             q -= 1; r += 12
 *         yy += q; mm = r + 1             # <<<<<<<<<<<<<<
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)
*/
    __pyx_v_yy = (__pyx_v_yy + __pyx_v_q);
    __pyx_v_mm = (__pyx_v_r + 1);

    /* "utils.pxd":3957
 *         long long q, r
 *     # . normalize month
 *     if not 0 < mm <= 12:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":3965
 *         yy += q; mm = r + 1
 *     # . relative days
 *     cdef long long rel_days = days + (weeks * 7)             # <<<<<<<<<<<<<<
 * 
 *     # Time fields
*/
  __pyx_v_rel_days = (__pyx_v_days + (__pyx_v_weeks * 7));

  /* "utils.pxd":3970
 *     # ----------------------------------------------------
 *     cdef:
 *         long long o_hh = dt.hour             # <<<<<<<<<<<<<<
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute
*/
  __pyx_v_o_hh = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);

  /* "utils.pxd":3971
 *     cdef:
 *         long long o_hh = dt.hour
 *         long long hh = (hour if hour >= 0 else o_hh) + hours             # <<<<<<<<<<<<<<
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
*/
  __pyx_t_3 = (__pyx_v_hour >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_hour;
  } else {
    __pyx_t_4 = __pyx_v_o_hh;
  }
  __pyx_v_hh = (__pyx_t_4 + __pyx_v_hours);

  /* "utils.pxd":3972
 *         long long o_hh = dt.hour
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute             # <<<<<<<<<<<<<<
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second
*/
  __pyx_v_o_mi = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);

  /* "utils.pxd":3973
 *         long long hh = (hour if hour >= 0 else o_hh) + hours
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes             # <<<<<<<<<<<<<<
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds
*/
  __pyx_t_3 = (__pyx_v_minute >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_minute;
  } else {
    __pyx_t_4 = __pyx_v_o_mi;
  }
  __pyx_v_mi = (__pyx_t_4 + __pyx_v_minutes);

  /* "utils.pxd":3974
 *         long long o_mi = dt.minute
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second             # <<<<<<<<<<<<<<
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond
*/
  __pyx_v_o_ss = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);

  /* "utils.pxd":3975
 *         long long mi = (minute if minute >= 0 else o_mi) + minutes
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds             # <<<<<<<<<<<<<<
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
*/
  __pyx_t_3 = (__pyx_v_second >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_second;
  } else {
    __pyx_t_4 = __pyx_v_o_ss;
  }
  __pyx_v_ss = (__pyx_t_4 + __pyx_v_seconds);

  /* "utils.pxd":3976
 *         long long o_ss = dt.second
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond             # <<<<<<<<<<<<<<
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
*/
  __pyx_v_o_us = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);

  /* "utils.pxd":3977
 *         long long ss = (second if second >= 0 else o_ss) + seconds
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)             # <<<<<<<<<<<<<<
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_combine_absolute_ms_us(__pyx_v_millisecond, __pyx_v_microsecond);

  /* "utils.pxd":3978
 *         long long o_us = dt.microsecond
 *         long long us = combine_absolute_ms_us(millisecond, microsecond)
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds             # <<<<<<<<<<<<<<
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:
*/
  __pyx_t_3 = (__pyx_v_us >= 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_us;
  } else {
    __pyx_t_4 = __pyx_v_o_us;
  }
  __pyx_v_us = ((__pyx_t_4 + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds);

  /* "utils.pxd":3980
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
*/
  __pyx_t_3 = (0 <= __pyx_v_us);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_us < __pyx_v_7cytimes_5utils_US_SECOND);
  }
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "utils.pxd":3982
 *     if not 0 <= us < US_SECOND:
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_SECOND
*/
    __pyx_v_q = (__pyx_v_us / __pyx_v_7cytimes_5utils_US_SECOND);
    __pyx_v_r = (__pyx_v_us % __pyx_v_7cytimes_5utils_US_SECOND);

    /* "utils.pxd":3983
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3984
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:
 *             q -= 1; r += US_SECOND             # <<<<<<<<<<<<<<
 *         ss += q; us = r
 *     # . normalize seconds
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":3983
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r
*/
    }

    /* "utils.pxd":3985
 *         if r < 0:
 *             q -= 1; r += US_SECOND
 *         ss += q; us = r             # <<<<<<<<<<<<<<
 *     # . normalize seconds
 *     if not 0 <= ss < 60:
*/
    __pyx_v_ss = (__pyx_v_ss + __pyx_v_q);
    __pyx_v_us = __pyx_v_r;

    /* "utils.pxd":3980
 *     us = (us if us >= 0 else o_us) + milliseconds * US_MILLISECOND + microseconds
 *     # . normalize microseconds
 *     if not 0 <= us < US_SECOND:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_SECOND; r = us % US_SECOND
*/
  }

  /* "utils.pxd":3987
 *         ss += q; us = r
 *     # . normalize seconds
 *     if not 0 <= ss < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
*/
  __pyx_t_2 = (0 <= __pyx_v_ss);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_ss < 60);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":3989
 *     if not 0 <= ss < 60:
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 60
*/
    __pyx_v_q = (__pyx_v_ss / 60);
    __pyx_v_r = (__pyx_v_ss % 60);

    /* "utils.pxd":3990
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         mi += q; ss = r
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":3991
 *             q = ss / 60; r = ss % 60
 *         if r < 0:
 *             q -= 1; r += 60             # <<<<<<<<<<<<<<
 *         mi += q; ss = r
 *     # . normalize minutes
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 60);

      /* "utils.pxd":3990
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         mi += q; ss = r
*/
    }

    /* "utils.pxd":3992
 *         if r < 0:
 *             q -= 1; r += 60
 *         mi += q; ss = r             # <<<<<<<<<<<<<<
 *     # . normalize minutes
 *     if not 0 <= mi < 60:
*/
    __pyx_v_mi = (__pyx_v_mi + __pyx_v_q);
    __pyx_v_ss = __pyx_v_r;

    /* "utils.pxd":3987
 *         ss += q; us = r
 *     # . normalize seconds
 *     if not 0 <= ss < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
*/
  }

  /* "utils.pxd":3994
 *         mi += q; ss = r
 *     # . normalize minutes
 *     if not 0 <= mi < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
*/
  __pyx_t_3 = (0 <= __pyx_v_mi);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_mi < 60);
  }
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "utils.pxd":3996
 *     if not 0 <= mi < 60:
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 60
*/
    __pyx_v_q = (__pyx_v_mi / 60);
    __pyx_v_r = (__pyx_v_mi % 60);

    /* "utils.pxd":3997
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         hh += q; mi = r
*/
    __pyx_t_2 = (__pyx_v_r < 0);
    if (__pyx_t_2) {

      /* "utils.pxd":3998
 *             q = mi / 60; r = mi % 60
 *         if r < 0:
 *             q -= 1; r += 60             # <<<<<<<<<<<<<<
 *         hh += q; mi = r
 *     # . normalize hours to days
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 60);

      /* "utils.pxd":3997
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         hh += q; mi = r
*/
    }

    /* "utils.pxd":3999
 *         if r < 0:
 *             q -= 1; r += 60
 *         hh += q; mi = r             # <<<<<<<<<<<<<<
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:
*/
    __pyx_v_hh = (__pyx_v_hh + __pyx_v_q);
    __pyx_v_mi = __pyx_v_r;

    /* "utils.pxd":3994
 *         mi += q; ss = r
 *     # . normalize minutes
 *     if not 0 <= mi < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
*/
  }

  /* "utils.pxd":4001
 *         hh += q; mi = r
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
*/
  __pyx_t_2 = (0 <= __pyx_v_hh);
  if (__pyx_t_2) {
    __pyx_t_2 = (__pyx_v_hh < 24);
  }
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "utils.pxd":4003
 *     if not 0 <= hh < 24:
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += 24
*/
    __pyx_v_q = (__pyx_v_hh / 24);
    __pyx_v_r = (__pyx_v_hh % 24);

    /* "utils.pxd":4004
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 24
 *         rel_days += q; hh = r
*/
    __pyx_t_3 = (__pyx_v_r < 0);
    if (__pyx_t_3) {

      /* "utils.pxd":4005
 *             q = hh / 24; r = hh % 24
 *         if r < 0:
 *             q -= 1; r += 24             # <<<<<<<<<<<<<<
 *         rel_days += q; hh = r
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);
      __pyx_v_r = (__pyx_v_r + 24);

      /* "utils.pxd":4004
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 24
 *         rel_days += q; hh = r
*/
    }

    /* "utils.pxd":4006
 *         if r < 0:
 *             q -= 1; r += 24
 *         rel_days += q; hh = r             # <<<<<<<<<<<<<<
 * 
 *     # Handle day delta
*/
    __pyx_v_rel_days = (__pyx_v_rel_days + __pyx_v_q);
    __pyx_v_hh = __pyx_v_r;

    /* "utils.pxd":4001
 *         hh += q; mi = r
 *     # . normalize hours to days
 *     if not 0 <= hh < 24:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = hh / 24; r = hh % 24
*/
  }

  /* "utils.pxd":4012
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  __pyx_t_2 = (__pyx_v_rel_days != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_weekday >= 0);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_3) {

    /* "utils.pxd":4013
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)             # <<<<<<<<<<<<<<
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
*/
    __pyx_v_old_ord = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

    /* "utils.pxd":4014
 *     if rel_days != 0 or weekday >= 0:
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days             # <<<<<<<<<<<<<<
 *         # . adjust to weekday if needed
 *         if weekday >= 0:
*/
    __pyx_v_new_ord = (__pyx_v_old_ord + __pyx_v_rel_days);

    /* "utils.pxd":4016
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    __pyx_t_3 = (__pyx_v_weekday >= 0);
    if (__pyx_t_3) {

      /* "utils.pxd":4018
 *         if weekday >= 0:
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     r += 7
*/
      __pyx_v_r = ((__pyx_v_new_ord + 6) % 7);

      /* "utils.pxd":4019
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      __pyx_t_3 = (__pyx_v_r < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":4020
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:
 *                     r += 7             # <<<<<<<<<<<<<<
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
*/
        __pyx_v_r = (__pyx_v_r + 7);

        /* "utils.pxd":4019
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
*/
      }

      /* "utils.pxd":4021
 *                 if r < 0:
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6             # <<<<<<<<<<<<<<
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
*/
      __pyx_t_5 = 6;
      __pyx_t_1 = __pyx_v_weekday;
      __pyx_t_3 = (__pyx_t_5 < __pyx_t_1);
      if (__pyx_t_3) {
        __pyx_t_6 = __pyx_t_5;
      } else {
        __pyx_t_6 = __pyx_t_1;
      }
      __pyx_v_new_ord = (__pyx_v_new_ord + (__pyx_t_6 - __pyx_v_r));

      /* "utils.pxd":4016
 *         new_ord = old_ord + rel_days
 *         # . adjust to weekday if needed
 *         if weekday >= 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 r = (new_ord + 6) % 7
*/
    }

    /* "utils.pxd":4022
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    __pyx_t_3 = (__pyx_v_old_ord != __pyx_v_new_ord);
    if (__pyx_t_3) {

      /* "utils.pxd":4023
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)             # <<<<<<<<<<<<<<
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
 * 
*/
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_new_ord);

      /* "utils.pxd":4024
 *         if old_ord != new_ord:
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day             # <<<<<<<<<<<<<<
 * 
 *     # Compare new date/time
*/
      __pyx_t_1 = __pyx_v__ymd.year;
      __pyx_t_7 = __pyx_v__ymd.month;
      __pyx_t_8 = __pyx_v__ymd.day;
      __pyx_v_yy = __pyx_t_1;
      __pyx_v_mm = __pyx_t_7;
      __pyx_v_dd = __pyx_t_8;

      /* "utils.pxd":4022
 *                     r += 7
 *             new_ord += min(weekday, 6) - r  # weekday clamped to Sun=6
 *         if old_ord != new_ord:             # <<<<<<<<<<<<<<
 *             _ymd = ymd_fr_ord(new_ord)
 *             yy, mm, dd = _ymd.year, _ymd.month, _ymd.day
*/
    }

    /* "utils.pxd":4012
 *     cdef long long old_ord, new_ord
 *     cdef ymd _ymd
 *     if rel_days != 0 or weekday >= 0:             # <<<<<<<<<<<<<<
 *         old_ord = ymd_to_ord(yy, mm, dd)
 *         new_ord = old_ord + rel_days
*/
  }

  /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_2 = (__pyx_v_yy == __pyx_v_o_yy);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_mm == __pyx_v_o_mm);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dd == __pyx_v_o_dd);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }

  /* "utils.pxd":4028
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = (__pyx_v_hh == __pyx_v_o_hh);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_mi == __pyx_v_o_mi);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_ss == __pyx_v_o_ss);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_us == __pyx_v_o_us);
  __pyx_t_3 = __pyx_t_2;
  __pyx_L20_bool_binop_done:;

  /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  if (__pyx_t_3) {

    /* "utils.pxd":4029
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Clamp day to valid days in month
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.dtclass = __pyx_v_dtclass;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_10)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4027
 * 
 *     # Compare new date/time
 *     if (yy == o_yy and mm == o_mm and dd == o_dd and             # <<<<<<<<<<<<<<
 *         hh == o_hh and mi == o_mi and ss == o_ss and us == o_us):
 *         return dt_fr_dt(dt, dtclass)
*/
  }

  /* "utils.pxd":4032
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  __pyx_t_3 = (__pyx_v_dd > 28);
  if (__pyx_t_3) {

    /* "utils.pxd":4033
 *     # Clamp day to valid days in month
 *     if dd > 28:
 *         dd = min(dd, days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __pyx_t_8 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_7 = __pyx_v_dd;
    __pyx_t_3 = (__pyx_t_8 < __pyx_t_7);
    if (__pyx_t_3) {
      __pyx_t_1 = __pyx_t_8;
    } else {
      __pyx_t_1 = __pyx_t_7;
    }
    __pyx_v_dd = __pyx_t_1;

    /* "utils.pxd":4032
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "utils.pxd":4036
 * 
 *     # New datetime
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12.__pyx_n = 10;
  __pyx_t_12.year = __pyx_v_yy;
  __pyx_t_12.month = __pyx_v_mm;
  __pyx_t_12.day = __pyx_v_dd;
  __pyx_t_12.hour = __pyx_v_hh;
  __pyx_t_12.minute = __pyx_v_mi;
  __pyx_t_12.second = __pyx_v_ss;
  __pyx_t_12.microsecond = __pyx_v_us;
  __pyx_t_12.tzinfo = __pyx_t_9;
  __pyx_t_12.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_12.dtclass = __pyx_v_dtclass;
  __pyx_t_11 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_12)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "utils.pxd":3904
 *     )
 * 
 * cdef inline datetime.datetime dt_add_delta(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int years=0, int quarters=0, int months=0, int weeks=0, long long days=0, long long hours=0,
 *     long long minutes=0, long long seconds=0, long long milliseconds=0, long long microseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.utils.dt_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_replace *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);
  PyObject *__pyx_v_tzinfo = ((PyObject *)__pyx_mstate_global->__pyx_int_neg_1);
  int __pyx_v_fold = ((int)-1);

  /* "utils.pxd":4041
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
 *     object dtclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Replace specified fields of a datetime `<'datetime.datetime'>`.
*/
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_us;
  int __pyx_v_fd;
  PyObject *__pyx_v_tz = 0;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_fold = __pyx_optional_args->fold;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_dtclass = __pyx_optional_args->dtclass;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "utils.pxd":4071
 *     # Get old fields
 *     cdef int yy, mm, dd, hh, mi, ss, us, fd
 *     yy, mm, dd = dt.year, dt.month, dt.day             # <<<<<<<<<<<<<<
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_v_yy = __pyx_t_1;
  __pyx_v_mm = __pyx_t_2;
  __pyx_v_dd = __pyx_t_3;

  /* "utils.pxd":4072
 *     cdef int yy, mm, dd, hh, mi, ss, us, fd
 *     yy, mm, dd = dt.year, dt.month, dt.day
 *     hh, mi, ss = dt.hour, dt.minute, dt.second             # <<<<<<<<<<<<<<
 *     us, fd     = dt.microsecond, dt.fold
 *     cdef object tz = dt.tzinfo
*/
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_v_hh = __pyx_t_3;
  __pyx_v_mi = __pyx_t_2;
  __pyx_v_ss = __pyx_t_1;

  /* "utils.pxd":4073
 *     yy, mm, dd = dt.year, dt.month, dt.day
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold             # <<<<<<<<<<<<<<
 *     cdef object tz = dt.tzinfo
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_v_us = __pyx_t_1;
  __pyx_v_fd = __pyx_t_2;

  /* "utils.pxd":4074
 *     hh, mi, ss = dt.hour, dt.minute, dt.second
 *     us, fd     = dt.microsecond, dt.fold
 *     cdef object tz = dt.tzinfo             # <<<<<<<<<<<<<<
 * 
 *     # Gen new fields
*/
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tz = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "utils.pxd":4077
 * 
 *     # Gen new fields
 *     year   = yy if year < 1 else min(year, 9999)             # <<<<<<<<<<<<<<
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:
*/
  __pyx_t_6 = (__pyx_v_year < 1);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_yy;
  } else {
    __pyx_t_7 = 0x270F;
    __pyx_t_2 = __pyx_v_year;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_2);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_2;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_year = __pyx_t_5;

  /* "utils.pxd":4078
 *     # Gen new fields
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)             # <<<<<<<<<<<<<<
 *     if day < 1:
 *         day = dd
*/
  __pyx_t_6 = (__pyx_v_month < 1);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_mm;
  } else {
    __pyx_t_8 = 12;
    __pyx_t_2 = __pyx_v_month;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_2);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_2;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_month = __pyx_t_5;

  /* "utils.pxd":4079
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
  __pyx_t_6 = (__pyx_v_day < 1);
  if (__pyx_t_6) {

    /* "utils.pxd":4080
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:
 *         day = dd             # <<<<<<<<<<<<<<
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
*/
    __pyx_v_day = __pyx_v_dd;

    /* "utils.pxd":4079
 *     year   = yy if year < 1 else min(year, 9999)
 *     month  = mm if month < 1 else min(month, 12)
 *     if day < 1:             # <<<<<<<<<<<<<<
 *         day = dd
 *     elif day > 28:
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4081
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
*/
  __pyx_t_6 = (__pyx_v_day > 28);
  if (__pyx_t_6) {

    /* "utils.pxd":4082
 *         day = dd
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))             # <<<<<<<<<<<<<<
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
    __pyx_t_1 = __pyx_v_day;
    __pyx_t_6 = (__pyx_t_2 < __pyx_t_1);
    if (__pyx_t_6) {
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_1;
    }
    __pyx_v_day = __pyx_t_3;

    /* "utils.pxd":4081
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
*/
  }
  __pyx_L3:;

  /* "utils.pxd":4083
 *     elif day > 28:
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)             # <<<<<<<<<<<<<<
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)
*/
  __pyx_t_6 = (__pyx_v_hour < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_hh;
  } else {
    __pyx_t_7 = 23;
    __pyx_t_3 = __pyx_v_hour;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_hour = __pyx_t_5;

  /* "utils.pxd":4084
 *         day = min(day, days_in_month(year, month))
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)             # <<<<<<<<<<<<<<
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
*/
  __pyx_t_6 = (__pyx_v_minute < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_mi;
  } else {
    __pyx_t_8 = 59;
    __pyx_t_3 = __pyx_v_minute;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_minute = __pyx_t_5;

  /* "utils.pxd":4085
 *     hour   = hh if hour < 0 else min(hour, 23)
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)             # <<<<<<<<<<<<<<
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
*/
  __pyx_t_6 = (__pyx_v_second < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_ss;
  } else {
    __pyx_t_7 = 59;
    __pyx_t_3 = __pyx_v_second;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_8;
  }
  __pyx_v_second = __pyx_t_5;

  /* "utils.pxd":4086
 *     minute = mi if minute < 0 else min(minute, 59)
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)             # <<<<<<<<<<<<<<
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
 *     fold   = fd if fold not in (0, 1) else fold
*/
  __pyx_t_6 = (__pyx_v_microsecond < 0);
  if (__pyx_t_6) {
    __pyx_t_5 = __pyx_v_us;
  } else {
    __pyx_t_8 = 0xF423F;
    __pyx_t_3 = __pyx_v_microsecond;
    __pyx_t_9 = (__pyx_t_8 < __pyx_t_3);
    if (__pyx_t_9) {
      __pyx_t_7 = __pyx_t_8;
    } else {
      __pyx_t_7 = __pyx_t_3;
    }
    __pyx_t_5 = __pyx_t_7;
  }
  __pyx_v_microsecond = __pyx_t_5;

  /* "utils.pxd":4087
 *     second = ss if second < 0 else min(second, 59)
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo             # <<<<<<<<<<<<<<
 *     fold   = fd if fold not in (0, 1) else fold
 * 
*/
  __pyx_t_9 = (__pyx_v_tzinfo != Py_None);
  if (__pyx_t_9) {
  } else {
    __pyx_t_6 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_9 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tzinfo); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(5, 4087, __pyx_L1_error)
  __pyx_t_10 = (!__pyx_t_9);
  __pyx_t_6 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_v_tz);
    __pyx_t_4 = __pyx_v_tz;
  } else {
    __Pyx_INCREF(__pyx_v_tzinfo);
    __pyx_t_4 = __pyx_v_tzinfo;
  }
  __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "utils.pxd":4088
 *     microsecond = us if microsecond < 0 else min(microsecond, 999999)
 *     tzinfo = tz if (tzinfo is not None and not is_tz(tzinfo)) else tzinfo
 *     fold   = fd if fold not in (0, 1) else fold             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fields
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_3 = __pyx_v_fold;
    break;
    default:
    __pyx_t_3 = __pyx_v_fd;
    break;
  }
  __pyx_v_fold = __pyx_t_3;

  /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  __pyx_t_10 = (__pyx_v_year == __pyx_v_yy);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_month == __pyx_v_mm);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }

  /* "utils.pxd":4092
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd
 *         and hour == hh and minute == mi and second == ss             # <<<<<<<<<<<<<<
 *         and microsecond == us and tzinfo is tz and fold == fd
 *     ):
*/
  __pyx_t_10 = (__pyx_v_day == __pyx_v_dd);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_hour == __pyx_v_hh);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_minute == __pyx_v_mi);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }

  /* "utils.pxd":4093
 *     if (year == yy and month == mm and day == dd
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd             # <<<<<<<<<<<<<<
 *     ):
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_10 = (__pyx_v_second == __pyx_v_ss);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_microsecond == __pyx_v_us);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_tzinfo == __pyx_v_tz);
  if (__pyx_t_10) {
  } else {
    __pyx_t_6 = __pyx_t_10;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_fold == __pyx_v_fd);
  __pyx_t_6 = __pyx_t_10;
  __pyx_L7_bool_binop_done:;

  /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  if (__pyx_t_6) {

    /* "utils.pxd":4095
 *         and microsecond == us and tzinfo is tz and fold == fd
 *     ):
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.dtclass = __pyx_v_dtclass;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4091
 * 
 *     # Fast-path: same fields
 *     if (year == yy and month == mm and day == dd             # <<<<<<<<<<<<<<
 *         and hour == hh and minute == mi and second == ss
 *         and microsecond == us and tzinfo is tz and fold == fd
*/
  }

  /* "utils.pxd":4098
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         year, month, day, hour, minute,
 *         second, microsecond, tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4100
 *     return dt_new(
 *         year, month, day, hour, minute,
 *         second, microsecond, tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_12.__pyx_n = 10;
  __pyx_t_12.year = __pyx_v_year;
  __pyx_t_12.month = __pyx_v_month;
  __pyx_t_12.day = __pyx_v_day;
  __pyx_t_12.hour = __pyx_v_hour;
  __pyx_t_12.minute = __pyx_v_minute;
  __pyx_t_12.second = __pyx_v_second;
  __pyx_t_12.microsecond = __pyx_v_microsecond;
  __pyx_t_12.tzinfo = __pyx_v_tzinfo;
  __pyx_t_12.fold = __pyx_v_fold;
  __pyx_t_12.dtclass = __pyx_v_dtclass;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4038
 *     return dt_new(yy, mm, dd, hh, mi, ss, us, dt.tzinfo, dt.fold, dtclass)
 * 
 * cdef inline datetime.datetime dt_replace(datetime.datetime dt,             # <<<<<<<<<<<<<<
 *     int year=-1, int month=-1, int day=-1, int hour=-1, int minute=-1,
 *     int second=-1, int microsecond=-1, object tzinfo=-1, int fold=-1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.dt_replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz_fold(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tzinfo, int __pyx_v_fold, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz_fold *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_tz_fold", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4118
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":4119
 *     # Validate
 *     if fold != 0 and fold != 1:
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))             # <<<<<<<<<<<<<<
 * 
 *     # Same tzinfo and fold
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_fold_must_be_either_0_or_1_got_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4119, __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(5, 4119, __pyx_L1_error)

    /* "utils.pxd":4118
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "utils.pxd":4122
 * 
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = (__pyx_v_tzinfo == __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_fold == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
  __pyx_t_1 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4123
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dtclass = __pyx_v_dtclass;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4122
 * 
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4126
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4128
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_9.__pyx_n = 10;
  __pyx_t_9.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_9.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_9.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_9.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_9.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_9.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_9.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_9.tzinfo = __pyx_v_tzinfo;
  __pyx_t_9.fold = __pyx_v_fold;
  __pyx_t_9.dtclass = __pyx_v_dtclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4103
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz_fold(datetime.datetime dt, object tzinfo, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` and `fold` replaced `<'datetime.datetime'>`.
 * 
*/

  /* 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("cytimes.utils.dt_replace_tz_fold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_tz(PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tzinfo, struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_tz", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4145
 *     """
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_tzinfo == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "utils.pxd":4146
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4145
 *     """
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4149
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, dt.fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4151
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, tzinfo, dt.fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_4.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_4.tzinfo = __pyx_v_tzinfo;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4131
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_tz(datetime.datetime dt, object tzinfo, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `tzinfo` replaced `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_replace_tz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_replace_fold(PyDateTime_DateTime *__pyx_v_dt, int __pyx_v_fold, struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_replace_fold", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4168
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  switch (__pyx_v_fold) {
    case 0:
    case 1:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":4169
 *     # Validate
 *     if fold != 0 and fold != 1:
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: same fold
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_fold_must_be_either_0_or_1_got_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4169, __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(5, 4169, __pyx_L1_error)

    /* "utils.pxd":4168
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "utils.pxd":4172
 * 
 *     # Fast-path: same fold
 *     if fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_1 = (__pyx_v_fold == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
  if (__pyx_t_1) {

    /* "utils.pxd":4173
 *     # Fast-path: same fold
 *     if fold == dt.fold:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # New datetime
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.dtclass = __pyx_v_dtclass;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4172
 * 
 *     # Fast-path: same fold
 *     if fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4176
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4178
 *     return dt_new(
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":4176
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *         dt.second, dt.microsecond, dt.tzinfo, fold, dtclass,
*/
  __pyx_t_8.__pyx_n = 10;
  __pyx_t_8.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
  __pyx_t_8.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_8.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
  __pyx_t_8.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_8.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_8.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_8.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_8.tzinfo = __pyx_t_2;
  __pyx_t_8.fold = __pyx_v_fold;
  __pyx_t_8.dtclass = __pyx_v_dtclass;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_8)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4154
 *     )
 * 
 * cdef inline datetime.datetime dt_replace_fold(datetime.datetime dt, int fold, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Create a copy of `dt` with `fold` set to 0 or 1 `<'datetime.datetime'>`.
 * 
*/

  /* 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("cytimes.utils.dt_replace_fold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_compare(PyDateTime_DateTime *__pyx_v_dt1, PyDateTime_DateTime *__pyx_v_dt2, struct __pyx_opt_args_7cytimes_5utils_dt_compare *__pyx_optional_args) {
  int __pyx_v_allow_mixed = ((int)0);
  PyObject *__pyx_v_dt1_tz = 0;
  PyObject *__pyx_v_dt2_tz = 0;
  int __pyx_v_dt1_aware;
  int __pyx_v_dt2_aware;
  PY_LONG_LONG __pyx_v_dt1_us;
  PY_LONG_LONG __pyx_v_dt2_us;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[8];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PY_LONG_LONG __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_compare", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_allow_mixed = __pyx_optional_args->allow_mixed;
    }
  }

  /* "utils.pxd":4208
 *     # Check tzinfo compatibility (Exactly one is naive  mixed)
 *     cdef:
 *         object dt1_tz = dt1.tzinfo             # <<<<<<<<<<<<<<
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt1_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4209
 *     cdef:
 *         object dt1_tz = dt1.tzinfo
 *         object dt2_tz = dt2.tzinfo             # <<<<<<<<<<<<<<
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dt2_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4210
 *         object dt1_tz = dt1.tzinfo
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None             # <<<<<<<<<<<<<<
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
*/
  __pyx_t_2 = (__pyx_v_dt1_tz != Py_None);
  __pyx_v_dt1_aware = __pyx_t_2;

  /* "utils.pxd":4211
 *         object dt2_tz = dt2.tzinfo
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None             # <<<<<<<<<<<<<<
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:
*/
  __pyx_t_2 = (__pyx_v_dt2_tz != Py_None);
  __pyx_v_dt2_aware = __pyx_t_2;

  /* "utils.pxd":4212
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:             # <<<<<<<<<<<<<<
 *         if allow_mixed:
 *             return 2
*/
  __pyx_t_2 = (__pyx_v_dt1_aware != __pyx_v_dt2_aware);
  if (__pyx_t_2) {

    /* "utils.pxd":4213
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:             # <<<<<<<<<<<<<<
 *             return 2
 *         raise TypeError(
*/
    if (__pyx_v_allow_mixed) {

      /* "utils.pxd":4214
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:
 *             return 2             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Cannot compare naive and aware datetimes:\n"
*/
      __pyx_r = 2;
      goto __pyx_L0;

      /* "utils.pxd":4213
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:             # <<<<<<<<<<<<<<
 *             return 2
 *         raise TypeError(
*/
    }

    /* "utils.pxd":4215
 *         if allow_mixed:
 *             return 2
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Cannot compare naive and aware datetimes:\n"
 *             "  - datetime1: '%s' %s\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":4218
 *             "Cannot compare naive and aware datetimes:\n"
 *             "  - datetime1: '%s' %s\n"
 *             "  - datetime2: '%s' %s" % (dt1, type(dt1), dt2, type(dt2))             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_dt1)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt1)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_dt2)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt2)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_naive_and_aware_d;
    __pyx_t_8[1] = __pyx_t_4;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[3] = __pyx_t_5;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_datetime2;
    __pyx_t_8[5] = __pyx_t_6;
    __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[7] = __pyx_t_7;

    /* "utils.pxd":4216
 *             return 2
 *         raise TypeError(
 *             "Cannot compare naive and aware datetimes:\n"             # <<<<<<<<<<<<<<
 *             "  - datetime1: '%s' %s\n"
 *             "  - datetime2: '%s' %s" % (dt1, type(dt1), dt2, type(dt2))
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 8, 58 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4215, __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(5, 4215, __pyx_L1_error)

    /* "utils.pxd":4212
 *         bint dt1_aware = dt1_tz is not None
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:             # <<<<<<<<<<<<<<
 *         if allow_mixed:
 *             return 2
*/
  }

  /* "utils.pxd":4222
 * 
 *     # Compare in microseconds
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)             # <<<<<<<<<<<<<<
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:
*/
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.utc = __pyx_v_dt1_aware;
  __pyx_t_11 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt1, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4222, __pyx_L1_error)
  __pyx_v_dt1_us = __pyx_t_11;

  /* "utils.pxd":4223
 *     # Compare in microseconds
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)             # <<<<<<<<<<<<<<
 *     if dt1_us > dt2_us:
 *         return 1
*/
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.utc = __pyx_v_dt2_aware;
  __pyx_t_11 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt2, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4223, __pyx_L1_error)
  __pyx_v_dt2_us = __pyx_t_11;

  /* "utils.pxd":4224
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:             # <<<<<<<<<<<<<<
 *         return 1
 *     elif dt1_us < dt2_us:
*/
  __pyx_t_2 = (__pyx_v_dt1_us > __pyx_v_dt2_us);
  if (__pyx_t_2) {

    /* "utils.pxd":4225
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:
 *         return 1             # <<<<<<<<<<<<<<
 *     elif dt1_us < dt2_us:
 *         return -1
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "utils.pxd":4224
 *     cdef long long dt1_us = dt_to_us(dt1, dt1_aware)
 *     cdef long long dt2_us = dt_to_us(dt2, dt2_aware)
 *     if dt1_us > dt2_us:             # <<<<<<<<<<<<<<
 *         return 1
 *     elif dt1_us < dt2_us:
*/
  }

  /* "utils.pxd":4226
 *     if dt1_us > dt2_us:
 *         return 1
 *     elif dt1_us < dt2_us:             # <<<<<<<<<<<<<<
 *         return -1
 *     else:
*/
  __pyx_t_2 = (__pyx_v_dt1_us < __pyx_v_dt2_us);
  if (__pyx_t_2) {

    /* "utils.pxd":4227
 *         return 1
 *     elif dt1_us < dt2_us:
 *         return -1             # <<<<<<<<<<<<<<
 *     else:
 *         return 0
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "utils.pxd":4226
 *     if dt1_us > dt2_us:
 *         return 1
 *     elif dt1_us < dt2_us:             # <<<<<<<<<<<<<<
 *         return -1
 *     else:
*/
  }

  /* "utils.pxd":4229
 *         return -1
 *     else:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:
*/
  /*else*/ {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4182
 * 
 * # . check
 * cdef inline int dt_compare(datetime.datetime dt1, datetime.datetime dt2, bint allow_mixed = False) except -2:             # <<<<<<<<<<<<<<
 *     """Three-way comparison between two datetimes on a common microsecond timeline `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.dt_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt1_tz);
  __Pyx_XDECREF(__pyx_v_dt2_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4231
 *         return 0
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its year `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doy(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4239
 *     :returns `<'bool'>`: True if the datetime is January 1 of its year; Otherwiase False.
 *     """
 *     return dt.month == 1 and dt.day == 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt) == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4231
 *         return 0
 * 
 * cdef inline bint dt_is_first_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its year `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4241
 *     return dt.month == 1 and dt.day == 1
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its year `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doy(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4249
 *     :returns `<'bool'>`: True if the datetime is December 31 of its year; Otherwiase False.
 *     """
 *     return dt.month == 12 and dt.day == 31             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt) == 12);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 31);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4241
 *     return dt.month == 1 and dt.day == 1
 * 
 * cdef inline bint dt_is_last_doy(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its year `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4251
 *     return dt.month == 12 and dt.day == 31
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its quarter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_doq(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "utils.pxd":4259
 *     :returns `<'bool'>`: True if the datetime is the first day of its quarter; Otherwiase False.
 *     """
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
  __pyx_t_4 = (__pyx_t_3 == 1);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 4);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 7);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_4 = (__pyx_t_3 == 10);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;
  __pyx_t_4 = __pyx_t_2;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4251
 *     return dt.month == 12 and dt.day == 31
 * 
 * cdef inline bint dt_is_first_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its quarter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4261
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its quarter `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_doq(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_v_dd;
  int __pyx_v_mm;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4269
 *     :returns `<'bool'>`: True if the datetime is the last day of its quarter; Otherwiase False.
 *     """
 *     cdef int dd = dt.day             # <<<<<<<<<<<<<<
 *     if dd < 30:
 *         return False
*/
  __pyx_v_dd = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);

  /* "utils.pxd":4270
 *     """
 *     cdef int dd = dt.day
 *     if dd < 30:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef int mm = dt.month
*/
  __pyx_t_1 = (__pyx_v_dd < 30);
  if (__pyx_t_1) {

    /* "utils.pxd":4271
 *     cdef int dd = dt.day
 *     if dd < 30:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":4270
 *     """
 *     cdef int dd = dt.day
 *     if dd < 30:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef int mm = dt.month
*/
  }

  /* "utils.pxd":4272
 *     if dd < 30:
 *         return False
 *     cdef int mm = dt.month             # <<<<<<<<<<<<<<
 *     if mm not in (3, 6, 9, 12):
 *         return False
*/
  __pyx_v_mm = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);

  /* "utils.pxd":4273
 *         return False
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):             # <<<<<<<<<<<<<<
 *         return False
 *     return dd == days_in_month(dt.year, mm)
*/
  switch (__pyx_v_mm) {
    case 3:
    case 6:
    case 9:
    case 12:
    __pyx_t_1 = 0;
    break;
    default:
    __pyx_t_1 = 1;
    break;
  }
  __pyx_t_2 = __pyx_t_1;
  if (__pyx_t_2) {

    /* "utils.pxd":4274
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):
 *         return False             # <<<<<<<<<<<<<<
 *     return dd == days_in_month(dt.year, mm)
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "utils.pxd":4273
 *         return False
 *     cdef int mm = dt.month
 *     if mm not in (3, 6, 9, 12):             # <<<<<<<<<<<<<<
 *         return False
 *     return dd == days_in_month(dt.year, mm)
*/
  }

  /* "utils.pxd":4275
 *     if mm not in (3, 6, 9, 12):
 *         return False
 *     return dd == days_in_month(dt.year, mm)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_v_dd == __pyx_f_7cytimes_5utils_days_in_month(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_v_mm));
  goto __pyx_L0;

  /* "utils.pxd":4261
 *     return dt.day == 1 and dt.month in (1, 4, 7, 10)
 * 
 * cdef inline bint dt_is_last_doq(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its quarter `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4277
 *     return dd == days_in_month(dt.year, mm)
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its month `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_first_dom(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;

  /* "utils.pxd":4285
 *     :returns `<'bool'>`: True if the datetime is the first day of its month; Otherwiase False.
 *     """
 *     return dt.day == 1             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == 1);
  goto __pyx_L0;

  /* "utils.pxd":4277
 *     return dd == days_in_month(dt.year, mm)
 * 
 * cdef inline bint dt_is_first_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the first day of its month `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4287
 *     return dt.day == 1
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its month `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_last_dom(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;

  /* "utils.pxd":4295
 *     :returns `<'bool'>`: True if the datetime is the last day of its month; Otherwiase False.
 *     """
 *     return dt.day == days_in_month(dt.year, dt.month)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:
*/
  __pyx_r = (__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt) == __pyx_f_7cytimes_5utils_days_in_month(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt), __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt)));
  goto __pyx_L0;

  /* "utils.pxd":4287
 *     return dt.day == 1
 * 
 * cdef inline bint dt_is_last_dom(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is on the last day of its month `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4297
 *     return dt.day == days_in_month(dt.year, dt.month)
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the start of time `<'bool'>`:
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_start_of_time(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4305
 *     :returns `<'bool'>`: True if datetime is at the start of time; Otherwise False.
 *     """
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt) == 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt) == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4297
 *     return dt.day == days_in_month(dt.year, dt.month)
 * 
 * cdef inline bint dt_is_start_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the start of time `<'bool'>`:
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4307
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the end of time `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_dt_is_end_of_time(PyDateTime_DateTime *__pyx_v_dt) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "utils.pxd":4315
 *     :returns `<'bool'>`: True if datetime is at the end of time; Otherwise False.
 *     """
 *     return dt.hour == 23 and dt.minute == 59 and dt.second == 59 and dt.microsecond == 999_999             # <<<<<<<<<<<<<<
 * 
 * # . tzinfo
*/
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt) == 23);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt) == 59);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt) == 59);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt) == 0xF423F);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "utils.pxd":4307
 *     return dt.hour == 0 and dt.minute == 0 and dt.second == 0 and dt.microsecond == 0
 * 
 * cdef inline bint dt_is_end_of_time(datetime.datetime dt) noexcept:             # <<<<<<<<<<<<<<
 *     """Check whether the datetime is at the end of time `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4318
 * 
 * # . tzinfo
 * cdef inline str dt_tzname(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the display name of a datetime's timezone `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_dt_tzname(PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_name __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_tzname", 0);

  /* "utils.pxd":4328
 *     >>> dt.tzname()
 *     """
 *     return tz_name(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_name(__pyx_t_1, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4328, __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;

  /* "utils.pxd":4318
 * 
 * # . tzinfo
 * cdef inline str dt_tzname(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the display name of a datetime's timezone `<'str/None'>`.
 * 
*/

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

/* "utils.pxd":4330
 *     return tz_name(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_dst(PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_dst __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_dst", 0);

  /* "utils.pxd":4340
 *     >>> dt.dst()
 *     """
 *     return tz_dst(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4330
 *     return tz_name(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_dst(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4342
 *     return tz_dst(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_dt_utcoffset(PyDateTime_DateTime *__pyx_v_dt) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_utcoffset", 0);

  /* "utils.pxd":4352
 *     >>> dt.utcoffset()
 *     """
 *     return tz_utcoffset(dt.tzinfo, dt)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.dt = __pyx_v_dt;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4342
 *     return tz_dst(dt.tzinfo, dt)
 * 
 * cdef inline datetime.timedelta dt_utcoffset(datetime.datetime dt):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset of a datetime's timezone `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.dt_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_astimezone(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_astimezone *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_my_tz = 0;
  PyObject *__pyx_v_to_tz = 0;
  PyDateTime_Delta *__pyx_v_my_off = 0;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz __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[5];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_12;
  PY_LONG_LONG __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_astimezone", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":4386
 *     """
 *     cdef:
 *         object my_tz = datetime.datetime_tzinfo(dt)             # <<<<<<<<<<<<<<
 *         object to_tz = tzinfo
 *         datetime.timedelta my_off
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_datetime_tzinfo(((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4387
 *     cdef:
 *         object my_tz = datetime.datetime_tzinfo(dt)
 *         object to_tz = tzinfo             # <<<<<<<<<<<<<<
 *         datetime.timedelta my_off
 * 
*/
  __Pyx_INCREF(__pyx_v_tzinfo);
  __pyx_v_to_tz = __pyx_v_tzinfo;

  /* "utils.pxd":4391
 * 
 *     # Resolve target tzinfo
 *     if to_tz is None:             # <<<<<<<<<<<<<<
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
  __pyx_t_2 = (__pyx_v_to_tz == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":4392
 *     # Resolve target tzinfo
 *     if to_tz is None:
 *         to_tz = tz_local()             # <<<<<<<<<<<<<<
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_to_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4394
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
*/
    __pyx_t_2 = (__pyx_v_my_tz == Py_None);
    if (__pyx_t_2) {

      /* "utils.pxd":4395
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)             # <<<<<<<<<<<<<<
 *     elif not is_tz(to_tz):
 *         raise TypeError(
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.dtclass = __pyx_v_dtclass;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, __pyx_v_to_tz, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4394
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is None:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
*/
    }

    /* "utils.pxd":4391
 * 
 *     # Resolve target tzinfo
 *     if to_tz is None:             # <<<<<<<<<<<<<<
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4396
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_to_tz); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 4396, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_2);
  if (unlikely(__pyx_t_4)) {

    /* "utils.pxd":4397
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'datetime.tzinfo', "
 *             "instead got '%s' %s." % (to_tz, type(to_tz))
*/
    __pyx_t_5 = NULL;

    /* "utils.pxd":4399
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
 *             "instead got '%s' %s." % (to_tz, type(to_tz))             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_to_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_to_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
    __pyx_t_8[1] = __pyx_t_6;
    __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_8[3] = __pyx_t_7;
    __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":4398
 *     elif not is_tz(to_tz):
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (to_tz, type(to_tz))
 *         )
*/
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4397, __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(5, 4397, __pyx_L1_error)

    /* "utils.pxd":4396
 *         if my_tz is None:
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *     elif not is_tz(to_tz):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'datetime.tzinfo', "
*/
  }
  __pyx_L3:;

  /* "utils.pxd":4403
 * 
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
  if (__pyx_t_4) {

    /* "utils.pxd":4404
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Naive datetime cases
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4403
 * 
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4407
 * 
 *     # Naive datetime cases
 *     if my_tz is None:             # <<<<<<<<<<<<<<
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
  __pyx_t_4 = (__pyx_v_my_tz == Py_None);
  if (__pyx_t_4) {

    /* "utils.pxd":4408
 *     # Naive datetime cases
 *     if my_tz is None:
 *         my_tz = tz_local()             # <<<<<<<<<<<<<<
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_my_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4410
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
*/
    __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
    if (__pyx_t_4) {

      /* "utils.pxd":4411
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:
 *             return dt_replace_tz(dt, to_tz, dtclass)             # <<<<<<<<<<<<<<
 *         # Access local UTC offset (my_off is local)
 *         my_off = tz_utcoffset(my_tz, dt)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.dtclass = __pyx_v_dtclass;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, __pyx_v_to_tz, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4410
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
 *         if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
*/
    }

    /* "utils.pxd":4413
 *             return dt_replace_tz(dt, to_tz, dtclass)
 *         # Access local UTC offset (my_off is local)
 *         my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 * 
 *     # Aware datetime case: handle no-offset tzinfo
*/
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_my_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4407
 * 
 *     # Naive datetime cases
 *     if my_tz is None:             # <<<<<<<<<<<<<<
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":4418
 *     # by using local tzinfo fallback (CPython pattern)
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 *         if my_off is None:
 *             my_tz = tz_local()
*/
  /*else*/ {
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.dt = __pyx_v_dt;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_my_off = ((PyDateTime_Delta *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "utils.pxd":4419
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:             # <<<<<<<<<<<<<<
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
*/
    __pyx_t_4 = (((PyObject *)__pyx_v_my_off) == Py_None);
    if (__pyx_t_4) {

      /* "utils.pxd":4420
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:
 *             my_tz = tz_local()             # <<<<<<<<<<<<<<
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_my_tz, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "utils.pxd":4422
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
*/
      __pyx_t_4 = (__pyx_v_my_tz == __pyx_v_to_tz);
      if (__pyx_t_4) {

        /* "utils.pxd":4423
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:
 *                 return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 *             # Access local UTC offset (my_off is local)
 *             my_off = tz_utcoffset(my_tz, dt)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_11.__pyx_n = 1;
        __pyx_t_11.dtclass = __pyx_v_dtclass;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "utils.pxd":4422
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
 *             if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
*/
      }

      /* "utils.pxd":4425
 *                 return dt_fr_dt(dt, dtclass)
 *             # Access local UTC offset (my_off is local)
 *             my_off = tz_utcoffset(my_tz, dt)             # <<<<<<<<<<<<<<
 * 
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
*/
      __pyx_t_12.__pyx_n = 1;
      __pyx_t_12.dt = __pyx_v_dt;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_my_tz, &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_my_off, ((PyDateTime_Delta *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "utils.pxd":4419
 *     else:
 *         my_off = tz_utcoffset(my_tz, dt)
 *         if my_off is None:             # <<<<<<<<<<<<<<
 *             my_tz = tz_local()
 *             # Fast-exit: exact same tzinfo
*/
    }
  }
  __pyx_L6:;

  /* "utils.pxd":4428
 * 
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
 *     cdef long long us = dt_to_us(dt, False) - td_to_us(my_off)             # <<<<<<<<<<<<<<
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
*/
  __pyx_t_14.__pyx_n = 1;
  __pyx_t_14.utc = 0;
  __pyx_t_13 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_14); if (unlikely(__pyx_t_13 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4428, __pyx_L1_error)
  __pyx_v_us = (__pyx_t_13 - __pyx_f_7cytimes_5utils_td_to_us(__pyx_v_my_off));

  /* "utils.pxd":4429
 *     # Convert to UTC microseconds, then attach tzinfo and normalize via fromutc
 *     cdef long long us = dt_to_us(dt, False) - td_to_us(my_off)
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_9 = __pyx_v_to_tz;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_15.__pyx_n = 2;
  __pyx_t_15.tzinfo = __pyx_v_to_tz;
  __pyx_t_15.dtclass = __pyx_v_dtclass;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_us, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromutc, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(5, 4429, __pyx_L1_error)
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4354
 *     return tz_utcoffset(dt.tzinfo, dt)
 * 
 * cdef inline datetime.datetime dt_astimezone(datetime.datetime dt, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.datetime` to another timezone `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.dt_astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_to_tz);
  __Pyx_XDECREF((PyObject *)__pyx_v_my_off);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt_normalize_tz(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz *__pyx_optional_args) {
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_tzinfo = 0;
  int __pyx_v_fold;
  PY_LONG_LONG __pyx_v_off_f0;
  PY_LONG_LONG __pyx_v_off_f1;
  PY_LONG_LONG __pyx_v_delta;
  PY_LONG_LONG __pyx_v_us;
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold __pyx_t_4;
  int __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec __pyx_t_6;
  int __pyx_t_7;
  PY_LONG_LONG __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt_normalize_tz", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dtclass = __pyx_optional_args->dtclass;
    }
  }

  /* "utils.pxd":4453
 *     """
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo             # <<<<<<<<<<<<<<
 *     if tzinfo is None:
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tzinfo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "utils.pxd":4454
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_2 = (__pyx_v_tzinfo == Py_None);
  if (__pyx_t_2) {

    /* "utils.pxd":4455
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Probe offsets at both folds around the same wall time
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4454
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4458
 * 
 *     # Probe offsets at both folds around the same wall time
 *     cdef int fold = dt.fold             # <<<<<<<<<<<<<<
 *     cdef long long off_f0, off_f1
 *     if fold == 1:
*/
  __pyx_v_fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);

  /* "utils.pxd":4460
 *     cdef int fold = dt.fold
 *     cdef long long off_f0, off_f1
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
*/
  __pyx_t_2 = (__pyx_v_fold == 1);
  if (__pyx_t_2) {

    /* "utils.pxd":4461
 *     cdef long long off_f0, off_f1
 *     if fold == 1:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))             # <<<<<<<<<<<<<<
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
 *     else:
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_off_f0 = __pyx_t_5;

    /* "utils.pxd":4462
 *     if fold == 1:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)             # <<<<<<<<<<<<<<
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4462, __pyx_L1_error)
    __pyx_v_off_f1 = __pyx_t_5;

    /* "utils.pxd":4460
 *     cdef int fold = dt.fold
 *     cdef long long off_f0, off_f1
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 0, None))
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":4464
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt)
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)             # <<<<<<<<<<<<<<
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 1, None))
 * 
*/
  /*else*/ {
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = __pyx_v_dt;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4464, __pyx_L1_error)
    __pyx_v_off_f0 = __pyx_t_5;

    /* "utils.pxd":4465
 *     else:
 *         off_f0 = tz_utcoffset_sec(tzinfo, dt)
 *         off_f1 = tz_utcoffset_sec(tzinfo, dt_replace_fold(dt, 1, None))             # <<<<<<<<<<<<<<
 * 
 *     # There is no positive delta or either offset is
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, 1, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tzinfo, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((int)-200000))) __PYX_ERR(5, 4465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_off_f1 = __pyx_t_5;
  }
  __pyx_L4:;

  /* "utils.pxd":4469
 *     # There is no positive delta or either offset is
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0             # <<<<<<<<<<<<<<
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:
 *         return dt_fr_dt(dt, dtclass)
*/
  __pyx_v_delta = (__pyx_v_off_f1 - __pyx_v_off_f0);

  /* "utils.pxd":4470
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  __pyx_t_7 = (__pyx_v_delta <= 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_off_f0 == __pyx_v_7cytimes_5utils_NULL_TZOFFSET);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_off_f1 == __pyx_v_7cytimes_5utils_NULL_TZOFFSET);
  __pyx_t_2 = __pyx_t_7;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_2) {

    /* "utils.pxd":4471
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:
 *         return dt_fr_dt(dt, dtclass)             # <<<<<<<<<<<<<<
 * 
 *     # Gap: apply  depending on which side of the gap
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.dtclass = __pyx_v_dtclass;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4470
 *     # unknown (sentinel = -100,000); return as-is.
 *     cdef long long delta = off_f1 - off_f0
 *     if delta <= 0 or off_f0 == NULL_TZOFFSET or off_f1 == NULL_TZOFFSET:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "utils.pxd":4475
 *     # Gap: apply  depending on which side of the gap
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)             # <<<<<<<<<<<<<<
 *     if fold == 1:
 *         us += delta * US_SECOND
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_8 = __pyx_f_7cytimes_5utils_dt_to_us(__pyx_v_dt, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4475, __pyx_L1_error)
  __pyx_v_us = __pyx_t_8;

  /* "utils.pxd":4476
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         us += delta * US_SECOND
 *     else:
*/
  __pyx_t_2 = (__pyx_v_fold == 1);
  if (__pyx_t_2) {

    /* "utils.pxd":4477
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:
 *         us += delta * US_SECOND             # <<<<<<<<<<<<<<
 *     else:
 *         us -= delta * US_SECOND
*/
    __pyx_v_us = (__pyx_v_us + (__pyx_v_delta * __pyx_v_7cytimes_5utils_US_SECOND));

    /* "utils.pxd":4476
 *     # the input fold denotes
 *     cdef long long us = dt_to_us(dt, False)
 *     if fold == 1:             # <<<<<<<<<<<<<<
 *         us += delta * US_SECOND
 *     else:
*/
    goto __pyx_L9;
  }

  /* "utils.pxd":4479
 *         us += delta * US_SECOND
 *     else:
 *         us -= delta * US_SECOND             # <<<<<<<<<<<<<<
 *     return dt_fr_us(us, tzinfo, dtclass)
 * 
*/
  /*else*/ {
    __pyx_v_us = (__pyx_v_us - (__pyx_v_delta * __pyx_v_7cytimes_5utils_US_SECOND));
  }
  __pyx_L9:;

  /* "utils.pxd":4480
 *     else:
 *         us -= delta * US_SECOND
 *     return dt_fr_us(us, tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.time ----------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_10.__pyx_n = 2;
  __pyx_t_10.tzinfo = __pyx_v_tzinfo;
  __pyx_t_10.dtclass = __pyx_v_dtclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_us, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4431
 *     return to_tz.fromutc(dt_fr_us(us, to_tz, dtclass))
 * 
 * cdef inline datetime.datetime dt_normalize_tz(datetime.datetime dt, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Normalize an aware datetime against its own tzinfo `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt_normalize_tz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_new(struct __pyx_opt_args_7cytimes_5utils_time_new *__pyx_optional_args) {
  int __pyx_v_hour = ((int)0);
  int __pyx_v_minute = ((int)0);
  int __pyx_v_second = ((int)0);
  int __pyx_v_microsecond = ((int)0);

  /* "utils.pxd":4486
 * cdef inline datetime.time time_new(
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,             # <<<<<<<<<<<<<<
 * ):
 *     """Create a new time `<'datetime.time'>`.
*/
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  int __pyx_v_fold = ((int)0);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Time *__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;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  size_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17[4];
  int __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  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;
  struct __pyx_opt_args_7cpython_8datetime_time_new __pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_hour = __pyx_optional_args->hour;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_minute = __pyx_optional_args->minute;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_second = __pyx_optional_args->second;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_microsecond = __pyx_optional_args->microsecond;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_fold = __pyx_optional_args->fold;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_tclass = __pyx_optional_args->tclass;
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":4502
 *     """
 *     # Construct time
 *     fold = fold == 1             # <<<<<<<<<<<<<<
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
*/
  __pyx_v_fold = (__pyx_v_fold == 1);

  /* "utils.pxd":4503
 *     # Construct time
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:             # <<<<<<<<<<<<<<
 *         try:
 *             return tclass(
*/
  __pyx_t_2 = (__pyx_v_tclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_tclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
    {
      __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:*/ {

        /* "utils.pxd":4505
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
 *             return tclass(             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_tclass);
        __pyx_t_8 = __pyx_v_tclass; 

        /* "utils.pxd":4506
 *         try:
 *             return tclass(
 *                 hour=hour,             # <<<<<<<<<<<<<<
 *                 minute=minute,
 *                 second=second,
*/
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4506, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "utils.pxd":4507
 *             return tclass(
 *                 hour=hour,
 *                 minute=minute,             # <<<<<<<<<<<<<<
 *                 second=second,
 *                 microsecond=microsecond,
*/
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4507, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "utils.pxd":4508
 *                 hour=hour,
 *                 minute=minute,
 *                 second=second,             # <<<<<<<<<<<<<<
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
*/
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4508, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "utils.pxd":4509
 *                 minute=minute,
 *                 second=second,
 *                 microsecond=microsecond,             # <<<<<<<<<<<<<<
 *                 tzinfo=tzinfo,
 *                 fold=fold,
*/
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 4509, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":4511
 *                 microsecond=microsecond,
 *                 tzinfo=tzinfo,
 *                 fold=fold,             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4511, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_14 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 6 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_t_9, __pyx_t_15, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_t_10, __pyx_t_15, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_t_11, __pyx_t_15, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_t_12, __pyx_t_15, __pyx_callargs+1, 3) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_15, __pyx_callargs+1, 4) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_t_13, __pyx_t_15, __pyx_callargs+1, 5) < (0)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4505, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }

        /* "utils.pxd":4505
 *     if tclass is not None and tclass is not datetime.time:
 *         try:
 *             return tclass(             # <<<<<<<<<<<<<<
 *                 hour=hour,
 *                 minute=minute,
*/
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(5, 4505, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Time *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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;

      /* "utils.pxd":4513
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
*/
      __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_16) {
        __Pyx_AddTraceback("cytimes.utils.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_15) < 0) __PYX_ERR(5, 4513, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":4514
 *             )
 *         except Exception as err:
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
*/
          __pyx_t_12 = NULL;
          __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_time_using_custom;
          __pyx_t_17[1] = __pyx_t_11;
          __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_17[3] = __pyx_t_10;
          __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_17, 4, 41 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10));
          if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4514, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_14 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_9};
            __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4514, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_13);
          }
          __Pyx_Raise(__pyx_t_13, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __PYX_ERR(5, 4514, __pyx_L17_error)
        }

        /* "utils.pxd":4513
 *                 fold=fold,
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_20);
            __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_t_16 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":4504
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:
 *         try:             # <<<<<<<<<<<<<<
 *             return tclass(
 *                 hour=hour,
*/
      __pyx_L8_except_error:;
      __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_L10_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;
    }

    /* "utils.pxd":4503
 *     # Construct time
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:             # <<<<<<<<<<<<<<
 *         try:
 *             return tclass(
*/
  }

  /* "utils.pxd":4515
 *         except Exception as err:
 *             raise ValueError("Cannot create time using custom 'tclass' %s, %s" % (tclass, err)) from err
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_26.__pyx_n = 1;
  __pyx_t_26.fold = __pyx_v_fold;
  __pyx_t_15 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new(__pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, &__pyx_t_26)); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 4515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_15);
  __pyx_t_15 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4484
 * # datetime.time ----------------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.time time_new(             # <<<<<<<<<<<<<<
 *     int hour=0, int minute=0, int second=0, int microsecond=0,
 *     object tzinfo=None, int fold=0, object tclass=None,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils.time_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_now(struct __pyx_opt_args_7cytimes_5utils_time_now *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_now", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4533
 *     >>> datetime.datetime.now(tzinfo).time()
 *     """
 *     return time_fr_dt(dt_now(tzinfo, None), tclass)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.dtclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.tclass = __pyx_v_tclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_t_1), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4517
 *     return datetime.time_new(hour, minute, second, microsecond, tzinfo, fold)
 * 
 * cdef inline datetime.time time_now(object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Get the current time `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.time_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4536
 * 
 * # . type check
 * cdef inline bint is_time(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.time` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4545
 *     >>> isinstance(obj, datetime.time)
 *     """
 *     return datetime.PyTime_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_time_exact(object obj) except -1:
*/
  __pyx_r = PyTime_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4536
 * 
 * # . type check
 * cdef inline bint is_time(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.time` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4547
 *     return datetime.PyTime_Check(obj)
 * 
 * cdef inline bint is_time_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.time` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4556
 *     >>> type(obj) is datetime.time
 *     """
 *     return datetime.PyTime_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyTime_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4547
 *     return datetime.PyTime_Check(obj)
 * 
 * cdef inline bint is_time_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.time` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_time_isoformat(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_time_isoformat *__pyx_optional_args) {
  int __pyx_v_utc = ((int)0);
  int __pyx_v_us;
  PyObject *__pyx_v_s_utc = 0;
  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_7cytimes_5utils_tz_utcformat __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6[5];
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[6];
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[7];
  PyObject *__pyx_t_11[8];
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_isoformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "utils.pxd":4571
 *     """
 *     cdef:
 *         int us = time.microsecond             # <<<<<<<<<<<<<<
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);

  /* "utils.pxd":4572
 *     cdef:
 *         int us = time.microsecond
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None             # <<<<<<<<<<<<<<
 * 
 *     if us == 0:
*/
  if (__pyx_v_utc) {
    __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.dt = ((PyDateTime_DateTime *)Py_None);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_t_2, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(5, 4572, __pyx_L1_error)
  __pyx_v_s_utc = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":4574
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
*/
  __pyx_t_5 = (__pyx_v_us == 0);
  if (__pyx_t_5) {

    /* "utils.pxd":4575
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
*/
    __pyx_t_5 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_5) {

      /* "utils.pxd":4576
 *     if us == 0:
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)             # <<<<<<<<<<<<<<
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6[0] = __pyx_t_1;
      __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_6[2] = __pyx_t_3;
      __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_6[4] = __pyx_t_2;
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4575
 * 
 *     if us == 0:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
*/
    }

    /* "utils.pxd":4577
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)             # <<<<<<<<<<<<<<
 *     else:
 *         if s_utc is None:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8[0] = __pyx_t_7;
    __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_8[2] = __pyx_t_2;
    __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_8[4] = __pyx_t_3;
    __pyx_t_8[5] = __pyx_t_1;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
    if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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_r = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4574
 *         str s_utc = tz_utcformat(time.tzinfo, None) if utc else None
 * 
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         if s_utc is None:
 *             return "%02d:%02d:%02d" % (time.hour, time.minute, time.second)
*/
  }

  /* "utils.pxd":4579
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
*/
  /*else*/ {
    __pyx_t_5 = (__pyx_v_s_utc == ((PyObject*)Py_None));
    if (__pyx_t_5) {

      /* "utils.pxd":4580
 *     else:
 *         if s_utc is None:
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)             # <<<<<<<<<<<<<<
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10[0] = __pyx_t_9;
      __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_10[2] = __pyx_t_1;
      __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__7;
      __pyx_t_10[4] = __pyx_t_3;
      __pyx_t_10[5] = __pyx_mstate_global->__pyx_kp_u__2;
      __pyx_t_10[6] = __pyx_t_2;
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 7, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127);
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "utils.pxd":4579
 *         return "%02d:%02d:%02d%s" % (time.hour, time.minute, time.second, s_utc)
 *     else:
 *         if s_utc is None:             # <<<<<<<<<<<<<<
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
*/
    }

    /* "utils.pxd":4581
 *         if s_utc is None:
 *             return "%02d:%02d:%02d.%06d" % (time.hour, time.minute, time.second, us)
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time), 2, '0', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_us, 6, '0', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_s_utc); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11[0] = __pyx_t_7;
    __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_11[2] = __pyx_t_2;
    __pyx_t_11[3] = __pyx_mstate_global->__pyx_kp_u__7;
    __pyx_t_11[4] = __pyx_t_3;
    __pyx_t_11[5] = __pyx_mstate_global->__pyx_kp_u__2;
    __pyx_t_11[6] = __pyx_t_1;
    __pyx_t_11[7] = __pyx_t_9;
    __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_11, 8, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 4581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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_9); __pyx_t_9 = 0;
    __pyx_r = ((PyObject*)__pyx_t_12);
    __pyx_t_12 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4559
 * 
 * # . conversion: to
 * cdef inline str time_isoformat(datetime.time time, bint utc=False):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to ISO string `<'str'>`.
 * 
*/

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils.time_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s_utc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4583
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total microseconds `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_time_to_us(PyDateTime_Time *__pyx_v_time) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":4592
 *         (<long long> time.hour)       * US_HOUR +
 *         (<long long> time.minute)     * US_MINUTE +
 *         (<long long> time.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> time.microsecond)
 *     )
*/
  __pyx_r = ((((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_HOUR) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_MINUTE)) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time)));
  goto __pyx_L0;

  /* "utils.pxd":4583
 *         return "%02d:%02d:%02d.%06d%s" % (time.hour, time.minute, time.second, us, s_utc)
 * 
 * cdef inline long long time_to_us(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total microseconds `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4596
 *     )
 * 
 * cdef inline double time_to_sec(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total seconds `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_time_to_sec(PyDateTime_Time *__pyx_v_time) {
  PY_LONG_LONG __pyx_v_us;
  double __pyx_r;

  /* "utils.pxd":4602
 *     :returns `<'float'>`: Seconds since midnight in [0.0, 86400.0).
 *     """
 *     cdef long long us = time_to_us(time)             # <<<<<<<<<<<<<<
 *     return <double> us * 1e-6
 * 
*/
  __pyx_v_us = __pyx_f_7cytimes_5utils_time_to_us(__pyx_v_time);

  /* "utils.pxd":4603
 *     """
 *     cdef long long us = time_to_us(time)
 *     return <double> us * 1e-6             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = (((double)__pyx_v_us) * 1e-6);
  goto __pyx_L0;

  /* "utils.pxd":4596
 *     )
 * 
 * cdef inline double time_to_sec(datetime.time time) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.time` to total seconds `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_time_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  __pyx_t_7cytimes_5utils_hmsf __pyx_v__hmsf;
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4615
 *     :returns `<'datetime.time'>`: The resulting time (or subclass if `tclass` is specified).
 *     """
 *     cdef hmsf _hmsf = hmsf_fr_us(value)             # <<<<<<<<<<<<<<
 *     return time_new(
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
*/
  __pyx_v__hmsf = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_v_value);

  /* "utils.pxd":4616
 *     """
 *     cdef hmsf _hmsf = hmsf_fr_us(value)
 *     return time_new(             # <<<<<<<<<<<<<<
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
 *         _hmsf.microsecond, tzinfo, 0, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4618
 *     return time_new(
 *         _hmsf.hour, _hmsf.minute, _hmsf.second,
 *         _hmsf.microsecond, tzinfo, 0, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2.__pyx_n = 7;
  __pyx_t_2.hour = __pyx_v__hmsf.hour;
  __pyx_t_2.minute = __pyx_v__hmsf.minute;
  __pyx_t_2.second = __pyx_v__hmsf.second;
  __pyx_t_2.microsecond = __pyx_v__hmsf.microsecond;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = 0;
  __pyx_t_2.tclass = __pyx_v_tclass;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4606
 * 
 * # . conversion: from
 * cdef inline datetime.time time_fr_us(long long value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from microseconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.time_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_time_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tclass = __pyx_optional_args->tclass;
      }
    }
  }

  /* "utils.pxd":4630
 *     :returns `<'datetime.time'>`: The resulting time (or subclass if `tclass` is specified).
 *     """
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4630, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_v_tzinfo;
  __pyx_t_3.tclass = __pyx_v_tclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4621
 *     )
 * 
 * cdef inline datetime.time time_fr_sec(double value, object tzinfo=None, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from seconds since the Unix epoch `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.time_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_time(PyDateTime_Time *__pyx_v_time, struct __pyx_opt_args_7cytimes_5utils_time_fr_time *__pyx_optional_args) {
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_time", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tclass = __pyx_optional_args->tclass;
    }
  }
  __Pyx_INCREF(__pyx_v_tclass);

  /* "utils.pxd":4642
 *         with the same time fields and tzinfo.
 *     """
 *     if tclass is None:             # <<<<<<<<<<<<<<
 *         tclass = datetime.time
 *     if tclass is type(time):
*/
  __pyx_t_1 = (__pyx_v_tclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4643
 *     """
 *     if tclass is None:
 *         tclass = datetime.time             # <<<<<<<<<<<<<<
 *     if tclass is type(time):
 *         return time
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time);
    __Pyx_DECREF_SET(__pyx_v_tclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time));

    /* "utils.pxd":4642
 *         with the same time fields and tzinfo.
 *     """
 *     if tclass is None:             # <<<<<<<<<<<<<<
 *         tclass = datetime.time
 *     if tclass is type(time):
*/
  }

  /* "utils.pxd":4644
 *     if tclass is None:
 *         tclass = datetime.time
 *     if tclass is type(time):             # <<<<<<<<<<<<<<
 *         return time
 *     return time_new(
*/
  __pyx_t_1 = (__pyx_v_tclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_time))));
  if (__pyx_t_1) {

    /* "utils.pxd":4645
 *         tclass = datetime.time
 *     if tclass is type(time):
 *         return time             # <<<<<<<<<<<<<<
 *     return time_new(
 *         time.hour, time.minute, time.second,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_time);
    __pyx_r = __pyx_v_time;
    goto __pyx_L0;

    /* "utils.pxd":4644
 *     if tclass is None:
 *         tclass = datetime.time
 *     if tclass is type(time):             # <<<<<<<<<<<<<<
 *         return time
 *     return time_new(
*/
  }

  /* "utils.pxd":4646
 *     if tclass is type(time):
 *         return time
 *     return time_new(             # <<<<<<<<<<<<<<
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4648
 *     return time_new(
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_4time_6tzinfo_tzinfo(__pyx_v_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "utils.pxd":4646
 *     if tclass is type(time):
 *         return time
 *     return time_new(             # <<<<<<<<<<<<<<
 *         time.hour, time.minute, time.second,
 *         time.microsecond, time.tzinfo, time.fold, tclass
*/
  __pyx_t_4.__pyx_n = 7;
  __pyx_t_4.hour = __pyx_f_7cpython_8datetime_4time_4hour_hour(__pyx_v_time);
  __pyx_t_4.minute = __pyx_f_7cpython_8datetime_4time_6minute_minute(__pyx_v_time);
  __pyx_t_4.second = __pyx_f_7cpython_8datetime_4time_6second_second(__pyx_v_time);
  __pyx_t_4.microsecond = __pyx_f_7cpython_8datetime_4time_11microsecond_microsecond(__pyx_v_time);
  __pyx_t_4.tzinfo = __pyx_t_2;
  __pyx_t_4.fold = __pyx_f_7cpython_8datetime_4time_4fold_fold(__pyx_v_time);
  __pyx_t_4.tclass = __pyx_v_tclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4632
 *     return time_fr_us(sec_to_us(value), tzinfo, tclass)
 * 
 * cdef inline datetime.time time_fr_time(datetime.time time, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from another time (include subclass) `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.time_fr_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_dt(PyDateTime_DateTime *__pyx_v_dt, struct __pyx_opt_args_7cytimes_5utils_time_fr_dt *__pyx_optional_args) {
  PyObject *__pyx_v_tclass = ((PyObject *)Py_None);
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time_fr_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tclass = __pyx_optional_args->tclass;
    }
  }

  /* "utils.pxd":4660
 *         with the same time fields and tzinfo.
 *     """
 *     return time_new(             # <<<<<<<<<<<<<<
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "utils.pxd":4662
 *     return time_new(
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_1 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 4662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "utils.pxd":4660
 *         with the same time fields and tzinfo.
 *     """
 *     return time_new(             # <<<<<<<<<<<<<<
 *         dt.hour, dt.minute, dt.second,
 *         dt.microsecond, dt.tzinfo, dt.fold, tclass
*/
  __pyx_t_3.__pyx_n = 7;
  __pyx_t_3.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
  __pyx_t_3.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
  __pyx_t_3.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
  __pyx_t_3.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.fold = __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt);
  __pyx_t_3.tclass = __pyx_v_tclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyDateTime_Time *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4651
 *     )
 * 
 * cdef inline datetime.time time_fr_dt(datetime.datetime dt, object tclass=None):             # <<<<<<<<<<<<<<
 *     """Create time from datetime (include subclass) `<'datetime.time'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.time_fr_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_new(struct __pyx_opt_args_7cytimes_5utils_td_new *__pyx_optional_args) {
  int __pyx_v_days = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__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;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15[4];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_days = __pyx_optional_args->days;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_seconds = __pyx_optional_args->seconds;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_microseconds = __pyx_optional_args->microseconds;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_tdclass = __pyx_optional_args->tdclass;
          }
        }
      }
    }
  }

  /* "utils.pxd":4681
 *     """
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:             # <<<<<<<<<<<<<<
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
*/
  __pyx_t_2 = (__pyx_v_tdclass != Py_None);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_tdclass != ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
    {
      __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:*/ {

        /* "utils.pxd":4683
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_tdclass);
        __pyx_t_8 = __pyx_v_tdclass; 
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_days); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_seconds); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_microseconds); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4683, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
          assert(__pyx_t_7);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_days, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_seconds, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4683, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
        }
        if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 4683, __pyx_L6_error)
        __pyx_r = ((PyDateTime_Delta *)__pyx_t_6);
        __pyx_t_6 = 0;
        goto __pyx_L10_try_return;

        /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
      }
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 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;

      /* "utils.pxd":4684
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_14) {
        __Pyx_AddTraceback("cytimes.utils.td_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_13) < 0) __PYX_ERR(5, 4684, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "utils.pxd":4685
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err             # <<<<<<<<<<<<<<
 *     return datetime.timedelta_new(days, seconds, microseconds)
 * 
*/
          __pyx_t_10 = NULL;
          __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tdclass), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_err), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_create_timedelta_using_cu;
          __pyx_t_15[1] = __pyx_t_9;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_15[3] = __pyx_t_7;
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 47 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 4685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_12 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4685, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 4685, __pyx_L17_error)
        }

        /* "utils.pxd":4684
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "utils.pxd":4682
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:
 *         try:             # <<<<<<<<<<<<<<
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
 *         except Exception as err:
*/
      __pyx_L8_except_error:;
      __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_L10_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;
    }

    /* "utils.pxd":4681
 *     """
 *     # Construct timedelta
 *     if tdclass is not None and tdclass is not datetime.timedelta:             # <<<<<<<<<<<<<<
 *         try:
 *             return tdclass(days=days, seconds=seconds, microseconds=microseconds)
*/
  }

  /* "utils.pxd":4686
 *         except Exception as err:
 *             raise ValueError("Cannot create timedelta using custom 'tdclass' %s, %s" % (tdclass, err)) from err
 *     return datetime.timedelta_new(days, seconds, microseconds)             # <<<<<<<<<<<<<<
 * 
 * # . type check
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_13 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(__pyx_v_days, __pyx_v_seconds, __pyx_v_microseconds)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_13);
  __pyx_t_13 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4667
 * # datetime.timedelta -----------------------------------------------------------------------------------
 * # . generate
 * cdef inline datetime.timedelta td_new(int days=0, int seconds=0, int microseconds=0, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create a new timedelta `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.td_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4689
 * 
 * # . type check
 * cdef inline bint is_td(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.timedelta` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4698
 *     >>> isinstance(obj, datetime.timedelta)
 *     """
 *     return datetime.PyDelta_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_td_exact(object obj) except -1:
*/
  __pyx_r = PyDelta_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4689
 * 
 * # . type check
 * cdef inline bint is_td(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `datetime.timedelta` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4700
 *     return datetime.PyDelta_Check(obj)
 * 
 * cdef inline bint is_td_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.timedelta` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4709
 *     >>> type(obj) is datetime.timedelta
 *     """
 *     return datetime.PyDelta_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: to
*/
  __pyx_r = PyDelta_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4700
 *     return datetime.PyDelta_Check(obj)
 * 
 * cdef inline bint is_td_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.timedelta` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4712
 * 
 * # . conversion: to
 * cdef inline str td_isoformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert timedelta to string in ISO-like string (HH:MM:SS[.f]) `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_isoformat(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_us;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  int __pyx_v_neg;
  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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_isoformat", 0);

  /* "utils.pxd":4719
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec  = td.second
 *         long long us   = td.microsecond
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4720
 *     cdef:
 *         long long days = td.day
 *         long long sec  = td.second             # <<<<<<<<<<<<<<
 *         long long us   = td.microsecond
 *         long long hh, mi
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4721
 *         long long days = td.day
 *         long long sec  = td.second
 *         long long us   = td.microsecond             # <<<<<<<<<<<<<<
 *         long long hh, mi
 *         bint neg
*/
  __pyx_v_us = __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td);

  /* "utils.pxd":4724
 *         long long hh, mi
 *         bint neg
 *     sec = days * SS_DAY + sec             # <<<<<<<<<<<<<<
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
*/
  __pyx_v_sec = ((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec);

  /* "utils.pxd":4727
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         neg = True
 *         sec = -sec
*/
  __pyx_t_1 = (__pyx_v_sec < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4728
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:
 *         neg = True             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
*/
    __pyx_v_neg = 1;

    /* "utils.pxd":4729
 *     if sec < 0:
 *         neg = True
 *         sec = -sec             # <<<<<<<<<<<<<<
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:
*/
    __pyx_v_sec = (-__pyx_v_sec);

    /* "utils.pxd":4731
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:             # <<<<<<<<<<<<<<
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
*/
    __pyx_t_1 = (__pyx_v_us != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":4732
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:
 *             sec -= 1                # |-X sec, +us|             # <<<<<<<<<<<<<<
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
 *     else:
*/
      __pyx_v_sec = (__pyx_v_sec - 1);

      /* "utils.pxd":4733
 *         if us != 0:
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)             # <<<<<<<<<<<<<<
 *     else:
 *         neg = False
*/
      __pyx_v_us = (0xF4240 - __pyx_v_us);

      /* "utils.pxd":4731
 *         sec = -sec
 *         # Borrow 1 second so that we can complement microseconds.
 *         if us != 0:             # <<<<<<<<<<<<<<
 *             sec -= 1                # |-X sec, +us|
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
*/
    }

    /* "utils.pxd":4727
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         neg = True
 *         sec = -sec
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4735
 *             us = 1_000_000 - us     # (|X|-1) seconds => (1_000_000 - us)
 *     else:
 *         neg = False             # <<<<<<<<<<<<<<
 * 
 *     # Split absolute seconds into H:M:S
*/
  /*else*/ {
    __pyx_v_neg = 0;
  }
  __pyx_L3:;

  /* "utils.pxd":4739
 *     # Split absolute seconds into H:M:S
 *     with cython.cdivision(True):
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR             # <<<<<<<<<<<<<<
 *         mi = sec / SS_MINUTE;   sec %= SS_MINUTE
 * 
*/
  __pyx_v_hh = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4739, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":4740
 *     with cython.cdivision(True):
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE;   sec %= SS_MINUTE             # <<<<<<<<<<<<<<
 * 
 *     # Emit
*/
  __pyx_v_mi = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_MINUTE);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_MINUTE == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4740, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_MINUTE, 0);

  /* "utils.pxd":4743
 * 
 *     # Emit
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
*/
  __pyx_t_1 = (__pyx_v_us == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4744
 *     # Emit
 *     if us == 0:
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)             # <<<<<<<<<<<<<<
 *     else:
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
*/
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_neg) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d);
      __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d;
    } else {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_2);
      __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_2;
    }
    __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_sec); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5) != (0)) __PYX_ERR(5, 4744, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_FormatSafe(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":4743
 * 
 *     # Emit
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
*/
  }

  /* "utils.pxd":4746
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)             # <<<<<<<<<<<<<<
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    if (__pyx_v_neg) {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d;
    } else {
      __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d_2);
      __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_02d_02d_02d_06d_2;
    }
    __pyx_t_6 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_sec); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_us); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_3) != (0)) __PYX_ERR(5, 4746, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":4712
 * 
 * # . conversion: to
 * cdef inline str td_isoformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert timedelta to string in ISO-like string (HH:MM:SS[.f]) `<'str'>`.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.td_isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4748
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to a UTC offset string (HHMM) `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_utcformat(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  int __pyx_v_neg;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_utcformat", 0);

  /* "utils.pxd":4755
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec  = td.second
 *         long long hh, mi
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4756
 *     cdef:
 *         long long days = td.day
 *         long long sec  = td.second             # <<<<<<<<<<<<<<
 *         long long hh, mi
 *         bint neg
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4759
 *         long long hh, mi
 *         bint neg
 *     sec = days * SS_DAY + sec             # <<<<<<<<<<<<<<
 * 
 *     # Check sign
*/
  __pyx_v_sec = ((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec);

  /* "utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
  __pyx_t_1 = (__pyx_v_sec < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4763
 *     # Check sign
 *     if sec < 0:
 *         sec = -sec             # <<<<<<<<<<<<<<
 *         neg = True
 *     else:
*/
    __pyx_v_sec = (-__pyx_v_sec);

    /* "utils.pxd":4764
 *     if sec < 0:
 *         sec = -sec
 *         neg = True             # <<<<<<<<<<<<<<
 *     else:
 *         neg = False
*/
    __pyx_v_neg = 1;

    /* "utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4766
 *         neg = True
 *     else:
 *         neg = False             # <<<<<<<<<<<<<<
 * 
 *     # Split absolute seconds into H:M
*/
  /*else*/ {
    __pyx_v_neg = 0;
  }
  __pyx_L3:;

  /* "utils.pxd":4770
 *     # Split absolute seconds into H:M
 *     with cython.cdivision(True):
 *         sec %= SS_DAY             # <<<<<<<<<<<<<<
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE
*/
  if (unlikely(__pyx_v_7cytimes_5utils_SS_DAY == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4770, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_DAY, 0);

  /* "utils.pxd":4771
 *     with cython.cdivision(True):
 *         sec %= SS_DAY
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR             # <<<<<<<<<<<<<<
 *         mi = sec / SS_MINUTE
 * 
*/
  __pyx_v_hh = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_HOUR);
  if (unlikely(__pyx_v_7cytimes_5utils_SS_HOUR == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(5, 4771, __pyx_L1_error)
  }
  __pyx_v_sec = __Pyx_mod_PY_LONG_LONG(__pyx_v_sec, __pyx_v_7cytimes_5utils_SS_HOUR, 0);

  /* "utils.pxd":4772
 *         sec %= SS_DAY
 *         hh = sec / SS_HOUR;     sec %= SS_HOUR
 *         mi = sec / SS_MINUTE             # <<<<<<<<<<<<<<
 * 
 *     # Format to string
*/
  __pyx_v_mi = (__pyx_v_sec / __pyx_v_7cytimes_5utils_SS_MINUTE);

  /* "utils.pxd":4775
 * 
 *     # Format to string
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)             # <<<<<<<<<<<<<<
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:
*/
  __Pyx_XDECREF(__pyx_r);
  if (__pyx_v_neg) {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d);
    __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d;
  } else {
    __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_02d_02d_2);
    __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_02d_02d_2;
  }
  __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_hh); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_mi); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(5, 4775, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(5, 4775, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 4775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4748
 *         return ("-%02d:%02d:%02d.%06d" if neg else "%02d:%02d:%02d.%06d") % (hh, mi, sec, us)
 * 
 * cdef inline str td_utcformat(datetime.timedelta td):             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to a UTC offset string (HHMM) `<'str'>`.
 * 
*/

  /* 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("cytimes.utils.td_utcformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4777
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total microseconds `<'int'>`.
 * 
*/

static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_td_to_us(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_r;

  /* "utils.pxd":4785
 *     return (
 *         (<long long> td.day)        * US_DAY +
 *         (<long long> td.second)     * US_SECOND +             # <<<<<<<<<<<<<<
 *         (<long long> td.microsecond)
 *     )
*/
  __pyx_r = (((((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td)) * __pyx_v_7cytimes_5utils_US_DAY) + (((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td)) * __pyx_v_7cytimes_5utils_US_SECOND)) + ((PY_LONG_LONG)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td)));
  goto __pyx_L0;

  /* "utils.pxd":4777
 *     return ("-%02d%02d" if neg else "+%02d%02d") % (hh, mi)
 * 
 * cdef inline long long td_to_us(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total microseconds `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4789
 *     )
 * 
 * cdef inline double td_to_sec(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total seconds `<'float'>`.
 * 
*/

static CYTHON_INLINE double __pyx_f_7cytimes_5utils_td_to_sec(PyDateTime_Delta *__pyx_v_td) {
  PY_LONG_LONG __pyx_v_days;
  PY_LONG_LONG __pyx_v_sec;
  double __pyx_v_fsec;
  double __pyx_v_frac;
  double __pyx_r;

  /* "utils.pxd":4796
 *     """
 *     cdef:
 *         long long days = td.day             # <<<<<<<<<<<<<<
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)
*/
  __pyx_v_days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);

  /* "utils.pxd":4797
 *     cdef:
 *         long long days = td.day
 *         long long sec = td.second             # <<<<<<<<<<<<<<
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6
*/
  __pyx_v_sec = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);

  /* "utils.pxd":4798
 *         long long days = td.day
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)             # <<<<<<<<<<<<<<
 *         double frac = (<double> td.microsecond) * 1e-6
 *     return fsec + frac
*/
  __pyx_v_fsec = ((double)((__pyx_v_days * __pyx_v_7cytimes_5utils_SS_DAY) + __pyx_v_sec));

  /* "utils.pxd":4799
 *         long long sec = td.second
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6             # <<<<<<<<<<<<<<
 *     return fsec + frac
 * 
*/
  __pyx_v_frac = (((double)__pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td)) * 1e-6);

  /* "utils.pxd":4800
 *         double fsec = <double> (days * SS_DAY + sec)
 *         double frac = (<double> td.microsecond) * 1e-6
 *     return fsec + frac             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = (__pyx_v_fsec + __pyx_v_frac);
  goto __pyx_L0;

  /* "utils.pxd":4789
 *     )
 * 
 * cdef inline double td_to_sec(datetime.timedelta td) noexcept:             # <<<<<<<<<<<<<<
 *     """Convert a `datetime.timedelta` to total seconds `<'float'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_us(PY_LONG_LONG __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_td_fr_us *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PY_LONG_LONG __pyx_v_q;
  PY_LONG_LONG __pyx_v_r;
  int __pyx_v_dd;
  int __pyx_v_ss;
  int __pyx_v_us;
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":4814
 *     cdef int dd, ss, us
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1; r += US_DAY
*/
  __pyx_v_q = (__pyx_v_value / __pyx_v_7cytimes_5utils_US_DAY);
  __pyx_v_r = (__pyx_v_value % __pyx_v_7cytimes_5utils_US_DAY);

  /* "utils.pxd":4815
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         dd = <int> q
*/
  __pyx_t_1 = (__pyx_v_r < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":4816
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:
 *             q -= 1; r += US_DAY             # <<<<<<<<<<<<<<
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)
*/
    __pyx_v_q = (__pyx_v_q - 1);
    __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_DAY);

    /* "utils.pxd":4815
 *     with cython.cdivision(True):
 *         q = value / US_DAY; r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += US_DAY
 *         dd = <int> q
*/
  }

  /* "utils.pxd":4817
 *         if r < 0:
 *             q -= 1; r += US_DAY
 *         dd = <int> q             # <<<<<<<<<<<<<<
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)
*/
  __pyx_v_dd = ((int)__pyx_v_q);

  /* "utils.pxd":4818
 *             q -= 1; r += US_DAY
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)             # <<<<<<<<<<<<<<
 *         us = <int> (r % US_SECOND)
 *     return td_new(dd, ss, us, tdclass)
*/
  __pyx_v_ss = ((int)(__pyx_v_r / __pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":4819
 *         dd = <int> q
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)             # <<<<<<<<<<<<<<
 *     return td_new(dd, ss, us, tdclass)
 * 
*/
  __pyx_v_us = ((int)(__pyx_v_r % __pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":4820
 *         ss = <int> (r / US_SECOND)
 *         us = <int> (r % US_SECOND)
 *     return td_new(dd, ss, us, tdclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.days = __pyx_v_dd;
  __pyx_t_3.seconds = __pyx_v_ss;
  __pyx_t_3.microseconds = __pyx_v_us;
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4803
 * 
 * # . conversion: from
 * cdef inline datetime.timedelta td_fr_us(long long value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from microseconds `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_sec(double __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_td_fr_sec *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_us __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":4830
 *     :returns `<'datetime.timedelta'>`: The resulting timedelta (or subclass if `tdclass` is specified).
 *     """
 *     return td_fr_us(sec_to_us(value), tdclass)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_v_value); if (unlikely(__pyx_t_1 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4830, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us(__pyx_t_1, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4822
 *     return td_new(dd, ss, us, tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_sec(double value, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from seconds `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_td(PyDateTime_Delta *__pyx_v_td, struct __pyx_opt_args_7cytimes_5utils_td_fr_td *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_new __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td_fr_td", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }
  __Pyx_INCREF(__pyx_v_tdclass);

  /* "utils.pxd":4842
 *         with the same days, seconds and microseconds.
 *     """
 *     if tdclass is None:             # <<<<<<<<<<<<<<
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
*/
  __pyx_t_1 = (__pyx_v_tdclass == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4843
 *     """
 *     if tdclass is None:
 *         tdclass = datetime.timedelta             # <<<<<<<<<<<<<<
 *     if tdclass is type(td):
 *         return td
*/
    __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta);
    __Pyx_DECREF_SET(__pyx_v_tdclass, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta));

    /* "utils.pxd":4842
 *         with the same days, seconds and microseconds.
 *     """
 *     if tdclass is None:             # <<<<<<<<<<<<<<
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
*/
  }

  /* "utils.pxd":4844
 *     if tdclass is None:
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):             # <<<<<<<<<<<<<<
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
*/
  __pyx_t_1 = (__pyx_v_tdclass == ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_td))));
  if (__pyx_t_1) {

    /* "utils.pxd":4845
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
 *         return td             # <<<<<<<<<<<<<<
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_td);
    __pyx_r = __pyx_v_td;
    goto __pyx_L0;

    /* "utils.pxd":4844
 *     if tdclass is None:
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):             # <<<<<<<<<<<<<<
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)
*/
  }

  /* "utils.pxd":4846
 *     if tdclass is type(td):
 *         return td
 *     return td_new(td.day, td.second, td.microsecond, tdclass)             # <<<<<<<<<<<<<<
 * 
 * # datetime.tzinfo --------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 4;
  __pyx_t_3.days = __pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_td);
  __pyx_t_3.seconds = __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_td);
  __pyx_t_3.microseconds = __pyx_f_7cpython_8datetime_9timedelta_11microsecond_microsecond(__pyx_v_td);
  __pyx_t_3.tdclass = __pyx_v_tdclass;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4832
 *     return td_fr_us(sec_to_us(value), tdclass)
 * 
 * cdef inline datetime.timedelta td_fr_td(datetime.timedelta td, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Create timedelta from another timedelta (or subclass) `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.td_fr_td", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tdclass);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_new(struct __pyx_opt_args_7cytimes_5utils_tz_new *__pyx_optional_args) {
  int __pyx_v_hours = ((int)0);
  int __pyx_v_minites = ((int)0);
  int __pyx_v_seconds = ((int)0);
  PY_LONG_LONG __pyx_v_sec;
  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[9];
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  struct __pyx_opt_args_7cpython_8datetime_timezone_new __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_new", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_hours = __pyx_optional_args->hours;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_minites = __pyx_optional_args->minites;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_seconds = __pyx_optional_args->seconds;
        }
      }
    }
  }

  /* "utils.pxd":4862
 *     """
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds             # <<<<<<<<<<<<<<
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
*/
  __pyx_v_sec = (((__pyx_v_hours * 0xE10) + (__pyx_v_minites * 60)) + __pyx_v_seconds);

  /* "utils.pxd":4863
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
*/
  __pyx_t_1 = (-86400LL < __pyx_v_sec);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_sec < 0x15180);
  }
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":4864
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":4866
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_hours, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_minites, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_seconds, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 4866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Timezone_offset;
    __pyx_t_9[1] = __pyx_t_5;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_seconds_from_hours;
    __pyx_t_9[3] = __pyx_t_6;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_minutes;
    __pyx_t_9[5] = __pyx_t_7;
    __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u_seconds_2;
    __pyx_t_9[7] = __pyx_t_8;
    __pyx_t_9[8] = __pyx_mstate_global->__pyx_kp_u_out_of_range_Must_be_strictly_b;

    /* "utils.pxd":4865
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "             # <<<<<<<<<<<<<<
 *             "Must be strictly between [-86400..86400] (exclusive)" % (hours, minites, seconds, sec)
 *         )
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 9, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 68, 127);
    if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4864, __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(5, 4864, __pyx_L1_error)

    /* "utils.pxd":4863
 *     # Range: inclusive 24:00 per CPython (datetime.timezone)
 *     cdef long long sec = hours * 3_600 + minites * 60 + seconds
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (hours=%d, minutes=%d, seconds=%d) out of range. "
*/
  }

  /* "utils.pxd":4870
 * 
 *     # New timezone
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_7cpython_8datetime_timedelta_new(0, __pyx_v_sec, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.name = Py_None;
  __pyx_t_10 = __pyx_f_7cpython_8datetime_timezone_new(__pyx_t_3, &__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_10;
  __pyx_t_10 = 0;
  goto __pyx_L0;

  /* "utils.pxd":4850
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * # . generate
 * cdef inline object tz_new(int hours=0, int minites=0, int seconds=0):             # <<<<<<<<<<<<<<
 *     """Create a new fixed-offset timezone `<'datetime.timezone'>`.
 * 
*/

  /* 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("cytimes.utils.tz_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_local(struct __pyx_opt_args_7cytimes_5utils_tz_local *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_local", 0);
  if (__pyx_optional_args) {
  }

  /* "utils.pxd":4888
 *       future transitions.
 *     """
 *     return _LOCAL_TIMEZONE             # <<<<<<<<<<<<<<
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE);
  __pyx_r = __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE;
  goto __pyx_L0;

  /* "utils.pxd":4872
 *     return datetime.timezone_new(datetime.timedelta_new(0, sec, 0), None)
 * 
 * cdef inline object tz_local(datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Get the process-local timezone `<'zoneinfo.ZoneInfo/datetime.timezone'>`.
 * 
*/

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

/* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_local_sec(struct __pyx_opt_args_7cytimes_5utils_tz_local_sec *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PY_LONG_LONG __pyx_v_ts1;
  PY_LONG_LONG __pyx_v_ts2;
  double __pyx_v_ts;
  struct tm __pyx_v_loc;
  struct tm __pyx_v_gmt;
  PY_LONG_LONG __pyx_v_ord_loc;
  PY_LONG_LONG __pyx_v_ord_gmt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PY_LONG_LONG __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_fold __pyx_t_4;
  int __pyx_t_5;
  double __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_7;
  struct tm __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_local_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4909
 * 
 *     # Decide the timestamp (seconds since epoch)
 *     if dt is None:             # <<<<<<<<<<<<<<
 *         # current time
 *         ts = unix_time()
*/
  __pyx_t_1 = (((PyObject *)__pyx_v_dt) == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4911
 *     if dt is None:
 *         # current time
 *         ts = unix_time()             # <<<<<<<<<<<<<<
 *     else:
 *         # naive: interpret as local wall time
*/
    __pyx_v_ts = __pyx_f_7cpython_4time_time();

    /* "utils.pxd":4909
 * 
 *     # Decide the timestamp (seconds since epoch)
 *     if dt is None:             # <<<<<<<<<<<<<<
 *         # current time
 *         ts = unix_time()
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":4914
 *     else:
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:             # <<<<<<<<<<<<<<
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
*/
  /*else*/ {
    __pyx_t_2 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "utils.pxd":4915
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:
 *             ts1 = dt_local_mktime(dt)             # <<<<<<<<<<<<<<
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
*/
      __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_local_mktime(__pyx_v_dt); if (unlikely(__pyx_t_3 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4915, __pyx_L1_error)
      __pyx_v_ts1 = __pyx_t_3;

      /* "utils.pxd":4917
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))             # <<<<<<<<<<<<<<
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):
 *                 ts = <double> ts2
*/
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.dtclass = Py_None;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(__pyx_v_dt, (1 - __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt)), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_7cytimes_5utils_dt_local_mktime(((PyDateTime_DateTime *)__pyx_t_2)); if (unlikely(__pyx_t_3 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 4917, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_ts2 = __pyx_t_3;

      /* "utils.pxd":4918
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):             # <<<<<<<<<<<<<<
 *                 ts = <double> ts2
 *             else:
*/
      __pyx_t_5 = (__pyx_v_ts2 != __pyx_v_ts1);
      if (__pyx_t_5) {
      } else {
        __pyx_t_1 = __pyx_t_5;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_5 = ((__pyx_v_ts2 > __pyx_v_ts1) == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_dt));
      __pyx_t_1 = __pyx_t_5;
      __pyx_L6_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":4919
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):
 *                 ts = <double> ts2             # <<<<<<<<<<<<<<
 *             else:
 *                 ts = <double> ts1
*/
        __pyx_v_ts = ((double)__pyx_v_ts2);

        /* "utils.pxd":4918
 *             # probe the other fold to handle gaps/ambiguous times
 *             ts2 = dt_local_mktime(dt_replace_fold(dt, 1 - dt.fold, None))
 *             if ts2 != ts1 and ((ts2 > ts1) == dt.fold):             # <<<<<<<<<<<<<<
 *                 ts = <double> ts2
 *             else:
*/
        goto __pyx_L5;
      }

      /* "utils.pxd":4921
 *                 ts = <double> ts2
 *             else:
 *                 ts = <double> ts1             # <<<<<<<<<<<<<<
 *         # aware: use UTC instant
 *         else:
*/
      /*else*/ {
        __pyx_v_ts = ((double)__pyx_v_ts1);
      }
      __pyx_L5:;

      /* "utils.pxd":4914
 *     else:
 *         # naive: interpret as local wall time
 *         if dt.tzinfo is None:             # <<<<<<<<<<<<<<
 *             ts1 = dt_local_mktime(dt)
 *             # probe the other fold to handle gaps/ambiguous times
*/
      goto __pyx_L4;
    }

    /* "utils.pxd":4924
 *         # aware: use UTC instant
 *         else:
 *             ts = dt_to_sec(dt, True)             # <<<<<<<<<<<<<<
 * 
 *     # Compute offset via ordinals + time-of-day
*/
    /*else*/ {
      __pyx_t_7.__pyx_n = 1;
      __pyx_t_7.utc = 1;
      __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_sec(__pyx_v_dt, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(5, 4924, __pyx_L1_error)
      __pyx_v_ts = __pyx_t_6;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "utils.pxd":4927
 * 
 *     # Compute offset via ordinals + time-of-day
 *     loc = tm_localtime(ts)             # <<<<<<<<<<<<<<
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)
*/
  __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_localtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 4927, __pyx_L1_error)
  __pyx_v_loc = __pyx_t_8;

  /* "utils.pxd":4928
 *     # Compute offset via ordinals + time-of-day
 *     loc = tm_localtime(ts)
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)             # <<<<<<<<<<<<<<
 *     gmt = tm_gmtime(ts)
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)
*/
  __pyx_v_ord_loc = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_loc.tm_year, __pyx_v_loc.tm_mon, __pyx_v_loc.tm_mday);

  /* "utils.pxd":4929
 *     loc = tm_localtime(ts)
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)             # <<<<<<<<<<<<<<
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)
 *     return (
*/
  __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_v_ts); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 4929, __pyx_L1_error)
  __pyx_v_gmt = __pyx_t_8;

  /* "utils.pxd":4930
 *     ord_loc = ymd_to_ord(loc.tm_year, loc.tm_mon, loc.tm_mday)
 *     gmt = tm_gmtime(ts)
 *     ord_gmt = ymd_to_ord(gmt.tm_year, gmt.tm_mon, gmt.tm_mday)             # <<<<<<<<<<<<<<
 *     return (
 *         (ord_loc - ord_gmt)         * SS_DAY    +
*/
  __pyx_v_ord_gmt = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_gmt.tm_year, __pyx_v_gmt.tm_mon, __pyx_v_gmt.tm_mday);

  /* "utils.pxd":4934
 *         (ord_loc - ord_gmt)         * SS_DAY    +
 *         (loc.tm_hour - gmt.tm_hour) * SS_HOUR   +
 *         (loc.tm_min - gmt.tm_min)   * SS_MINUTE +             # <<<<<<<<<<<<<<
 *         (loc.tm_sec - gmt.tm_sec)
 *     )
*/
  __pyx_r = (((((__pyx_v_ord_loc - __pyx_v_ord_gmt) * __pyx_v_7cytimes_5utils_SS_DAY) + ((__pyx_v_loc.tm_hour - __pyx_v_gmt.tm_hour) * __pyx_v_7cytimes_5utils_SS_HOUR)) + ((__pyx_v_loc.tm_min - __pyx_v_gmt.tm_min) * __pyx_v_7cytimes_5utils_SS_MINUTE)) + (__pyx_v_loc.tm_sec - __pyx_v_gmt.tm_sec));
  goto __pyx_L0;

  /* "utils.pxd":4890
 *     return _LOCAL_TIMEZONE
 * 
 * cdef inline int tz_local_sec(datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the local UTC offset (in whole seconds) at the given instant `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.tz_local_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -200000;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4941
 * 
 * # . type check
 * cdef inline bint is_tz(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.tzinfo` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4950
 *     >>> isinstance(obj, datetime.tzinfo)
 *     """
 *     return datetime.PyTZInfo_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:
*/
  __pyx_r = PyTZInfo_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4941
 * 
 * # . type check
 * cdef inline bint is_tz(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or sublcass of `datetime.tzinfo` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4952
 *     return datetime.PyTZInfo_Check(obj)
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.tzinfo` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_tz_exact(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":4961
 *     >>> type(obj) is datetime.date
 *     """
 *     return datetime.PyTZInfo_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = PyTZInfo_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":4952
 *     return datetime.PyTZInfo_Check(obj)
 * 
 * cdef inline bint is_tz_exact(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an exact `datetime.tzinfo` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_name(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_name *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_name", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4975
 *     >>> tz.tzname(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4976
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.tzname(dt)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":4975
 *     >>> tz.tzname(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "utils.pxd":4978
 *         return None
 *     try:
 *         return tz.tzname(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tzname, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 4978, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(5, 4978, __pyx_L4_error)
      __pyx_r = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":4979
 *     try:
 *         return tz.tzname(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 4979, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":4980
 *         return tz.tzname(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 4980, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":4981
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":4983
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 4983, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 4983, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":4982
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 4982, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 4981, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":4984
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 4981, __pyx_L15_error)

          /* "utils.pxd":4980
 *         return tz.tzname(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":4985
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 4985, __pyx_L15_error)
      }

      /* "utils.pxd":4979
 *     try:
 *         return tz.tzname(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":4977
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.tzname(dt)
 *     except Exception as err:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "utils.pxd":4964
 * 
 * # . access
 * cdef inline str tz_name(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the display name from a tzinfo `<'str/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_dst(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_dst *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_dst", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":4998
 *     >>> tz.dst(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":4999
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.dst(dt)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((PyDateTime_Delta *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":4998
 *     >>> tz.dst(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "utils.pxd":5001
 *         return None
 *     try:
 *         return tz.dst(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dst, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5001, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 5001, __pyx_L4_error)
      __pyx_r = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":5002
 *     try:
 *         return tz.dst(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 5002, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":5003
 *         return tz.dst(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5003, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":5004
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":5006
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5006, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5006, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":5005
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5005, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5004, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":5007
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 5004, __pyx_L15_error)

          /* "utils.pxd":5003
 *         return tz.dst(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":5008
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 5008, __pyx_L15_error)
      }

      /* "utils.pxd":5002
 *     try:
 *         return tz.dst(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":5000
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.dst(dt)
 *     except Exception as err:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "utils.pxd":4987
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_dst(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the DST offset of a tzinfo `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_tz_utcoffset(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyObject *__pyx_v_err = NULL;
  PyDateTime_Delta *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[5];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_utcoffset", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5021
 *     >>> tz.utcoffset(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "utils.pxd":5022
 *     """
 *     if tz is None:
 *         return None             # <<<<<<<<<<<<<<
 *     try:
 *         return tz.utcoffset(dt)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((PyDateTime_Delta *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "utils.pxd":5021
 *     >>> tz.utcoffset(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "utils.pxd":5024
 *         return None
 *     try:
 *         return tz.utcoffset(dt)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         if not is_tz(tz):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = __pyx_v_tz;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_dt)};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_utcoffset, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5024, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(5, 5024, __pyx_L4_error)
      __pyx_r = ((PyDateTime_Delta *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8_try_return;

      /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "utils.pxd":5025
 *     try:
 *         return tz.utcoffset(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.utils.tz_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_9) < 0) __PYX_ERR(5, 5025, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_err = __pyx_t_6;
      /*try:*/ {

        /* "utils.pxd":5026
 *         return tz.utcoffset(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_tz(__pyx_v_tz); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5026, __pyx_L15_error)
        __pyx_t_10 = (!__pyx_t_1);
        if (unlikely(__pyx_t_10)) {

          /* "utils.pxd":5027
 *     except Exception as err:
 *         if not is_tz(tz):
 *             raise TypeError(             # <<<<<<<<<<<<<<
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
*/
          __pyx_t_12 = NULL;

          /* "utils.pxd":5029
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))             # <<<<<<<<<<<<<<
 *             ) from err
 *         raise err
*/
          __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5029, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5029, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_datetime;
          __pyx_t_15[1] = __pyx_t_13;
          __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
          __pyx_t_15[3] = __pyx_t_14;
          __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__2;

          /* "utils.pxd":5028
 *         if not is_tz(tz):
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "             # <<<<<<<<<<<<<<
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
*/
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 55 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
          if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5028, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
            __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5027, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_11);
          }

          /* "utils.pxd":5030
 *                 "Expects an instance of 'datetime.tzinfo', "
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err             # <<<<<<<<<<<<<<
 *         raise err
 * 
*/
          __Pyx_Raise(__pyx_t_11, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(5, 5027, __pyx_L15_error)

          /* "utils.pxd":5026
 *         return tz.utcoffset(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "utils.pxd":5031
 *                 "instead got '%s' %s." % (tz, type(tz))
 *             ) from err
 *         raise err             # <<<<<<<<<<<<<<
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:
*/
        __Pyx_Raise(__pyx_v_err, 0, 0, 0);
        __PYX_ERR(5, 5031, __pyx_L15_error)
      }

      /* "utils.pxd":5025
 *     try:
 *         return tz.utcoffset(dt)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         if not is_tz(tz):
 *             raise TypeError(
*/
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L6_except_error;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "utils.pxd":5023
 *     if tz is None:
 *         return None
 *     try:             # <<<<<<<<<<<<<<
 *         return tz.utcoffset(dt)
 *     except Exception as err:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "utils.pxd":5010
 *         raise err
 * 
 * cdef inline datetime.timedelta tz_utcoffset(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset from a tzinfo `<'timedelta/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_utcoffset_sec(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyDateTime_Delta *__pyx_v_off = 0;
  int __pyx_v_sec;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_2;
  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[7];
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_utcoffset_sec", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5042
 *         or sentinel (-100,000) when the offset is unavailable.
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)             # <<<<<<<<<<<<<<
 *     if off is None:
 *         return NULL_TZOFFSET
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dt = __pyx_v_dt;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5043
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return NULL_TZOFFSET
 * 
*/
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {

    /* "utils.pxd":5044
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:
 *         return NULL_TZOFFSET             # <<<<<<<<<<<<<<
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
*/
    __pyx_r = __pyx_v_7cytimes_5utils_NULL_TZOFFSET;
    goto __pyx_L0;

    /* "utils.pxd":5043
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return NULL_TZOFFSET
 * 
*/
  }

  /* "utils.pxd":5046
 *         return NULL_TZOFFSET
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)             # <<<<<<<<<<<<<<
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
*/
  __pyx_v_sec = ((__pyx_f_7cpython_8datetime_9timedelta_3day_day(__pyx_v_off) * ((int)__pyx_v_7cytimes_5utils_SS_DAY)) + __pyx_f_7cpython_8datetime_9timedelta_6second_second(__pyx_v_off));

  /* "utils.pxd":5047
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
*/
  __pyx_t_3 = (-86400L < __pyx_v_sec);
  if (__pyx_t_3) {
    __pyx_t_3 = (__pyx_v_sec < 0x15180);
  }
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "utils.pxd":5048
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
*/
    __pyx_t_5 = NULL;

    /* "utils.pxd":5050
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))             # <<<<<<<<<<<<<<
 *         )
 *     return sec
*/
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 5050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Timezone_offset;
    __pyx_t_9[1] = __pyx_t_6;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_seconds_from;
    __pyx_t_9[3] = __pyx_t_7;
    __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_9[5] = __pyx_t_8;
    __pyx_t_9[6] = __pyx_mstate_global->__pyx_kp_u_out_of_range_Must_be_strictly_b_2;

    /* "utils.pxd":5049
 *     if not -86400 < sec < 86400:
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "             # <<<<<<<<<<<<<<
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
 *         )
*/
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 7, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 69, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 5049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5048, __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(5, 5048, __pyx_L1_error)

    /* "utils.pxd":5047
 * 
 *     cdef int sec = (off.day * (<int> SS_DAY) + off.second)
 *     if not -86400 < sec < 86400:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Timezone offset %d seconds from (%s, %s) out of range. "
*/
  }

  /* "utils.pxd":5052
 *             "Must be strictly between [-86400..86400] (exclusive)." % (sec, tz, type(tz))
 *         )
 *     return sec             # <<<<<<<<<<<<<<
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):
*/
  __pyx_r = __pyx_v_sec;
  goto __pyx_L0;

  /* "utils.pxd":5033
 *         raise err
 * 
 * cdef inline int tz_utcoffset_sec(object tz, datetime.datetime dt=None) except -200_000:             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in total seconds from a tzinfo `<'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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils.tz_utcoffset_sec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -200000;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_utcformat(PyObject *__pyx_v_tz, struct __pyx_opt_args_7cytimes_5utils_tz_utcformat *__pyx_optional_args) {
  PyDateTime_DateTime *__pyx_v_dt = ((PyDateTime_DateTime *)Py_None);
  PyDateTime_Delta *__pyx_v_off = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __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("tz_utcformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dt = __pyx_optional_args->dt;
    }
  }

  /* "utils.pxd":5063
 *         or `None` when the offset is unavailable.
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)             # <<<<<<<<<<<<<<
 *     return None if off is None else td_utcformat(off)
 * 
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.dt = __pyx_v_dt;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_off = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5064
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     return None if off is None else td_utcformat(off)             # <<<<<<<<<<<<<<
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = (((PyObject *)__pyx_v_off) == Py_None);
  if (__pyx_t_3) {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  } else {
    __pyx_t_4 = __pyx_f_7cytimes_5utils_td_utcformat(__pyx_v_off); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(5, 5064, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5054
 *     return sec
 * 
 * cdef inline str tz_utcformat(object tz, datetime.datetime dt=None):             # <<<<<<<<<<<<<<
 *     """Return the UTC offset in ISO format string (HHMM) from a tzinfo `<'str/None'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils.tz_utcformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_off);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5067
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
 * cdef inline str nptime_unit_int2str(int unit):             # <<<<<<<<<<<<<<
 *     """Map numpy time unit to its corresponding string form `<'str'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2str(int __pyx_v_unit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_int2str", 0);

  /* "utils.pxd":5075
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5076
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ns);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ns;
    goto __pyx_L0;

    /* "utils.pxd":5075
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  }

  /* "utils.pxd":5077
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5078
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_us);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_us;
    goto __pyx_L0;

    /* "utils.pxd":5077
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  }

  /* "utils.pxd":5079
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5080
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ms);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ms;
    goto __pyx_L0;

    /* "utils.pxd":5079
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return "us"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  }

  /* "utils.pxd":5081
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5082
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_s);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_s;
    goto __pyx_L0;

    /* "utils.pxd":5081
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return "ms"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  }

  /* "utils.pxd":5083
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5084
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_m);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_m;
    goto __pyx_L0;

    /* "utils.pxd":5083
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return "s"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  }

  /* "utils.pxd":5085
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5086
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return "D"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_h);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_h;
    goto __pyx_L0;

    /* "utils.pxd":5085
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return "m"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  }

  /* "utils.pxd":5087
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return "D"
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5088
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return "D"             # <<<<<<<<<<<<<<
 * 
 *     # Uncommon units
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_D);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_D;
    goto __pyx_L0;

    /* "utils.pxd":5087
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return "D"
 * 
*/
  }

  /* "utils.pxd":5091
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5092
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_Y);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_Y;
    goto __pyx_L0;

    /* "utils.pxd":5091
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  }

  /* "utils.pxd":5093
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5094
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_M);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_M;
    goto __pyx_L0;

    /* "utils.pxd":5093
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  }

  /* "utils.pxd":5095
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5096
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_W);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_W;
    goto __pyx_L0;

    /* "utils.pxd":5095
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return "M"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  }

  /* "utils.pxd":5097
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ps);
  if (__pyx_t_1) {

    /* "utils.pxd":5098
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ps);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_ps;
    goto __pyx_L0;

    /* "utils.pxd":5097
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return "W"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  }

  /* "utils.pxd":5099
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_fs);
  if (__pyx_t_1) {

    /* "utils.pxd":5100
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return "as"
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_fs);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_fs;
    goto __pyx_L0;

    /* "utils.pxd":5099
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return "ps"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  }

  /* "utils.pxd":5101
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return "as"
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_as);
  if (__pyx_t_1) {

    /* "utils.pxd":5102
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return "as"             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_as);
    __pyx_r = __pyx_mstate_global->__pyx_n_u_as;
    goto __pyx_L0;

    /* "utils.pxd":5101
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return "as"
 * 
*/
  }

  /* "utils.pxd":5105
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_int_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5105, __pyx_L1_error)

  /* "utils.pxd":5067
 * 
 * # NumPy: time unit -------------------------------------------------------------------------------------
 * cdef inline str nptime_unit_int2str(int unit):             # <<<<<<<<<<<<<<
 *     """Map numpy time unit to its corresponding string form `<'str'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_int2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5107
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit to its corresponding datetime dtype `<'np.dtype'>`.
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_int2dt64(int __pyx_v_unit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_int2dt64", 0);

  /* "utils.pxd":5115
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5116
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
    goto __pyx_L0;

    /* "utils.pxd":5115
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  }

  /* "utils.pxd":5117
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5118
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
    goto __pyx_L0;

    /* "utils.pxd":5117
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return DT64_DTYPE_NS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
  }

  /* "utils.pxd":5119
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5120
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MS;
    goto __pyx_L0;

    /* "utils.pxd":5119
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         return DT64_DTYPE_US
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
  }

  /* "utils.pxd":5121
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5122
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_SS;
    goto __pyx_L0;

    /* "utils.pxd":5121
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         return DT64_DTYPE_MS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
  }

  /* "utils.pxd":5123
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5124
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
    goto __pyx_L0;

    /* "utils.pxd":5123
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         return DT64_DTYPE_SS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
  }

  /* "utils.pxd":5125
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5126
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return DT64_DTYPE_DD
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_HH;
    goto __pyx_L0;

    /* "utils.pxd":5125
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         return DT64_DTYPE_MI
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
*/
  }

  /* "utils.pxd":5127
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_DD
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5128
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         return DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 * 
 *     # Uncommon units
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_DD;
    goto __pyx_L0;

    /* "utils.pxd":5127
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return DT64_DTYPE_HH
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_DD
 * 
*/
  }

  /* "utils.pxd":5131
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5132
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_YY;
    goto __pyx_L0;

    /* "utils.pxd":5131
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  }

  /* "utils.pxd":5133
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5134
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MM;
    goto __pyx_L0;

    /* "utils.pxd":5133
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         return DT64_DTYPE_YY
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
*/
  }

  /* "utils.pxd":5135
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5136
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_WW;
    goto __pyx_L0;

    /* "utils.pxd":5135
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         return DT64_DTYPE_MM
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
*/
  }

  /* "utils.pxd":5137
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ps);
  if (__pyx_t_1) {

    /* "utils.pxd":5138
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_PS;
    goto __pyx_L0;

    /* "utils.pxd":5137
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         return DT64_DTYPE_WW
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
*/
  }

  /* "utils.pxd":5139
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_fs);
  if (__pyx_t_1) {

    /* "utils.pxd":5140
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return DT64_DTYPE_AS
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_FS;
    goto __pyx_L0;

    /* "utils.pxd":5139
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ps:
 *         return DT64_DTYPE_PS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
*/
  }

  /* "utils.pxd":5141
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_AS
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_as);
  if (__pyx_t_1) {

    /* "utils.pxd":5142
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:
 *         return DT64_DTYPE_AS             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_AS;
    goto __pyx_L0;

    /* "utils.pxd":5141
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return DT64_DTYPE_FS
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_AS
 * 
*/
  }

  /* "utils.pxd":5145
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_int_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5145, __pyx_L1_error)

  /* "utils.pxd":5107
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline object nptime_unit_int2dt64(int unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit to its corresponding datetime dtype `<'np.dtype'>`.
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_int2dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5147
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     NPY_DATETIMEUNIT enum value `<'int'>`.
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_nptime_unit_str2int(PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  int __pyx_r;
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "utils.pxd":5155
 *     :returns `<'int'>`: The corresponding NPY_DATETIMEUNIT enum value.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":5156
 *     """
 *     if unit is None:
 *         _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5156, __pyx_L1_error)

    /* "utils.pxd":5155
 *     :returns `<'int'>`: The corresponding NPY_DATETIMEUNIT enum value.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "utils.pxd":5158
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
 *         Py_ssize_t size = str_len(unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "utils.pxd":5162
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":5164
 *     if size == 1:
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5164, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5165
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":5166
 *         ch = str_read(unit, 0)
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
*/
      __pyx_r = NPY_FR_s;
      goto __pyx_L0;

      /* "utils.pxd":5165
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5167
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5168
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
*/
      __pyx_r = NPY_FR_m;
      goto __pyx_L0;

      /* "utils.pxd":5167
 *         if ch == "s":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
*/
    }

    /* "utils.pxd":5169
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":5170
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
*/
      __pyx_r = NPY_FR_h;
      goto __pyx_L0;

      /* "utils.pxd":5169
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_m
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
*/
    }

    /* "utils.pxd":5171
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":5172
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "Y":
*/
      __pyx_r = NPY_FR_D;
      goto __pyx_L0;

      /* "utils.pxd":5171
 *         if ch == "h":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_h
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5174
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":5175
 *         # Uncommon units
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
*/
      __pyx_r = NPY_FR_Y;
      goto __pyx_L0;

      /* "utils.pxd":5174
 *             return np.NPY_DATETIMEUNIT.NPY_FR_D
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
*/
    }

    /* "utils.pxd":5176
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":5177
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
*/
      __pyx_r = NPY_FR_M;
      goto __pyx_L0;

      /* "utils.pxd":5176
 *         if ch == "Y":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_Y
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
*/
    }

    /* "utils.pxd":5178
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
 *         # if ch == "B":
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":5179
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W             # <<<<<<<<<<<<<<
 *         # if ch == "B":
 *         #     return np.NPY_DATETIMEUNIT.NPY_FR_B
*/
      __pyx_r = NPY_FR_W;
      goto __pyx_L0;

      /* "utils.pxd":5178
 *         if ch == "M":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_M
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_W
 *         # if ch == "B":
*/
    }

    /* "utils.pxd":5162
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5184
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_3 = (__pyx_v_size == 2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5184, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5186
 *     elif size == 2 and str_read(unit, 1) == "s":
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5186, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5187
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":5188
 *         ch = str_read(unit, 0)
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
*/
      __pyx_r = NPY_FR_ns;
      goto __pyx_L0;

      /* "utils.pxd":5187
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
*/
    }

    /* "utils.pxd":5189
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":5190
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
*/
      __pyx_r = NPY_FR_us;
      goto __pyx_L0;

      /* "utils.pxd":5189
 *         if ch == "n":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5191
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5192
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "p":
*/
      __pyx_r = NPY_FR_ms;
      goto __pyx_L0;

      /* "utils.pxd":5191
 *         if ch == "u":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_us
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5194
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x70);
    if (__pyx_t_1) {

      /* "utils.pxd":5195
 *         # Uncommon units
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps             # <<<<<<<<<<<<<<
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
*/
      __pyx_r = NPY_FR_ps;
      goto __pyx_L0;

      /* "utils.pxd":5194
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ms
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
*/
    }

    /* "utils.pxd":5196
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x66);
    if (__pyx_t_1) {

      /* "utils.pxd":5197
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs             # <<<<<<<<<<<<<<
 *         if ch == "a":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
*/
      __pyx_r = NPY_FR_fs;
      goto __pyx_L0;

      /* "utils.pxd":5196
 *         if ch == "p":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ps
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
*/
    }

    /* "utils.pxd":5198
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 97);
    if (__pyx_t_1) {

      /* "utils.pxd":5199
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __pyx_r = NPY_FR_as;
      goto __pyx_L0;

      /* "utils.pxd":5198
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
    }

    /* "utils.pxd":5184
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5202
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m
 * 
*/
  __pyx_t_3 = (__pyx_v_size == 3);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 5202, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5203
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_r = NPY_FR_m;
    goto __pyx_L0;

    /* "utils.pxd":5202
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":5206
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5206, __pyx_L1_error)

  /* "utils.pxd":5147
 *     _raise_invalid_nptime_int_unit_error(unit)
 * 
 * cdef inline int nptime_unit_str2int(str unit) except -1:             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     NPY_DATETIMEUNIT enum value `<'int'>`.
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_str2int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5208
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     datetime dtype `<'np.dtype'>`.
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_nptime_unit_str2dt64(PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("nptime_unit_str2dt64", 0);

  /* "utils.pxd":5217
 *         np.dtype('datetime64[ns]'), np.dtype('datetime64[Y]'), etc.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":5218
 *     """
 *     if unit is None:
 *         _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5218, __pyx_L1_error)

    /* "utils.pxd":5217
 *         np.dtype('datetime64[ns]'), np.dtype('datetime64[Y]'), etc.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "utils.pxd":5220
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
 *         Py_ssize_t size = str_len(unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "utils.pxd":5224
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":5226
 *     if size == 1:
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return DT64_DTYPE_SS
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5226, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5227
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_SS
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":5228
 *         ch = str_read(unit, 0)
 *         if ch == "s":
 *             return DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return DT64_DTYPE_MI
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_SS;
      goto __pyx_L0;

      /* "utils.pxd":5227
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_SS
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5229
 *         if ch == "s":
 *             return DT64_DTYPE_SS
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MI
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5230
 *             return DT64_DTYPE_SS
 *         if ch == "m":
 *             return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return DT64_DTYPE_HH
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
      goto __pyx_L0;

      /* "utils.pxd":5229
 *         if ch == "s":
 *             return DT64_DTYPE_SS
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MI
 *         if ch == "h":
*/
    }

    /* "utils.pxd":5231
 *         if ch == "m":
 *             return DT64_DTYPE_MI
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_HH
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":5232
 *             return DT64_DTYPE_MI
 *         if ch == "h":
 *             return DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return DT64_DTYPE_DD
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_HH;
      goto __pyx_L0;

      /* "utils.pxd":5231
 *         if ch == "m":
 *             return DT64_DTYPE_MI
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_HH
 *         if ch == "D":
*/
    }

    /* "utils.pxd":5233
 *         if ch == "h":
 *             return DT64_DTYPE_HH
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_DD
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":5234
 *             return DT64_DTYPE_HH
 *         if ch == "D":
 *             return DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "Y":
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_DD;
      goto __pyx_L0;

      /* "utils.pxd":5233
 *         if ch == "h":
 *             return DT64_DTYPE_HH
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_DD
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5236
 *             return DT64_DTYPE_DD
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_YY
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":5237
 *         # Uncommon units
 *         if ch == "Y":
 *             return DT64_DTYPE_YY             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return DT64_DTYPE_MM
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_YY;
      goto __pyx_L0;

      /* "utils.pxd":5236
 *             return DT64_DTYPE_DD
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_YY
 *         if ch == "M":
*/
    }

    /* "utils.pxd":5238
 *         if ch == "Y":
 *             return DT64_DTYPE_YY
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MM
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":5239
 *             return DT64_DTYPE_YY
 *         if ch == "M":
 *             return DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return DT64_DTYPE_WW
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MM;
      goto __pyx_L0;

      /* "utils.pxd":5238
 *         if ch == "Y":
 *             return DT64_DTYPE_YY
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MM
 *         if ch == "W":
*/
    }

    /* "utils.pxd":5240
 *         if ch == "M":
 *             return DT64_DTYPE_MM
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_WW
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":5241
 *             return DT64_DTYPE_MM
 *         if ch == "W":
 *             return DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_WW;
      goto __pyx_L0;

      /* "utils.pxd":5240
 *         if ch == "M":
 *             return DT64_DTYPE_MM
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_WW
 * 
*/
    }

    /* "utils.pxd":5224
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'Y', 'M', 'W', 'B'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5244
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
  __pyx_t_3 = (__pyx_v_size == 2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5244, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5246
 *     elif size == 2 and str_read(unit, 1) == "s":
 *         # Common units
 *         ch = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return DT64_DTYPE_NS
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 5246, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":5247
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_NS
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":5248
 *         ch = str_read(unit, 0)
 *         if ch == "n":
 *             return DT64_DTYPE_NS             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return DT64_DTYPE_US
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
      goto __pyx_L0;

      /* "utils.pxd":5247
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_NS
 *         if ch == "u":
*/
    }

    /* "utils.pxd":5249
 *         if ch == "n":
 *             return DT64_DTYPE_NS
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_US
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":5250
 *             return DT64_DTYPE_NS
 *         if ch == "u":
 *             return DT64_DTYPE_US             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return DT64_DTYPE_MS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
      goto __pyx_L0;

      /* "utils.pxd":5249
 *         if ch == "n":
 *             return DT64_DTYPE_NS
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_US
 *         if ch == "m":
*/
    }

    /* "utils.pxd":5251
 *         if ch == "u":
 *             return DT64_DTYPE_US
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MS
 *         # Uncommon units
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":5252
 *             return DT64_DTYPE_US
 *         if ch == "m":
 *             return DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 *         # Uncommon units
 *         if ch == "p":
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MS;
      goto __pyx_L0;

      /* "utils.pxd":5251
 *         if ch == "u":
 *             return DT64_DTYPE_US
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MS
 *         # Uncommon units
*/
    }

    /* "utils.pxd":5254
 *             return DT64_DTYPE_MS
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_PS
 *         if ch == "f":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x70);
    if (__pyx_t_1) {

      /* "utils.pxd":5255
 *         # Uncommon units
 *         if ch == "p":
 *             return DT64_DTYPE_PS             # <<<<<<<<<<<<<<
 *         if ch == "f":
 *             return DT64_DTYPE_FS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_PS;
      goto __pyx_L0;

      /* "utils.pxd":5254
 *             return DT64_DTYPE_MS
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_PS
 *         if ch == "f":
*/
    }

    /* "utils.pxd":5256
 *         if ch == "p":
 *             return DT64_DTYPE_PS
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_FS
 *         if ch == "a":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x66);
    if (__pyx_t_1) {

      /* "utils.pxd":5257
 *             return DT64_DTYPE_PS
 *         if ch == "f":
 *             return DT64_DTYPE_FS             # <<<<<<<<<<<<<<
 *         if ch == "a":
 *             return DT64_DTYPE_AS
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_FS;
      goto __pyx_L0;

      /* "utils.pxd":5256
 *         if ch == "p":
 *             return DT64_DTYPE_PS
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_FS
 *         if ch == "a":
*/
    }

    /* "utils.pxd":5258
 *         if ch == "f":
 *             return DT64_DTYPE_FS
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_AS
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 97);
    if (__pyx_t_1) {

      /* "utils.pxd":5259
 *             return DT64_DTYPE_FS
 *         if ch == "a":
 *             return DT64_DTYPE_AS             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS);
      __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_AS;
      goto __pyx_L0;

      /* "utils.pxd":5258
 *         if ch == "f":
 *             return DT64_DTYPE_FS
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_AS
 * 
*/
    }

    /* "utils.pxd":5244
 * 
 *     # Unit: 'ns', 'us', 'ms', 'ps', 'fs', 'as'
 *     elif size == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         # Common units
 *         ch = str_read(unit, 0)
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5262
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 * 
*/
  __pyx_t_3 = (__pyx_v_size == 3);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L20_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(5, 5262, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":5263
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":
 *         return DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __pyx_r = __pyx_v_7cytimes_5utils_DT64_DTYPE_MI;
    goto __pyx_L0;

    /* "utils.pxd":5262
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":5266
 * 
 *     # Unsupported unit
 *     _raise_invalid_nptime_str_unit_error(unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5266, __pyx_L1_error)

  /* "utils.pxd":5208
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline object nptime_unit_str2dt64(str unit):             # <<<<<<<<<<<<<<
 *     """Maps numpy time unit string form to its corresponding
 *     datetime dtype `<'np.dtype'>`.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.nptime_unit_str2dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5268
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Get the time unit (NPY_DATETIMEUNIT enum) of a datetime-like array `<'int'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_get_arr_nptime_unit(PyArrayObject *__pyx_v_arr) {
  int __pyx_v_dtype;
  npy_int64 __pyx_v_zero;
  PyObject *__pyx_v_scalar = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_arr_nptime_unit", 0);

  /* "utils.pxd":5276
 *     """
 *     cdef:
 *         int dtype = np.PyArray_TYPE(arr)             # <<<<<<<<<<<<<<
 *         np.npy_int64 zero = 0
 *         object scalar
*/
  __pyx_v_dtype = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5277
 *     cdef:
 *         int dtype = np.PyArray_TYPE(arr)
 *         np.npy_int64 zero = 0             # <<<<<<<<<<<<<<
 *         object scalar
 * 
*/
  __pyx_v_zero = 0;

  /* "utils.pxd":5281
 * 
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
*/
  __pyx_t_1 = (__pyx_v_dtype == NPY_DATETIME);
  if (__pyx_t_1) {

    /* "utils.pxd":5282
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:
 *         scalar = np.PyArray_ToScalar(&zero, arr)             # <<<<<<<<<<<<<<
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
 * 
*/
    __pyx_t_2 = PyArray_ToScalar((&__pyx_v_zero), __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_scalar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "utils.pxd":5283
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base             # <<<<<<<<<<<<<<
 * 
 *     # timedelta-array
*/
    __pyx_r = ((int)((PyDatetimeScalarObject *)__pyx_v_scalar)->obmeta.base);
    goto __pyx_L0;

    /* "utils.pxd":5281
 * 
 *     # datetime-array
 *     if dtype == np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyDatetimeScalarObject*>scalar).obmeta.base
*/
  }

  /* "utils.pxd":5286
 * 
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
*/
  __pyx_t_1 = (__pyx_v_dtype == NPY_TIMEDELTA);
  if (__pyx_t_1) {

    /* "utils.pxd":5287
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:
 *         scalar = np.PyArray_ToScalar(&zero, arr)             # <<<<<<<<<<<<<<
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
 * 
*/
    __pyx_t_2 = PyArray_ToScalar((&__pyx_v_zero), __pyx_v_arr); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_scalar = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "utils.pxd":5288
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported
*/
    __pyx_r = ((int)((PyTimedeltaScalarObject *)__pyx_v_scalar)->obmeta.base);
    goto __pyx_L0;

    /* "utils.pxd":5286
 * 
 *     # timedelta-array
 *     if dtype == np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *         scalar = np.PyArray_ToScalar(&zero, arr)
 *         return <int> (<np.PyTimedeltaScalarObject*>scalar).obmeta.base
*/
  }

  /* "utils.pxd":5291
 * 
 *     # Unsupported
 *     _raise_invalid_nptime_dtype_error(arr)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5291, __pyx_L1_error)

  /* "utils.pxd":5268
 *     _raise_invalid_nptime_str_unit_error(unit)
 * 
 * cdef inline int get_arr_nptime_unit(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Get the time unit (NPY_DATETIMEUNIT enum) of a datetime-like array `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.get_arr_nptime_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_scalar);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5294
 * 
 * # . errors
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_int_unit_error(int __pyx_v_unit) {
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14[23];
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_int_unit_error", 0);

  /* "utils.pxd":5296
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Unsupported numpy time unit (NPY_DATETIMEUNIT enum) '%d'.\n"
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5300
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
 *             unit,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,
*/
  __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_unit, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "utils.pxd":5301
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
 *             unit,
 *             DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,
*/
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "utils.pxd":5302
 *             unit,
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,
*/
  __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "utils.pxd":5303
 *             DT_NPY_UNIT_YY,
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,
*/
  __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "utils.pxd":5304
 *             DT_NPY_UNIT_MM,
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,
*/
  __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "utils.pxd":5305
 *             DT_NPY_UNIT_WW,
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,
*/
  __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 5305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "utils.pxd":5306
 *             DT_NPY_UNIT_DD,
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,
*/
  __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 5306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "utils.pxd":5307
 *             DT_NPY_UNIT_HH,
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,
*/
  __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 5307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "utils.pxd":5308
 *             DT_NPY_UNIT_MI,
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_US,
 *             DT_NPY_UNIT_NS,
*/
  __pyx_t_11 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 5308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "utils.pxd":5309
 *             DT_NPY_UNIT_SS,
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *             DT_NPY_UNIT_NS,
 *         )
*/
  __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 5309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "utils.pxd":5310
 *             DT_NPY_UNIT_MS,
 *             DT_NPY_UNIT_US,
 *             DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *         )
 *     )
*/
  __pyx_t_13 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_numpy_time_unit_NPY;
  __pyx_t_14[1] = __pyx_t_3;
  __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u_Accepts;
  __pyx_t_14[3] = __pyx_t_4;
  __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_Y_2;
  __pyx_t_14[5] = __pyx_t_5;
  __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_M_2;
  __pyx_t_14[7] = __pyx_t_6;
  __pyx_t_14[8] = __pyx_mstate_global->__pyx_kp_u_W_2;
  __pyx_t_14[9] = __pyx_t_7;
  __pyx_t_14[10] = __pyx_mstate_global->__pyx_kp_u_D_2;
  __pyx_t_14[11] = __pyx_t_8;
  __pyx_t_14[12] = __pyx_mstate_global->__pyx_kp_u_h_2;
  __pyx_t_14[13] = __pyx_t_9;
  __pyx_t_14[14] = __pyx_mstate_global->__pyx_kp_u_m_2;
  __pyx_t_14[15] = __pyx_t_10;
  __pyx_t_14[16] = __pyx_mstate_global->__pyx_kp_u_s_2;
  __pyx_t_14[17] = __pyx_t_11;
  __pyx_t_14[18] = __pyx_mstate_global->__pyx_kp_u_ms_2;
  __pyx_t_14[19] = __pyx_t_12;
  __pyx_t_14[20] = __pyx_mstate_global->__pyx_kp_u_us_2;
  __pyx_t_14[21] = __pyx_t_13;
  __pyx_t_14[22] = __pyx_mstate_global->__pyx_kp_u_ns_2;

  /* "utils.pxd":5297
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
 *         "Unsupported numpy time unit (NPY_DATETIMEUNIT enum) '%d'.\n"             # <<<<<<<<<<<<<<
 *         "Accepts: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *         "%d's', %d'ms', %d'us', %d'ns'" % (
*/
  __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 23, 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 7 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 5, 65535);
  if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 5297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __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;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_15};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5296, __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(5, 5296, __pyx_L1_error)

  /* "utils.pxd":5294
 * 
 * # . errors
 * cdef inline bint _raise_invalid_nptime_int_unit_error(int unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit value."""
 *     raise ValueError(
*/

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils._raise_invalid_nptime_int_unit_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5314
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(PyObject *__pyx_v_unit) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4[3];
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_str_unit_error", 0);

  /* "utils.pxd":5316
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Unsupported time unit %r.\n"
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5318
 *     raise ValueError(
 *         "Unsupported time unit %r.\n"
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_unit), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_time_unit;
  __pyx_t_4[1] = __pyx_t_3;
  __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_Accepts_Y_M_W_D_h_m_s_ms_us_ns;

  /* "utils.pxd":5317
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
 *         "Unsupported time unit %r.\n"             # <<<<<<<<<<<<<<
 *         "Accepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'" % (unit,)
 *     )
*/
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 62, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
  if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5316, __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(5, 5316, __pyx_L1_error)

  /* "utils.pxd":5314
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_str_unit_error(object unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an invalid numpy time unit string form."""
 *     raise ValueError(
*/

  /* 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("cytimes.utils._raise_invalid_nptime_str_unit_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5321
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_invalid_nptime_dtype_error(PyArrayObject *__pyx_v_arr) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_invalid_nptime_dtype_error", 0);

  /* "utils.pxd":5323
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(             # <<<<<<<<<<<<<<
 *         "Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', "
 *         "instead got 'ndarray[%s]'" % arr.dtype
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":5325
 *     raise TypeError(
 *         "Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', "
 *         "instead got 'ndarray[%s]'" % arr.dtype             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_ndarray_datetime64_or_nd, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5323, __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(5, 5323, __pyx_L1_error)

  /* "utils.pxd":5321
 *     )
 * 
 * cdef inline bint _raise_invalid_nptime_dtype_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for an array that is not dtype `datetime64[*]` or `timedelta64[*]`."""
 *     raise TypeError(
*/

  /* 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("cytimes.utils._raise_invalid_nptime_dtype_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5330
 * # NumPy: datetime64 ------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.datetime64` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5339
 *     >>> isinstance(obj, np.datetime64)
 *     """
 *     return np.is_datetime64_object(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_dt64(object obj) except -1:
*/
  __pyx_r = __pyx_f_5numpy_is_datetime64_object(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5330
 * # NumPy: datetime64 ------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.datetime64` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5341
 *     return np.is_datetime64_object(obj)
 * 
 * cdef inline bint assure_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __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[5];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_dt64", 0);

  /* "utils.pxd":5343
 * cdef inline bint assure_dt64(object obj) except -1:
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
*/
  __pyx_t_1 = (!__pyx_f_5numpy_is_datetime64_object(__pyx_v_obj));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5344
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.datetime64', "
 *             "instead got '%s' %s." % (obj, type(obj))
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":5346
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
 *             "instead got '%s' %s." % (obj, type(obj))             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_obj))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_dateti;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_6[3] = __pyx_t_5;
    __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":5345
 *     if not np.is_datetime64_object(obj):
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 53 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5344, __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(5, 5344, __pyx_L1_error)

    /* "utils.pxd":5343
 * cdef inline bint assure_dt64(object obj) except -1:
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.datetime64', "
*/
  }

  /* "utils.pxd":5348
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5341
 *     return np.is_datetime64_object(obj)
 * 
 * cdef inline bint assure_dt64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.datetime64."""
 *     if not np.is_datetime64_object(obj):
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.assure_dt64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_dt64_as_int64_us(PyObject *__pyx_v_dt64, struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  NPY_DATETIMEUNIT __pyx_v_unit;
  npy_int64 __pyx_v_value;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  npy_int64 __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5362
 *     """
 *     # Get unit & value
 *     assure_dt64(dt64)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_dt64(__pyx_v_dt64); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5362, __pyx_L1_error)

  /* "utils.pxd":5364
 *     assure_dt64(dt64)
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 value = np.get_datetime64_value(dt64)
 *         np.npy_int64 q, r
*/
  __pyx_v_unit = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_dt64);

  /* "utils.pxd":5365
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(dt64)
 *         np.npy_int64 value = np.get_datetime64_value(dt64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 q, r
 * 
*/
  __pyx_v_value = __pyx_f_5numpy_get_datetime64_value(__pyx_v_dt64);

  /* "utils.pxd":5369
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5371
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x3E8);
    __pyx_v_r = (__pyx_v_value % 0x3E8);

    /* "utils.pxd":5372
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5373
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5372
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5374
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5369
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  }

  /* "utils.pxd":5375
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5376
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
*/
    __pyx_r = (__pyx_v_value + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5375
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5377
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5378
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5377
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":5379
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5380
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5379
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":5381
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5382
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MINUTE) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5381
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":5383
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5384
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_HOUR) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5383
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":5385
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5386
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5385
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":5387
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5388
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
*/
    __pyx_r = (((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) * 7) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5387
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":5389
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5390
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
*/
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(__pyx_v_value, &__pyx_t_3); 
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5389
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":5391
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5392
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(__pyx_v_value, &__pyx_t_4); 
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5391
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64_M_as_int64_D(value, US_DAY, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64_Y_as_int64_D(value, US_DAY, offset)
 * 
*/
  }

  /* "utils.pxd":5395
 * 
 *     # Unsupported unit
 *     _raise_dt64_to_reso_error(dt64, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(__pyx_v_dt64, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5395, __pyx_L1_error)

  /* "utils.pxd":5351
 * 
 * # . conversion
 * cdef inline np.npy_int64 dt64_as_int64_us(object dt64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.datetime64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.dt64_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_leaps;
  npy_int64 __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
      }
    }
  }

  /* "utils.pxd":5407
 *     """
 *     # Absolute proleptic Gregorian year
 *     cdef np.npy_int64 yy = value + EPOCH_YEAR             # <<<<<<<<<<<<<<
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE
*/
  __pyx_v_yy = (__pyx_v_value + __pyx_v_7cytimes_5utils_EPOCH_YEAR);

  /* "utils.pxd":5409
 *     cdef np.npy_int64 yy = value + EPOCH_YEAR
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE             # <<<<<<<<<<<<<<
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (value * 365 + leaps) * factor + offset
*/
  __pyx_v_leaps = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_yy, 0) - __pyx_v_7cytimes_5utils_EPOCH_CBASE);

  /* "utils.pxd":5411
 *     cdef np.npy_int64 leaps = leap_years(yy, False) - EPOCH_CBASE
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (value * 365 + leaps) * factor + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:
*/
  __pyx_r = ((((__pyx_v_value * 0x16D) + __pyx_v_leaps) * __pyx_v_factor) + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":5397
 *     _raise_dt64_to_reso_error(dt64, "us")
 * 
 * cdef inline np.npy_int64 _dt64_Y_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[Y] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_yy_ep;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  npy_int64 __pyx_v_leaps;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
      }
    }
  }

  /* "utils.pxd":5425
 *     cdef np.npy_int64 yy_ep, yy, mm, leaps
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12             # <<<<<<<<<<<<<<
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12
*/
  __pyx_v_yy_ep = (__pyx_v_value / 12);
  __pyx_v_mm = (__pyx_v_value % 12);

  /* "utils.pxd":5426
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:             # <<<<<<<<<<<<<<
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
*/
  __pyx_t_1 = (__pyx_v_mm < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5427
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12             # <<<<<<<<<<<<<<
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
 *     mm += 1                     # 1-based month
*/
    __pyx_v_yy_ep = (__pyx_v_yy_ep - 1);
    __pyx_v_mm = (__pyx_v_mm + 12);

    /* "utils.pxd":5426
 *     with cython.cdivision(True):
 *         yy_ep = value / 12; mm = value % 12
 *     if mm < 0:             # <<<<<<<<<<<<<<
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
*/
  }

  /* "utils.pxd":5428
 *     if mm < 0:
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year             # <<<<<<<<<<<<<<
 *     mm += 1                     # 1-based month
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
*/
  __pyx_v_yy = (__pyx_v_yy_ep + __pyx_v_7cytimes_5utils_EPOCH_YEAR);

  /* "utils.pxd":5429
 *         yy_ep -= 1; mm += 12
 *     yy = yy_ep + EPOCH_YEAR     # absolute year
 *     mm += 1                     # 1-based month             # <<<<<<<<<<<<<<
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     leaps = leap_years(yy, False) - EPOCH_CBASE
*/
  __pyx_v_mm = (__pyx_v_mm + 1);

  /* "utils.pxd":5431
 *     mm += 1                     # 1-based month
 *     # Leap-years between 1970-01-01 and 31-Dec-(year-1) inclusive
 *     leaps = leap_years(yy, False) - EPOCH_CBASE             # <<<<<<<<<<<<<<
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
*/
  __pyx_v_leaps = (__pyx_f_7cytimes_5utils_leap_years(__pyx_v_yy, 0) - __pyx_v_7cytimes_5utils_EPOCH_CBASE);

  /* "utils.pxd":5433
 *     leaps = leap_years(yy, False) - EPOCH_CBASE
 *     # Total days since 1970-01-01 at day resolution, then scale+shift
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):
*/
  __pyx_r = (((((__pyx_v_yy_ep * 0x16D) + __pyx_v_leaps) + __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm)) * __pyx_v_factor) + __pyx_v_offset);
  goto __pyx_L0;

  /* "utils.pxd":5413
 *     return (value * 365 + leaps) * factor + offset
 * 
 * cdef inline np.npy_int64 _dt64_M_as_int64_D(np.npy_int64 value, np.npy_int64 factor=1, np.npy_int64 offset=0) noexcept nogil:             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.datetime64[M] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'int'>`.
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_DateTime *__pyx_f_7cytimes_5utils_dt64_to_dt(PyObject *__pyx_v_dt64, struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt *__pyx_optional_args) {
  PyObject *__pyx_v_tzinfo = ((PyObject *)Py_None);
  PyObject *__pyx_v_dtclass = ((PyObject *)Py_None);
  PyDateTime_DateTime *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  npy_int64 __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_dt64_as_int64_us __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64_to_dt", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dtclass = __pyx_optional_args->dtclass;
      }
    }
  }

  /* "utils.pxd":5445
 *     :returns `<'datetime.datetime'>`: The resulting datetime (or subclass if `dtclass` is specified).
 *     """
 *     return dt_fr_us(dt64_as_int64_us(dt64, 0), tzinfo, dtclass)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.offset = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt64_as_int64_us(__pyx_v_dt64, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5445, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 2;
  __pyx_t_4.tzinfo = __pyx_v_tzinfo;
  __pyx_t_4.dtclass = __pyx_v_dtclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_1, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((PyDateTime_DateTime *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5435
 *     return (yy_ep * 365 + leaps + days_bf_month(yy, mm)) * factor + offset
 * 
 * cdef inline datetime.datetime dt64_to_dt(object dt64, object tzinfo=None, object dtclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.datetime64 to datetime `<'datetime.datetime'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64_to_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5448
 * 
 * # . errors
 * cdef inline bint _raise_dt64_to_reso_error(object dt64, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime64/timedelta64.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(PyObject *__pyx_v_dt64, PyObject *__pyx_v_to_unit) {
  PyObject *__pyx_v_type_str = 0;
  int __pyx_v_dt_reso;
  PyObject *__pyx_v_dt_reso_str = 0;
  PyObject *__pyx_v_err = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24[27];
  PyObject *__pyx_t_25 = NULL;
  int __pyx_t_26;
  char const *__pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_dt64_to_reso_error", 0);

  /* "utils.pxd":5454
 *     :param to_unit `<'str'>`: The target conversion numpy unit.
 *     """
 *     cdef str type_str = type(dt64)             # <<<<<<<<<<<<<<
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
*/
  if (!(likely(PyUnicode_CheckExact(((PyObject *)Py_TYPE(__pyx_v_dt64)))) || __Pyx_RaiseUnexpectedTypeError("str", ((PyObject *)Py_TYPE(__pyx_v_dt64))))) __PYX_ERR(5, 5454, __pyx_L1_error)
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dt64)));
  __pyx_v_type_str = ((PyObject*)((PyObject *)Py_TYPE(__pyx_v_dt64)));

  /* "utils.pxd":5455
 *     """
 *     cdef str type_str = type(dt64)
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)             # <<<<<<<<<<<<<<
 *     cdef str dt_reso_str
 *     try:
*/
  __pyx_v_dt_reso = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_dt64);

  /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
  {
    __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:*/ {

      /* "utils.pxd":5458
 *     cdef str dt_reso_str
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         raise ValueError(
*/
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_dt_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5458, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_dt_reso_str = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
    }

    /* "utils.pxd":5480
 *         ) from err
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
*/
    /*else:*/ {
      __pyx_t_5 = NULL;

      /* "utils.pxd":5483
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (type_str, dt_reso_str, to_unit)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_dt_reso_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 5483, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5483, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_2;
      __pyx_t_8[1] = __pyx_v_type_str;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_from;
      __pyx_t_8[3] = __pyx_t_6;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_to_int64;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units_Y_M_W_D_h;

      /* "utils.pxd":5481
 *     else:
 *         raise ValueError(
 *             "Cannot convert %s from '%s' to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (type_str, dt_reso_str, to_unit)
*/
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_type_str) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 77, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_type_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 5481, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5480, __pyx_L5_except_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(5, 5480, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "utils.pxd":5459
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.utils._raise_dt64_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_5) < 0) __PYX_ERR(5, 5459, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "utils.pxd":5460
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
        __pyx_t_6 = NULL;

        /* "utils.pxd":5465
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
 *                 type_str,
 *                 dt_reso,             # <<<<<<<<<<<<<<
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
*/
        __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_dt_reso, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 5465, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":5466
 *                 type_str,
 *                 dt_reso,
 *                 to_unit,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
*/
        __pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 5466, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":5467
 *                 dt_reso,
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
*/
        __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 5467, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":5468
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
*/
        __pyx_t_15 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 5468, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":5469
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
*/
        __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 5469, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "utils.pxd":5470
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
*/
        __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 5470, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "utils.pxd":5471
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
*/
        __pyx_t_18 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 5471, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "utils.pxd":5472
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
*/
        __pyx_t_19 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 5472, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "utils.pxd":5473
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
*/
        __pyx_t_20 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(5, 5473, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "utils.pxd":5474
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,
*/
        __pyx_t_21 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_21)) __PYX_ERR(5, 5474, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "utils.pxd":5475
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_NS,
 *             )
*/
        __pyx_t_22 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_22)) __PYX_ERR(5, 5475, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "utils.pxd":5476
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *             )
 *         ) from err
*/
        __pyx_t_23 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(5, 5476, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_2;
        __pyx_t_24[1] = __pyx_v_type_str;
        __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u_from;
        __pyx_t_24[3] = __pyx_t_12;
        __pyx_t_24[4] = __pyx_mstate_global->__pyx_kp_u_unit_to_int64;
        __pyx_t_24[5] = __pyx_t_13;
        __pyx_t_24[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units;
        __pyx_t_24[7] = __pyx_t_14;
        __pyx_t_24[8] = __pyx_mstate_global->__pyx_kp_u_Y_2;
        __pyx_t_24[9] = __pyx_t_15;
        __pyx_t_24[10] = __pyx_mstate_global->__pyx_kp_u_M_2;
        __pyx_t_24[11] = __pyx_t_16;
        __pyx_t_24[12] = __pyx_mstate_global->__pyx_kp_u_W_2;
        __pyx_t_24[13] = __pyx_t_17;
        __pyx_t_24[14] = __pyx_mstate_global->__pyx_kp_u_D_2;
        __pyx_t_24[15] = __pyx_t_18;
        __pyx_t_24[16] = __pyx_mstate_global->__pyx_kp_u_h_2;
        __pyx_t_24[17] = __pyx_t_19;
        __pyx_t_24[18] = __pyx_mstate_global->__pyx_kp_u_m_2;
        __pyx_t_24[19] = __pyx_t_20;
        __pyx_t_24[20] = __pyx_mstate_global->__pyx_kp_u_s_2;
        __pyx_t_24[21] = __pyx_t_21;
        __pyx_t_24[22] = __pyx_mstate_global->__pyx_kp_u_ms_2;
        __pyx_t_24[23] = __pyx_t_22;
        __pyx_t_24[24] = __pyx_mstate_global->__pyx_kp_u_us_2;
        __pyx_t_24[25] = __pyx_t_23;
        __pyx_t_24[26] = __pyx_mstate_global->__pyx_kp_u_ns_2;

        /* "utils.pxd":5461
 *     except Exception as err:
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
*/
        __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 27, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_type_str) + 7 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_22) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23) + 5, 65535 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_type_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_25)) __PYX_ERR(5, 5461, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_25);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_25};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5460, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
        }

        /* "utils.pxd":5478
 *                 DT_NPY_UNIT_NS,
 *             )
 *         ) from err             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
        __Pyx_Raise(__pyx_t_7, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(5, 5460, __pyx_L14_error)
      }

      /* "utils.pxd":5459
 *     try:
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert %s from '%d' unit to int64 '%s' ticks.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
          if ( unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __Pyx_XGOTREF(__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_31);
          __Pyx_XGOTREF(__pyx_t_32);
          __Pyx_XGOTREF(__pyx_t_33);
          __pyx_t_11 = __pyx_lineno; __pyx_t_26 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_31);
          __Pyx_XGIVEREF(__pyx_t_32);
          __Pyx_XGIVEREF(__pyx_t_33);
          __Pyx_ExceptionReset(__pyx_t_31, __pyx_t_32, __pyx_t_33);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_30);
          __Pyx_ErrRestore(__pyx_t_28, __pyx_t_29, __pyx_t_30);
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_26; __pyx_filename = __pyx_t_27;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "utils.pxd":5457
 *     cdef int dt_reso = np.get_datetime64_unit(dt64)
 *     cdef str dt_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         dt_reso_str = nptime_unit_int2str(dt_reso)
 *     except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
  }

  /* "utils.pxd":5448
 * 
 * # . errors
 * cdef inline bint _raise_dt64_to_reso_error(object dt64, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime64/timedelta64.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.utils._raise_dt64_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_type_str);
  __Pyx_XDECREF(__pyx_v_dt_reso_str);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5488
 * # NumPy: timedelta64 -----------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.timedelta64` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5497
 *     >>> isinstance(obj, np.timedelta64)
 *     """
 *     return np.is_timedelta64_object(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_td64(object obj) except -1:
*/
  __pyx_r = __pyx_f_5numpy_is_timedelta64_object(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5488
 * # NumPy: timedelta64 -----------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.timedelta64` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5499
 *     return np.is_timedelta64_object(obj)
 * 
 * cdef inline bint assure_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __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[5];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_td64", 0);

  /* "utils.pxd":5501
 * cdef inline bint assure_td64(object obj) except -1:
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
*/
  __pyx_t_1 = (!__pyx_f_5numpy_is_timedelta64_object(__pyx_v_obj));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5502
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.timedelta64', "
 *             "instead got '%s' %s." % (obj, type(obj))
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":5504
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
 *             "instead got '%s' %s." % (obj, type(obj))             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_obj), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_obj))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_timede;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_6[3] = __pyx_t_5;
    __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u__2;

    /* "utils.pxd":5503
 *     if not np.is_timedelta64_object(obj):
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "             # <<<<<<<<<<<<<<
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, 54 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 5503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5502, __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(5, 5502, __pyx_L1_error)

    /* "utils.pxd":5501
 * cdef inline bint assure_td64(object obj) except -1:
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.timedelta64', "
*/
  }

  /* "utils.pxd":5506
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5499
 *     return np.is_timedelta64_object(obj)
 * 
 * cdef inline bint assure_td64(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Assure an object is an instance of np.timedelta64."""
 *     if not np.is_timedelta64_object(obj):
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.assure_td64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils_td64_as_int64_us(PyObject *__pyx_v_td64, struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  NPY_DATETIMEUNIT __pyx_v_unit;
  npy_int64 __pyx_v_value;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  int __pyx_t_1;
  npy_int64 __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5520
 *     """
 *     # Get unit & value
 *     assure_td64(td64)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_td64(__pyx_v_td64); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5520, __pyx_L1_error)

  /* "utils.pxd":5522
 *     assure_td64(td64)
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 value = np.get_timedelta64_value(td64)
 *         np.npy_int64 q, r
*/
  __pyx_v_unit = __pyx_f_5numpy_get_datetime64_unit(__pyx_v_td64);

  /* "utils.pxd":5523
 *     cdef:
 *         np.NPY_DATETIMEUNIT unit = np.get_datetime64_unit(td64)
 *         np.npy_int64 value = np.get_timedelta64_value(td64)             # <<<<<<<<<<<<<<
 *         np.npy_int64 q, r
 * 
*/
  __pyx_v_value = __pyx_f_5numpy_get_timedelta64_value(__pyx_v_td64);

  /* "utils.pxd":5527
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5529
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x3E8);
    __pyx_v_r = (__pyx_v_value % 0x3E8);

    /* "utils.pxd":5530
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5531
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5530
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5532
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5527
 * 
 *     # Conversion
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
*/
  }

  /* "utils.pxd":5533
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5534
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
*/
    __pyx_r = (__pyx_v_value + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5533
 *                 q -= 1
 *         return q + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  }

  /* "utils.pxd":5535
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5536
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5535
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return value + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  }

  /* "utils.pxd":5537
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5538
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5537
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return value * US_MILLISECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  }

  /* "utils.pxd":5539
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5540
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_MINUTE) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5539
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return value * US_SECOND + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  }

  /* "utils.pxd":5541
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5542
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_HOUR) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5541
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return value * US_MINUTE + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  }

  /* "utils.pxd":5543
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5544
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5543
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return value * US_HOUR + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  }

  /* "utils.pxd":5545
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":5546
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
*/
    __pyx_r = (((__pyx_v_value * __pyx_v_7cytimes_5utils_US_DAY) * 7) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5545
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return value * US_DAY + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  }

  /* "utils.pxd":5547
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":5548
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)             # <<<<<<<<<<<<<<
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
*/
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__td64_M_as_int64_D(__pyx_v_value, NPY_FR_us, &__pyx_t_3); if (unlikely(__pyx_t_2 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5548, __pyx_L1_error)
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5547
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return value * US_DAY * 7 + offset
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  }

  /* "utils.pxd":5549
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 * 
*/
  __pyx_t_1 = (__pyx_v_unit == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":5550
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_2 = __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(__pyx_v_value, NPY_FR_us, &__pyx_t_4); if (unlikely(__pyx_t_2 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5550, __pyx_L1_error)
    __pyx_r = __pyx_t_2;
    goto __pyx_L0;

    /* "utils.pxd":5549
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64_M_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64_Y_as_int64_D(value, np.NPY_DATETIMEUNIT.NPY_FR_us, offset)
 * 
*/
  }

  /* "utils.pxd":5553
 * 
 *     # Unsupported unit
 *     _raise_dt64_to_reso_error(td64, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64_to_reso_error(__pyx_v_td64, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5553, __pyx_L1_error)

  /* "utils.pxd":5509
 * 
 * # . conversion
 * cdef inline np.npy_int64 td64_as_int64_us(object td64, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """Convert a np.timedelta64 to int64 microsecond ('us') ticks `<'int'>`.
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cytimes.utils.td64_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_Y_as_int64_D(npy_int64 __pyx_v_value, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5571
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5572
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         value *= 146_097             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
*/
    __pyx_v_value = (__pyx_v_value * 0x23AB1);

    /* "utils.pxd":5574
 *         value *= 146_097
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x190);
    __pyx_v_r = (__pyx_v_value % 0x190);

    /* "utils.pxd":5575
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5576
 *             q = value / 400; r = value % 400
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5575
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5577
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 438_291
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5571
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5578
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5579
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 438_291             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
*/
    __pyx_v_value = (__pyx_v_value * 0x6B013);

    /* "utils.pxd":5581
 *         value *= 438_291
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 50);
    __pyx_v_r = (__pyx_v_value % 50);

    /* "utils.pxd":5582
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5583
 *             q = value / 50; r = value % 50
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5582
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5584
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 2_629_746
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5578
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5585
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 2_629_746
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5586
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 2_629_746             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
*/
    __pyx_v_value = (__pyx_v_value * 0x282072);

    /* "utils.pxd":5588
 *         value *= 2_629_746
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 5);
    __pyx_v_r = (__pyx_v_value % 5);

    /* "utils.pxd":5589
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5590
 *             q = value / 5; r = value % 5
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5589
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5591
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5585
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 2_629_746
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5592
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5593
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5592
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5594
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5595
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5594
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_YY_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":5596
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5597
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_YY_NANOSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5596
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_YY_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":5598
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_NANOSECOND + offset
 * 
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5599
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_YY_NANOSECOND + offset             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5598
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_YY_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_YY_NANOSECOND + offset
 * 
*/
  }

  /* "utils.pxd":5602
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5602, __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(5, 5602, __pyx_L1_error)

  /* "utils.pxd":5555
 *     _raise_dt64_to_reso_error(td64, "us")
 * 
 * cdef inline np.npy_int64 _td64_Y_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[Y] to int64 day ticks using an average
 *     year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

  /* 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("cytimes.utils._td64_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/

static CYTHON_INLINE npy_int64 __pyx_f_7cytimes_5utils__td64_M_as_int64_D(npy_int64 __pyx_v_value, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
    }
  }

  /* "utils.pxd":5620
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 48_699
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":5621
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         value *= 48_699             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
*/
    __pyx_v_value = (__pyx_v_value * 0xBE3B);

    /* "utils.pxd":5623
 *         value *= 48_699
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0x640);
    __pyx_v_r = (__pyx_v_value % 0x640);

    /* "utils.pxd":5624
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5625
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5624
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5626
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 146_097
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5620
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     cdef np.npy_int64 q, r
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         value *= 48_699
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5627
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":5628
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         value *= 146_097             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
*/
    __pyx_v_value = (__pyx_v_value * 0x23AB1);

    /* "utils.pxd":5630
 *         value *= 146_097
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 0xC8);
    __pyx_v_r = (__pyx_v_value % 0xC8);

    /* "utils.pxd":5631
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5632
 *             q = value / 200; r = value % 200
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5631
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5633
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 438_291
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5627
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         value *= 146_097
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5634
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":5635
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         value *= 438_291             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
*/
    __pyx_v_value = (__pyx_v_value * 0x6B013);

    /* "utils.pxd":5637
 *         value *= 438_291
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 q -= 1
*/
    __pyx_v_q = (__pyx_v_value / 10);
    __pyx_v_r = (__pyx_v_value % 10);

    /* "utils.pxd":5638
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":5639
 *             q = value / 10; r = value % 10
 *             if r < 0:
 *                 q -= 1             # <<<<<<<<<<<<<<
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":5638
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "utils.pxd":5640
 *             if r < 0:
 *                 q -= 1
 *         return q + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
*/
    __pyx_r = (__pyx_v_q + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5634
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         value *= 438_291
 *         with cython.cdivision(True):
*/
  }

  /* "utils.pxd":5641
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":5642
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_SECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5641
 *                 q -= 1
 *         return q + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":5643
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":5644
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5643
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return value * TD64_MM_SECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":5645
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":5646
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_MM_NANOSECOND + offset
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5645
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return value * TD64_MM_MILLISECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":5647
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_NANOSECOND + offset
 * 
*/
  __pyx_t_1 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":5648
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return value * TD64_MM_NANOSECOND + offset             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __pyx_r = ((__pyx_v_value * __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND) + __pyx_v_offset);
    goto __pyx_L0;

    /* "utils.pxd":5647
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return value * TD64_MM_MICROSECOND + offset
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return value * TD64_MM_NANOSECOND + offset
 * 
*/
  }

  /* "utils.pxd":5651
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5651, __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(5, 5651, __pyx_L1_error)

  /* "utils.pxd":5604
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline np.npy_int64 _td64_M_as_int64_D(np.npy_int64 value, int to_reso, np.npy_int64 offset=0):             # <<<<<<<<<<<<<<
 *     """(internal) Convert np.timedelta[M] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust
*/

  /* 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("cytimes.utils._td64_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/

static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td64_to_td(PyObject *__pyx_v_td64, struct __pyx_opt_args_7cytimes_5utils_td64_to_td *__pyx_optional_args) {
  PyObject *__pyx_v_tdclass = ((PyObject *)Py_None);
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  npy_int64 __pyx_t_1;
  struct __pyx_opt_args_7cytimes_5utils_td64_as_int64_us __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_us __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td64_to_td", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tdclass = __pyx_optional_args->tdclass;
    }
  }

  /* "utils.pxd":5661
 *     :returns `<'datetime.timedelta'>`: The resulting timedelta (or subclass if `tdclass` is specified).
 *     """
 *     return td_fr_us(td64_as_int64_us(td64, 0), tdclass)             # <<<<<<<<<<<<<<
 * 
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.offset = 0;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_td64_as_int64_us(__pyx_v_td64, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(5, 5661, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.tdclass = __pyx_v_tdclass;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us(__pyx_t_1, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5653
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64." % to_reso)
 * 
 * cdef inline datetime.timedelta td64_to_td(object td64, object tdclass=None):             # <<<<<<<<<<<<<<
 *     """Convert np.timedelta64 to timedelta `<'datetime.timedelta'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.td64_to_td", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5665
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_arr(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.ndarray` `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr(PyObject *__pyx_v_obj) {
  int __pyx_r;

  /* "utils.pxd":5674
 *     >>> isinstance(obj, np.ndarray)
 *     """
 *     return np.PyArray_Check(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:
*/
  __pyx_r = PyArray_Check(__pyx_v_obj);
  goto __pyx_L0;

  /* "utils.pxd":5665
 * # NumPy: ndarray ---------------------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_arr(object obj) except -1:             # <<<<<<<<<<<<<<
 *     """Check if an object is an instance or subclass of `np.ndarray` `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5676
 *     return np.PyArray_Check(obj)
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is 1-dimensional.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_1dim_arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_1dim_arr", 0);

  /* "utils.pxd":5681
 *     :raises `<'ValueError'>`: If the array is not 1-dimensional.
 *     """
 *     if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True
*/
  __pyx_t_1 = (__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr) != 1);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5682
 *     """
 *     if arr.ndim != 1:
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_f_5numpy_7ndarray_4ndim_ndim(__pyx_v_arr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Expects_1_D_ndarray_instead_got, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5682, __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(5, 5682, __pyx_L1_error)

    /* "utils.pxd":5681
 *     :raises `<'ValueError'>`: If the array is not 1-dimensional.
 *     """
 *     if arr.ndim != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True
*/
  }

  /* "utils.pxd":5683
 *     if arr.ndim != 1:
 *         raise ValueError("Expects 1-D ndarray, instead got %d-dimensional array." % arr.ndim)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":5676
 *     return np.PyArray_Check(obj)
 * 
 * cdef inline bint assure_1dim_arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is 1-dimensional.
 * 
*/

  /* 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("cytimes.utils.assure_1dim_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5685
 *     return True
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):             # <<<<<<<<<<<<<<
 *     """Ensure that an ndarray is C-contiguous in memory `<'np.ndarray'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_assure_arr_contiguous(PyArrayObject *__pyx_v_arr) {
  PyArrayObject *__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("assure_arr_contiguous", 0);

  /* "utils.pxd":5691
 *         otherwise, returns a contiguous copy.
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)
*/
  __pyx_t_1 = PyArray_IS_C_CONTIGUOUS(__pyx_v_arr);
  if (__pyx_t_1) {

    /* "utils.pxd":5692
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):
 *         return arr             # <<<<<<<<<<<<<<
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_arr);
    __pyx_r = __pyx_v_arr;
    goto __pyx_L0;

    /* "utils.pxd":5691
 *         otherwise, returns a contiguous copy.
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)
*/
  }

  /* "utils.pxd":5693
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "utils.pxd":5685
 *     return True
 * 
 * cdef inline np.ndarray assure_arr_contiguous(np.ndarray arr):             # <<<<<<<<<<<<<<
 *     """Ensure that an ndarray is C-contiguous in memory `<'np.ndarray'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.assure_arr_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5695
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of integer dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_int(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5701
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_INT8,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT16,
 *         np.NPY_TYPES.NPY_INT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT8);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5703
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
 *         np.NPY_TYPES.NPY_INT32,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *     )
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5700
 *     - Integer dtype: `int8`, `int16`, `int32` and `int64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT8,
 *         np.NPY_TYPES.NPY_INT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_INT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5695
 *     return np.PyArray_GETCONTIGUOUS(arr)
 * 
 * cdef inline bint is_arr_int(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of integer dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5707
 *     )
 * 
 * cdef inline bint is_arr_uint(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of unsigned integer dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_uint(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5713
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_UINT8,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT16,
 *         np.NPY_TYPES.NPY_UINT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT8);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5715
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
 *         np.NPY_TYPES.NPY_UINT32,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT64,
 *     )
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5712
 *     - Unsigned Integer dtype: `uint8`, `uint16`, `uint32` and `uint64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_UINT8,
 *         np.NPY_TYPES.NPY_UINT16,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_UINT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5707
 *     )
 * 
 * cdef inline bint is_arr_uint(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of unsigned integer dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5719
 *     )
 * 
 * cdef inline bint is_arr_float(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of float dtype `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_arr_float(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "utils.pxd":5724
 *     - Float dtype: `float16`, `float32` and `float64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
*/
  __pyx_t_1 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5725
 *     """
 *     return np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_FLOAT16,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT32,
 *         np.NPY_TYPES.NPY_FLOAT64,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT16);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5724
 *     - Float dtype: `float16`, `float32` and `float64`.
 *     """
 *     return np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT32);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L3_bool_binop_done;
  }

  /* "utils.pxd":5727
 *         np.NPY_TYPES.NPY_FLOAT16,
 *         np.NPY_TYPES.NPY_FLOAT32,
 *         np.NPY_TYPES.NPY_FLOAT64,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = (__pyx_t_1 == NPY_FLOAT64);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "utils.pxd":5719
 *     )
 * 
 * cdef inline bint is_arr_float(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a numpy array is of float dtype `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__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("arr_assure_int64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5743
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5743, __pyx_L1_error)

  /* "utils.pxd":5746
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5747
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5748
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5746
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5751
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) == NPY_INT64);
  if (__pyx_t_1) {

    /* "utils.pxd":5752
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_3 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5752, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5751
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_INT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  }

  /* "utils.pxd":5754
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5754, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5731
 * 
 * # . dtype
 * cdef inline np.ndarray arr_assure_int64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype int64 `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_int64_like(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_assure_int64_like", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5769
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5769, __pyx_L1_error)

  /* "utils.pxd":5772
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5773
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5774
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5772
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_3 = PyArray_TYPE(__pyx_v_arr);

  /* "utils.pxd":5778
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (
 *         np.NPY_TYPES.NPY_INT64,             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_DATETIME,
 *         np.NPY_TYPES.NPY_TIMEDELTA,
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_INT64);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_DATETIME);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L5_bool_binop_done;
  }

  /* "utils.pxd":5780
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
 *         np.NPY_TYPES.NPY_TIMEDELTA,             # <<<<<<<<<<<<<<
 *     ):
 *         return np.PyArray_Copy(arr) if copy else arr
*/
  __pyx_t_4 = (__pyx_t_3 == NPY_TIMEDELTA);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L5_bool_binop_done:;

  /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  __pyx_t_4 = __pyx_t_1;
  if (__pyx_t_4) {

    /* "utils.pxd":5782
 *         np.NPY_TYPES.NPY_TIMEDELTA,
 *     ):
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_5 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 5782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5782, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  }

  /* "utils.pxd":5784
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5784, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5756
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_int64_like(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype
 *     int64 / datetime64[*] / timedelta64[*] `<'ndarray[int64*]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_int64_like", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_assure_float64(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_assure_float64 *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__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("arr_assure_float64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":5798
 *     """
 *     # Assure 1-D
 *     assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Assure contiguous
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 5798, __pyx_L1_error)

  /* "utils.pxd":5801
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  __pyx_t_1 = (!PyArray_IS_C_CONTIGUOUS(__pyx_v_arr));
  if (__pyx_t_1) {

    /* "utils.pxd":5802
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)             # <<<<<<<<<<<<<<
 *         copy = False
 * 
*/
    __pyx_t_2 = ((PyObject *)PyArray_GETCONTIGUOUS(__pyx_v_arr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "utils.pxd":5803
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "utils.pxd":5801
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "utils.pxd":5806
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) == NPY_FLOAT64);
  if (__pyx_t_1) {

    /* "utils.pxd":5807
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:
 *         return np.PyArray_Copy(arr) if copy else arr             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_FLOAT64)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    if (__pyx_v_copy) {
      __pyx_t_3 = PyArray_Copy(__pyx_v_arr); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 5807, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5807, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF((PyObject *)__pyx_v_arr);
      __pyx_t_2 = ((PyObject *)__pyx_v_arr);
    }
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5806
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_FLOAT64:             # <<<<<<<<<<<<<<
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
*/
  }

  /* "utils.pxd":5809
 *         return np.PyArray_Copy(arr) if copy else arr
 *     else:
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_FLOAT64)             # <<<<<<<<<<<<<<
 * 
 * # . create
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = PyArray_Cast(__pyx_v_arr, NPY_FLOAT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5809, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5786
 *         return np.PyArray_Cast(arr, np.NPY_TYPES.NPY_INT64)
 * 
 * cdef inline np.ndarray arr_assure_float64(np.ndarray arr, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ensure that a 1-D array is contiguous and dtype float64 `<'ndarray[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_assure_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5812
 * 
 * # . create
 * cdef inline np.ndarray arr_zero_int64(np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with zero `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_zero_int64(npy_intp __pyx_v_size) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  npy_intp __pyx_t_5[1];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_zero_int64", 0);

  /* "utils.pxd":5821
 *     >>> np.zeros(size, dtype="int64")
 *     """
 *     if size < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
*/
  __pyx_t_1 = (__pyx_v_size < 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5822
 *     """
 *     if size < 0:
 *         raise ValueError("The size of a new array must be a positive integer.")             # <<<<<<<<<<<<<<
 *     else:
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_size_of_a_new_array_must_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5822, __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(5, 5822, __pyx_L1_error)

    /* "utils.pxd":5821
 *     >>> np.zeros(size, dtype="int64")
 *     """
 *     if size < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
*/
  }

  /* "utils.pxd":5824
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     else:
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):
*/
  /*else*/ {
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5[0] = __pyx_v_size;
    __pyx_t_2 = PyArray_ZEROS(1, __pyx_t_5, NPY_INT64, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5824, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":5812
 * 
 * # . create
 * cdef inline np.ndarray arr_zero_int64(np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with zero `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_zero_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5826
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with a specific integer `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_fill_int64(npy_int64 __pyx_v_value, npy_intp __pyx_v_size) {
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  npy_intp __pyx_t_5[1];
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_fill_int64", 0);

  /* "utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  __pyx_t_1 = (__pyx_v_value == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5838
 *     # Fast-path
 *     if value == 0:
 *         return arr_zero_int64(size)             # <<<<<<<<<<<<<<
 * 
 *     # New array
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_zero_int64(__pyx_v_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  }

  /* "utils.pxd":5841
 * 
 *     # New array
 *     if size < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_size < 1);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5842
 *     # New array
 *     if size < 1:
 *         raise ValueError("The size of a new array must be a positive integer.")             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_size_of_a_new_array_must_be};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5842, __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(5, 5842, __pyx_L1_error)

    /* "utils.pxd":5841
 * 
 *     # New array
 *     if size < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
*/
  }

  /* "utils.pxd":5844
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_t_5[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_5, NPY_INT64, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 5844, __pyx_L1_error)
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":5845
 *     cdef:
 *         np.ndarray arr = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *     for i in range(size):
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":5847
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         arr_ptr[i] = value
 *     return arr
*/
  __pyx_t_6 = __pyx_v_size;
  __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;

    /* "utils.pxd":5848
 *         np.npy_intp i
 *     for i in range(size):
 *         arr_ptr[i] = value             # <<<<<<<<<<<<<<
 *     return arr
 * 
*/
    (__pyx_v_arr_ptr[__pyx_v_i]) = __pyx_v_value;
  }

  /* "utils.pxd":5849
 *     for i in range(size):
 *         arr_ptr[i] = value
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * # . range
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);
  __pyx_r = __pyx_v_arr;
  goto __pyx_L0;

  /* "utils.pxd":5826
 *         return np.PyArray_ZEROS(1, [size], np.NPY_TYPES.NPY_INT64, 0)
 * 
 * cdef inline np.ndarray arr_fill_int64(np.npy_int64 value, np.npy_intp size):             # <<<<<<<<<<<<<<
 *     """Create a 1-D ndarray[int64] filled with a specific integer `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_fill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_clamp(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_minimum, npy_int64 __pyx_v_maximum, struct __pyx_opt_args_7cytimes_5utils_arr_clamp *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_clamp", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5873
 *     """
 *     # Validate
 *     if minimum > maximum:             # <<<<<<<<<<<<<<
 *         raise ValueError("minimum value cannot be greater than maximum value.")
 * 
*/
  __pyx_t_1 = (__pyx_v_minimum > __pyx_v_maximum);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":5874
 *     # Validate
 *     if minimum > maximum:
 *         raise ValueError("minimum value cannot be greater than maximum value.")             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_minimum_value_cannot_be_greater};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5874, __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(5, 5874, __pyx_L1_error)

    /* "utils.pxd":5873
 *     """
 *     # Validate
 *     if minimum > maximum:             # <<<<<<<<<<<<<<
 *         raise ValueError("minimum value cannot be greater than maximum value.")
 * 
*/
  }

  /* "utils.pxd":5878
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":5879
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5880
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5885
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":5886
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_6 = __pyx_v_size;
    __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;

      /* "utils.pxd":5887
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5889
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":5890
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":5889
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "utils.pxd":5892
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
*/
      __pyx_t_1 = (__pyx_v_v > __pyx_v_maximum);
      if (__pyx_t_1) {

        /* "utils.pxd":5893
 *             # Clamp value
 *             if v > maximum:
 *                 out_ptr[i] = maximum             # <<<<<<<<<<<<<<
 *             elif v < minimum:
 *                 out_ptr[i] = minimum
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_maximum;

        /* "utils.pxd":5892
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
*/
        goto __pyx_L8;
      }

      /* "utils.pxd":5894
 *             if v > maximum:
 *                 out_ptr[i] = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = minimum
 * 
*/
      __pyx_t_1 = (__pyx_v_v < __pyx_v_minimum);
      if (__pyx_t_1) {

        /* "utils.pxd":5895
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
 *                 out_ptr[i] = minimum             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_minimum;

        /* "utils.pxd":5894
 *             if v > maximum:
 *                 out_ptr[i] = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = minimum
 * 
*/
      }
      __pyx_L8:;
      __pyx_L5_continue:;
    }

    /* "utils.pxd":5885
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":5899
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_6 = __pyx_v_size;
    __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;

      /* "utils.pxd":5900
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5902
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":5903
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L9_continue;

        /* "utils.pxd":5902
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "utils.pxd":5905
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 v = maximum
 *             elif v < minimum:
*/
      __pyx_t_1 = (__pyx_v_v > __pyx_v_maximum);
      if (__pyx_t_1) {

        /* "utils.pxd":5906
 *             # Clamp value
 *             if v > maximum:
 *                 v = maximum             # <<<<<<<<<<<<<<
 *             elif v < minimum:
 *                 v = minimum
*/
        __pyx_v_v = __pyx_v_maximum;

        /* "utils.pxd":5905
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 v = maximum
 *             elif v < minimum:
*/
        goto __pyx_L12;
      }

      /* "utils.pxd":5907
 *             if v > maximum:
 *                 v = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 v = minimum
 *             out_ptr[i] = v + offset
*/
      __pyx_t_1 = (__pyx_v_v < __pyx_v_minimum);
      if (__pyx_t_1) {

        /* "utils.pxd":5908
 *                 v = maximum
 *             elif v < minimum:
 *                 v = minimum             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_minimum;

        /* "utils.pxd":5907
 *             if v > maximum:
 *                 v = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 v = minimum
 *             out_ptr[i] = v + offset
*/
      }
      __pyx_L12:;

      /* "utils.pxd":5909
 *             elif v < minimum:
 *                 v = minimum
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L9_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":5911
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5852
 * 
 * # . range
 * cdef inline np.ndarray arr_clamp(np.ndarray arr, np.npy_int64 minimum, np.npy_int64 maximum, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Clamp the values of a 1-D ndarray between 'minimum' and 'maximum' value `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_clamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_min *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_min", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5934
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5935
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5936
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5941
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":5942
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5943
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5945
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5946
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":5945
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "utils.pxd":5948
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      __pyx_t_3 = (__pyx_v_v > __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":5949
 *             # Min value
 *             if v > value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "utils.pxd":5948
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":5941
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":5953
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5954
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5956
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5957
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":5956
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "utils.pxd":5959
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v > __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":5960
 *             # Min value
 *             if v > value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "utils.pxd":5959
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":5961
 *             if v > value:
 *                 v = value
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":5963
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5913
 *     return out
 * 
 * cdef inline np.ndarray arr_min(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_max(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_max *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_max", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":5986
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 5986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":5987
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":5988
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":5993
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":5994
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":5995
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":5997
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":5998
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":5997
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "utils.pxd":6000
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      __pyx_t_3 = (__pyx_v_v < __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":6001
 *             # Max value
 *             if v < value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "utils.pxd":6000
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":5993
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":6005
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6006
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6008
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6009
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":6008
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "utils.pxd":6011
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v < __pyx_v_value);
      if (__pyx_t_3) {

        /* "utils.pxd":6012
 *             # Max value
 *             if v < value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "utils.pxd":6011
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":6013
 *             if v < value:
 *                 v = value
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":6015
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":5965
 *     return out
 * 
 * cdef inline np.ndarray arr_max(np.ndarray arr, np.npy_int64 value, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of a 1-D array with the scalar 'value' `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_min_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_min_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_min_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6038
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":6039
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6040
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":6043
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 6043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 6043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":6041
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 6041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6040, __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(5, 6040, __pyx_L1_error)

    /* "utils.pxd":6039
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":6048
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6049
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6050
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6051
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":6056
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6057
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6059
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6060
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6061
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6060
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6062
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6063
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6064
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6065
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6063
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6067
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      __pyx_t_1 = (__pyx_v_v1 > __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6068
 *             # Min value
 *             if v1 > v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6067
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6056
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":6072
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
  /*else*/ {
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6074
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6075
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6076
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6075
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6077
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6078
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6079
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6080
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6078
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6082
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
      __pyx_t_1 = (__pyx_v_v1 > __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6083
 *             # Min value
 *             if v1 > v2:
 *                 out_ptr[i] = v2 + offset             # <<<<<<<<<<<<<<
 *             else:
 *                 out_ptr[i] = v1 + offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v2 + __pyx_v_offset);

        /* "utils.pxd":6082
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "utils.pxd":6085
 *                 out_ptr[i] = v2 + offset
 *             else:
 *                 out_ptr[i] = v1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      /*else*/ {
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 + __pyx_v_offset);
      }
      __pyx_L14:;
      __pyx_L10_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":6087
 *                 out_ptr[i] = v1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6017
 *     return out
 * 
 * cdef inline np.ndarray arr_min_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise minimum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_min_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_max_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_max_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_max_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6109
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":6110
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6111
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":6114
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 6114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 6114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":6112
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 6112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6111, __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(5, 6111, __pyx_L1_error)

    /* "utils.pxd":6110
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":6119
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6120
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6121
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6122
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":6127
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
  __pyx_t_1 = (__pyx_v_offset == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6128
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6130
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6131
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6132
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6131
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6133
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6134
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6135
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6136
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6134
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6138
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      __pyx_t_1 = (__pyx_v_v1 < __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6139
 *             # Max value
 *             if v1 < v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6138
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6127
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":6143
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Propagate NaT
 *             v1 = out_ptr[i]
*/
  /*else*/ {
    __pyx_t_10 = __pyx_v_size;
    __pyx_t_11 = __pyx_t_10;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "utils.pxd":6145
 *         for i in range(size):
 *             # Propagate NaT
 *             v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *             if v1 == LLONG_MIN:
 *                 continue
*/
      __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6146
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6147
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6146
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "utils.pxd":6148
 *             if v1 == LLONG_MIN:
 *                 continue
 *             v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
*/
      __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

      /* "utils.pxd":6149
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6150
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "utils.pxd":6151
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":6149
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "utils.pxd":6153
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
      __pyx_t_1 = (__pyx_v_v1 < __pyx_v_v2);
      if (__pyx_t_1) {

        /* "utils.pxd":6154
 *             # Max value
 *             if v1 < v2:
 *                 out_ptr[i] = v2 + offset             # <<<<<<<<<<<<<<
 *             else:
 *                 out_ptr[i] = v1 + offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v2 + __pyx_v_offset);

        /* "utils.pxd":6153
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "utils.pxd":6156
 *                 out_ptr[i] = v2 + offset
 *             else:
 *                 out_ptr[i] = v1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      /*else*/ {
        (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 + __pyx_v_offset);
      }
      __pyx_L14:;
      __pyx_L10_continue:;
    }
  }
  __pyx_L4:;

  /* "utils.pxd":6158
 *                 out_ptr[i] = v1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . arithmetic
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6089
 *     return out
 * 
 * cdef inline np.ndarray arr_max_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise maximum of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_max_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_abs(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_abs *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_abs", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6181
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6182
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6183
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6188
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_3 = (__pyx_v_offset == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":6189
 *     # No offset
 *     if offset == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6190
 *     if offset == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6192
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6193
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":6192
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      __pyx_t_3 = (__pyx_v_v < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":6196
 *             # Abs value
 *             if v < 0:
 *                 out_ptr[i] = -v             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (-__pyx_v_v);

        /* "utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "utils.pxd":6188
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "utils.pxd":6200
 *     # With offset
 *     else:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
  /*else*/ {
    __pyx_t_4 = __pyx_v_size;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "utils.pxd":6201
 *     else:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6203
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_3) {

        /* "utils.pxd":6204
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L8_continue;

        /* "utils.pxd":6203
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "utils.pxd":6206
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 v = -v
 *             out_ptr[i] = v + offset
*/
      __pyx_t_3 = (__pyx_v_v < 0);
      if (__pyx_t_3) {

        /* "utils.pxd":6207
 *             # Abs value
 *             if v < 0:
 *                 v = -v             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = (-__pyx_v_v);

        /* "utils.pxd":6206
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 v = -v
 *             out_ptr[i] = v + offset
*/
      }

      /* "utils.pxd":6208
 *             if v < 0:
 *                 v = -v
 *             out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
      __pyx_L8_continue:;
    }
  }
  __pyx_L3:;

  /* "utils.pxd":6210
 *             out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6161
 * 
 * # . arithmetic
 * cdef inline np.ndarray arr_abs(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Take the elementwise absolute of a 1-D array `<'ndarray[int64]'`>
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_neg(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_arr_neg *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_neg", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6232
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6233
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6234
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6239
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":6240
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6242
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Negate value
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":6243
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Negate value
 *         out_ptr[i] = -v + offset
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":6242
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Negate value
*/
    }

    /* "utils.pxd":6245
 *             continue
 *         # Negate value
 *         out_ptr[i] = -v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((-__pyx_v_v) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":6247
 *         out_ptr[i] = -v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6212
 *     return out
 * 
 * cdef inline np.ndarray arr_neg(np.ndarray arr, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Negate the values of a 1-D array `<'ndarray[int64]'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value, struct __pyx_opt_args_7cytimes_5utils_arr_add *__pyx_optional_args) {
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  int __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_add", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_copy = __pyx_optional_args->copy;
    }
  }

  /* "utils.pxd":6268
 *     """
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *     if value == 0:
 *         return out
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 6268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":6269
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
  __pyx_t_3 = (__pyx_v_value == 0);
  if (__pyx_t_3) {

    /* "utils.pxd":6270
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":6269
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
  }

  /* "utils.pxd":6274
 *     # Setup
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6275
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6280
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":6281
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6283
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Add value
*/
    __pyx_t_3 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_3) {

      /* "utils.pxd":6284
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Add value
 *         out_ptr[i] = v + value
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":6283
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Add value
*/
    }

    /* "utils.pxd":6286
 *             continue
 *         # Add value
 *         out_ptr[i] = v + value             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_value);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":6288
 *         out_ptr[i] = v + value
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6249
 *     return out
 * 
 * cdef inline np.ndarray arr_add(np.ndarray arr, np.npy_int64 value, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Add a 'value' to the 1-D array `<'np.ndarray'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6310
 *     """
 *     # Fast-path
 *     if factor == 1:             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6311
 *     # Fast-path
 *     if factor == 1:
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6310
 *     """
 *     # Fast-path
 *     if factor == 1:             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6315
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6316
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6317
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6322
 * 
 *     # Zero factor
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6323
 *     # Zero factor
 *     if factor == 0:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":6324
 *     if factor == 0:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6326
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6327
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L5_continue;

        /* "utils.pxd":6326
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "utils.pxd":6329
 *                 continue
 *             # Set to offset
 *             out_ptr[i] = offset             # <<<<<<<<<<<<<<
 * 
 *     # Compute
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
      __pyx_L5_continue:;
    }

    /* "utils.pxd":6322
 * 
 *     # Zero factor
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  }

  /* "utils.pxd":6332
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":6333
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6335
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6336
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply value
 *         out_ptr[i] = v * factor + offset
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6335
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply value
*/
    }

    /* "utils.pxd":6338
 *             continue
 *         # Multiply value
 *         out_ptr[i] = v * factor + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v * __pyx_v_factor) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6340
 *         out_ptr[i] = v * factor + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6290
 *     return out
 * 
 * cdef inline np.ndarray arr_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Multiply the values of a 1-D array by the 'factor' `<'np.ndarray'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.utils.arr_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mod(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_mod *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  int __pyx_v_neg_f;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mod", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6363
 *     """
 *     # Validate
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_mod: division by zero.")
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6364
 *     # Validate
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_mod: division by zero.")             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_mod_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6364, __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(5, 6364, __pyx_L1_error)

    /* "utils.pxd":6363
 *     """
 *     # Validate
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_mod: division by zero.")
 * 
*/
  }

  /* "utils.pxd":6368
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6369
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6370
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6373
 *         np.npy_intp i
 *         np.npy_int64 v
 *         bint neg_f = factor < 0             # <<<<<<<<<<<<<<
 * 
 *     # Fast path: factor == 1
*/
  __pyx_v_neg_f = (__pyx_v_factor < 0);

  /* "utils.pxd":6376
 * 
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  switch (__pyx_v_factor) {
    case 1:
    case -1LL:

    /* "utils.pxd":6377
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             v = out_ptr[i]
 *             # Preserve NaT
*/
    __pyx_t_6 = __pyx_v_size;
    __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;

      /* "utils.pxd":6378
 *     if factor == 1 or factor == -1:
 *         for i in range(size):
 *             v = out_ptr[i]             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             if v == LLONG_MIN:
*/
      __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

      /* "utils.pxd":6380
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
      if (__pyx_t_1) {

        /* "utils.pxd":6381
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L4_continue;

        /* "utils.pxd":6380
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "utils.pxd":6383
 *                 continue
 *             # Set to offset
 *             out_ptr[i] = offset             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
      __pyx_L4_continue:;
    }

    /* "utils.pxd":6384
 *             # Set to offset
 *             out_ptr[i] = offset
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compute
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":6376
 * 
 *     # Fast path: factor == 1
 *     if factor == 1 or factor == -1:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    break;
    default: break;
  }

  /* "utils.pxd":6387
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_6 = __pyx_v_size;
  __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;

    /* "utils.pxd":6388
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6390
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Modulo value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6391
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Modulo value
 *         with cython.cdivision(True):
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":6390
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Modulo value
*/
    }

    /* "utils.pxd":6394
 *         # Modulo value
 *         with cython.cdivision(True):
 *             v = v % factor             # <<<<<<<<<<<<<<
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor
*/
    __pyx_v_v = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6395
 *         with cython.cdivision(True):
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):             # <<<<<<<<<<<<<<
 *             v += factor
 *         out_ptr[i] = v + offset
*/
    __pyx_t_9 = (__pyx_v_v != 0);
    if (__pyx_t_9) {
    } else {
      __pyx_t_1 = __pyx_t_9;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_9 = ((__pyx_v_v < 0) != __pyx_v_neg_f);
    __pyx_t_1 = __pyx_t_9;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6396
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = v + offset
 * 
*/
      __pyx_v_v = (__pyx_v_v + __pyx_v_factor);

      /* "utils.pxd":6395
 *         with cython.cdivision(True):
 *             v = v % factor
 *         if v != 0 and ((v < 0) != neg_f):             # <<<<<<<<<<<<<<
 *             v += factor
 *         out_ptr[i] = v + offset
*/
    }

    /* "utils.pxd":6397
 *         if v != 0 and ((v < 0) != neg_f):
 *             v += factor
 *         out_ptr[i] = v + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":6399
 *         out_ptr[i] = v + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6342
 *     return out
 * 
 * cdef inline np.ndarray arr_mod(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise modulo of a 1-D array by `factor` with Python semantics
 *     (remainder has the same sign as the divisor) `<'np.ndarray'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_mod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_even *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_even", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6421
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6422
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_even_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6422, __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(5, 6422, __pyx_L1_error)

    /* "utils.pxd":6421
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6423
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6424
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6423
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6425
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6426
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6425
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6430
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6431
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6432
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6437
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6438
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6439
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6441
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6442
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6441
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6445
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6446
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6447
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6448
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6449
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_12 = (__pyx_v_abs_r > __pyx_v_half);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_12 = (__pyx_v_abs_r == __pyx_v_half);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_12 = ((__pyx_v_q & 1) != 0);
      __pyx_t_1 = __pyx_t_12;
      __pyx_L11_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":6450
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6449
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6446
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6451
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6453
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6401
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even) <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_even", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_even_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_even_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6477
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6478
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6477
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6479
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6480
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6479
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6481
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6482
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_even_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6482, __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(5, 6482, __pyx_L1_error)

    /* "utils.pxd":6481
 *     if multiple == 1:
 *         return arr_div_even(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6483
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6484
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6483
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_even_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6485
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6486
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6485
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6490
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6491
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6492
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6497
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6498
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6499
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6501
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6502
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6501
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6505
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6506
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6507
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6508
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6509
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_12 = (__pyx_v_abs_r > __pyx_v_half);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_12 = (__pyx_v_abs_r == __pyx_v_half);
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_12 = ((__pyx_v_q & 1) != 0);
      __pyx_t_1 = __pyx_t_12;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_1) {

        /* "utils.pxd":6510
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6509
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6506
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6511
 *             if abs_r > half or (abs_r == half and (q & 1) != 0):
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6513
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6455
 *     return out
 * 
 * cdef inline np.ndarray arr_div_even_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-to-even),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_even_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_up *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_up", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6532
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6533
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_up_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6533, __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(5, 6533, __pyx_L1_error)

    /* "utils.pxd":6532
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6534
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6535
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6534
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6536
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6537
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6536
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6541
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6542
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6543
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6548
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6549
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6550
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6552
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6553
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6552
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6556
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6557
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6558
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6559
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6560
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6561
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6560
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6557
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6562
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6564
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6515
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-up / away-from-zero) <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_up", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_up_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_up __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_up_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6585
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6586
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6585
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6587
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6588
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_up(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6587
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6589
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6590
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_up_mul_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6590, __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(5, 6590, __pyx_L1_error)

    /* "utils.pxd":6589
 *     if multiple == 1:
 *         return arr_div_up(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6591
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6592
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6591
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_up_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6593
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6594
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6593
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6598
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6599
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6600
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6605
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6606
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6607
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6609
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6610
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6609
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6613
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6614
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6615
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6616
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6617
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r >= __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6618
 *             half  = abs_f - abs_r
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6617
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r >= half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6614
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6619
 *             if abs_r >= half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6621
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6566
 *     return out
 * 
 * cdef inline np.ndarray arr_div_up_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to nearest away from
 *     zero (half-up), then scale by 'multiple' <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_up_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_down *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_down", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6641
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6642
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_down_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6642, __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(5, 6642, __pyx_L1_error)

    /* "utils.pxd":6641
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6643
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6644
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6643
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6645
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6646
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6645
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6650
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6651
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6652
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6657
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6658
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6659
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6661
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6662
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6661
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6665
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6666
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6667
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6668
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6669
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6670
 *             half  = abs_f - abs_r
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6669
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset
*/
      }

      /* "utils.pxd":6666
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6671
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6673
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6623
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest
 *     integers (half-down / toward-zero) <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_down", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_down_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_abs_f;
  npy_int64 __pyx_v_abs_r;
  npy_int64 __pyx_v_half;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_down __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_int64 __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_down_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6694
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6695
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6694
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6696
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6697
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_down(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6696
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6698
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6699
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_down_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6699, __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(5, 6699, __pyx_L1_error)

    /* "utils.pxd":6698
 *     if multiple == 1:
 *         return arr_div_down(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6700
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6701
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6700
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_down_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6702
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6703
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6702
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6707
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6708
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6709
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r, abs_f, abs_r, half
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6714
 * 
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor             # <<<<<<<<<<<<<<
 *     for i in range(size):
 *         v = out_ptr[i]
*/
  __pyx_t_1 = (__pyx_v_factor < 0);
  if (__pyx_t_1) {
    __pyx_t_8 = (-__pyx_v_factor);
  } else {
    __pyx_t_8 = __pyx_v_factor;
  }
  __pyx_v_abs_f = __pyx_t_8;

  /* "utils.pxd":6715
 *     # Compute
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":6716
 *     abs_f = -factor if factor < 0 else factor
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6718
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6719
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6718
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "utils.pxd":6722
 *         # Divide & Multiply
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6723
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    __pyx_t_1 = (__pyx_v_r != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":6724
 *             q = v / factor; r = v % factor
 *         if r != 0:
 *             abs_r = -r if r < 0 else r             # <<<<<<<<<<<<<<
 *             half  = abs_f - abs_r
 *             if abs_r > half:
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_8 = (-__pyx_v_r);
      } else {
        __pyx_t_8 = __pyx_v_r;
      }
      __pyx_v_abs_r = __pyx_t_8;

      /* "utils.pxd":6725
 *         if r != 0:
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r             # <<<<<<<<<<<<<<
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
*/
      __pyx_v_half = (__pyx_v_abs_f - __pyx_v_abs_r);

      /* "utils.pxd":6726
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      __pyx_t_1 = (__pyx_v_abs_r > __pyx_v_half);
      if (__pyx_t_1) {

        /* "utils.pxd":6727
 *             half  = abs_f - abs_r
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
        __pyx_t_1 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
        if (__pyx_t_1) {
          __pyx_t_8 = 1;
        } else {
          __pyx_t_8 = -1LL;
        }
        __pyx_v_q = (__pyx_v_q + __pyx_t_8);

        /* "utils.pxd":6726
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
 *             if abs_r > half:             # <<<<<<<<<<<<<<
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset
*/
      }

      /* "utils.pxd":6723
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0:             # <<<<<<<<<<<<<<
 *             abs_r = -r if r < 0 else r
 *             half  = abs_f - abs_r
*/
    }

    /* "utils.pxd":6728
 *             if abs_r > half:
 *                 q += 1 if ((v ^ factor) >= 0) else -1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6730
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6675
 *     return out
 * 
 * cdef inline np.ndarray arr_div_down_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and rounds to the nearest integers (half-down),
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_down_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6752
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6753
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_ceil_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6753, __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(5, 6753, __pyx_L1_error)

    /* "utils.pxd":6752
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6754
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6755
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6754
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6756
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6757
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6756
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6761
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6762
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6763
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6768
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":6769
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6771
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6772
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6771
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6775
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6776
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6777
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q + 1);

      /* "utils.pxd":6776
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":6778
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6780
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6732
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_ceil_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_ceil_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6804
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6805
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6804
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6806
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6807
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6806
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6808
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6809
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_ceil_mul_division_by_zer};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6809, __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(5, 6809, __pyx_L1_error)

    /* "utils.pxd":6808
 *     if multiple == 1:
 *         return arr_div_ceil(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6810
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6811
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6810
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_ceil_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6812
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6813
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6812
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6817
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6818
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6819
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6824
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":6825
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6827
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6828
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6827
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6831
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6832
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q * multiple + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) >= 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6833
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q + 1);

      /* "utils.pxd":6832
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) >= 0):             # <<<<<<<<<<<<<<
 *             q += 1
 *         out_ptr[i] = q * multiple + offset
*/
    }

    /* "utils.pxd":6834
 *         if r != 0 and ((v ^ factor) >= 0):
 *             q += 1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6836
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6782
 *     return out
 * 
 * cdef inline np.ndarray arr_div_ceil_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and ceils up to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_ceil_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6858
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6859
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_floor_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6859, __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(5, 6859, __pyx_L1_error)

    /* "utils.pxd":6858
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6860
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6861
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6860
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6862
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6863
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6862
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6867
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6868
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6869
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6874
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":6875
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6877
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6878
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6877
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6881
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6882
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) < 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6883
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":6882
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":6884
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6886
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6838
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_floor_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_floor_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6910
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":6911
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6910
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":6912
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6913
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6912
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":6914
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6915
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_floor_mul_division_by_ze};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6915, __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(5, 6915, __pyx_L1_error)

    /* "utils.pxd":6914
 *     if multiple == 1:
 *         return arr_div_floor(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":6916
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6917
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6916
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_floor_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":6918
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6919
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6918
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6923
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6924
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6925
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6930
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":6931
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6933
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6934
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":6933
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6937
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor             # <<<<<<<<<<<<<<
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);
    __pyx_v_r = (__pyx_v_v % __pyx_v_factor);

    /* "utils.pxd":6938
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset
*/
    __pyx_t_11 = (__pyx_v_r != 0);
    if (__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = ((__pyx_v_v ^ __pyx_v_factor) < 0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":6939
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":6938
 *         with cython.cdivision(True):
 *             q = v / factor; r = v % factor
 *         if r != 0 and ((v ^ factor) < 0):             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset
*/
    }

    /* "utils.pxd":6940
 *         if r != 0 and ((v ^ factor) < 0):
 *             q -= 1
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":6942
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6888
 *     return out
 * 
 * cdef inline np.ndarray arr_div_floor_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and floors down to the nearest integers,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_floor_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_neg __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_trunc", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":6961
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":6962
 *     # Validate / Fast-path
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
*/
    __pyx_t_3 = NULL;
    __pyx_t_4 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_arr_div_trunc_division_by_zero};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6962, __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(5, 6962, __pyx_L1_error)

    /* "utils.pxd":6961
 *     """
 *     # Validate / Fast-path
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
*/
  }

  /* "utils.pxd":6963
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":6964
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6963
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
*/
  }

  /* "utils.pxd":6965
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":6966
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset
 *         return arr_neg(arr, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_neg(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":6965
 *     if factor == 1:  # factor == 1  q = v (no rounding) + offset
 *         return arr_add(arr, offset, copy)
 *     if factor == -1:  # factor == -1  q = -v (exact) + offset             # <<<<<<<<<<<<<<
 *         return arr_neg(arr, offset, copy)
 * 
*/
  }

  /* "utils.pxd":6970
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":6971
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":6972
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":6977
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":6978
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":6980
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":6981
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":6980
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":6984
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);

    /* "utils.pxd":6985
 *         with cython.cdivision(True):
 *             q = v / factor
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":6987
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6944
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc(np.ndarray arr, np.npy_int64 factor, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and and truncate toward zero `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.arr_div_trunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_div_trunc_mul(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_factor, npy_int64 __pyx_v_multiple, struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc_mul *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_trunc __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_div_trunc_mul", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7008
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  __pyx_t_1 = (__pyx_v_multiple == 0);
  if (__pyx_t_1) {

    /* "utils.pxd":7009
 *     # Validate / Fast-path
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)             # <<<<<<<<<<<<<<
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7008
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "utils.pxd":7010
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
*/
  __pyx_t_1 = (__pyx_v_multiple == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":7011
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_trunc(__pyx_v_arr, __pyx_v_factor, &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7010
 *     if multiple == 0:
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:             # <<<<<<<<<<<<<<
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
*/
  }

  /* "utils.pxd":7012
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 0);
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7013
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")             # <<<<<<<<<<<<<<
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
*/
    __pyx_t_5 = NULL;
    __pyx_t_6 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_arr_div_trunc_mul_division_by_ze};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ZeroDivisionError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7013, __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(5, 7013, __pyx_L1_error)

    /* "utils.pxd":7012
 *     if multiple == 1:
 *         return arr_div_trunc(arr, factor, offset, copy)
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
*/
  }

  /* "utils.pxd":7014
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  __pyx_t_1 = (__pyx_v_factor == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":7015
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)             # <<<<<<<<<<<<<<
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_multiple, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7014
 *     if factor == 0:
 *         raise ZeroDivisionError("arr_div_trunc_mul: division by zero.")
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
*/
  }

  /* "utils.pxd":7016
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  __pyx_t_1 = (__pyx_v_factor == -1LL);
  if (__pyx_t_1) {

    /* "utils.pxd":7017
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset
 *         return arr_mul(arr, -multiple, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_3.__pyx_n = 2;
    __pyx_t_3.offset = __pyx_v_offset;
    __pyx_t_3.copy = __pyx_v_copy;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (-__pyx_v_multiple), &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "utils.pxd":7016
 *     if factor == 1:  # factor == 1  q = v (no rounding) * multiple + offset
 *         return arr_mul(arr, multiple, offset, copy)
 *     if factor == -1:  # factor == -1  q = v (exact) * -multiple + offset             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, -multiple, offset, copy)
 * 
*/
  }

  /* "utils.pxd":7021
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7022
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7023
 *         np.ndarray out = arr_assure_int64_like(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7028
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":7029
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7031
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7032
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "utils.pxd":7031
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "utils.pxd":7035
 *         # Divide value
 *         with cython.cdivision(True):
 *             q = v / factor             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q * multiple + offset
 * 
*/
    __pyx_v_q = (__pyx_v_v / __pyx_v_factor);

    /* "utils.pxd":7036
 *         with cython.cdivision(True):
 *             q = v / factor
 *         out_ptr[i] = q * multiple + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_q * __pyx_v_multiple) + __pyx_v_offset);
    __pyx_L8_continue:;
  }

  /* "utils.pxd":7038
 *         out_ptr[i] = q * multiple + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":6989
 *     return out
 * 
 * cdef inline np.ndarray arr_div_trunc_mul(np.ndarray arr, np.npy_int64 factor, np.npy_int64 multiple, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Divide a 1-D array by `factor` and truncate toward zero,
 *     then scale by `multiple` <'ndarray[int64]'>.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils.arr_div_trunc_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_add_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_add_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_add_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7061
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7062
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7063
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform addition on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7066
 *             "Cannot perform addition on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_addition_on_ndarr;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7064
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 77 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7063, __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(5, 7063, __pyx_L1_error)

    /* "utils.pxd":7062
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform addition on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7071
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7072
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7073
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7074
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7079
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7081
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7082
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7083
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7082
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7084
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7085
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7086
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Add values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7087
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Add values
 *         out_ptr[i] = v1 + v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7085
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7089
 *             continue
 *         # Add values
 *         out_ptr[i] = v1 + v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 + __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7091
 *         out_ptr[i] = v1 + v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7040
 *     return out
 * 
 * cdef inline np.ndarray arr_add_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise addition of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_add_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_sub_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_sub_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_sub_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7114
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7115
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7116
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7119
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_subtraction_on_nd;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7117
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 80 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7116, __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(5, 7116, __pyx_L1_error)

    /* "utils.pxd":7115
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform subtraction on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7124
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7125
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7126
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7127
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7132
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7134
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7135
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7136
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7135
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7137
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7138
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7139
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Subtract values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7140
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Subtract values
 *         out_ptr[i] = v1 - v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7138
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7142
 *             continue
 *         # Subtract values
 *         out_ptr[i] = v1 - v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 - __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7144
 *         out_ptr[i] = v1 - v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7093
 *     return out
 * 
 * cdef inline np.ndarray arr_sub_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise subtraction of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_sub_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_mul_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2, struct __pyx_opt_args_7cytimes_5utils_arr_mul_arr *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_intp __pyx_v_size;
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_arr = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_mul_arr", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":7167
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7168
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7169
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7172
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_perform_multiplication_on;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7170
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 83 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7169, __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(5, 7169, __pyx_L1_error)

    /* "utils.pxd":7168
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot perform multiplication on ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7177
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)             # <<<<<<<<<<<<<<
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = __pyx_v_copy;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7178
 *     cdef:
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7179
 *         np.ndarray out = arr_assure_int64_like(arr1, copy)
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7180
 *         np.ndarray arr = arr_assure_int64_like(arr2, False)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v1, v2
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7185
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         v1 = out_ptr[i]
*/
  __pyx_t_10 = __pyx_v_size;
  __pyx_t_11 = __pyx_t_10;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "utils.pxd":7187
 *     for i in range(size):
 *         # Propagate NaT
 *         v1 = out_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             continue
*/
    __pyx_v_v1 = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7188
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7189
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7188
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "utils.pxd":7190
 *         if v1 == LLONG_MIN:
 *             continue
 *         v2 = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
*/
    __pyx_v_v2 = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7191
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7192
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

      /* "utils.pxd":7193
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply values
 *         out_ptr[i] = v1 * v2 + offset
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7191
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "utils.pxd":7195
 *             continue
 *         # Multiply values
 *         out_ptr[i] = v1 * v2 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_v1 * __pyx_v_v2) + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7197
 *         out_ptr[i] = v1 * v2 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . comparison
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7146
 *     return out
 * 
 * cdef inline np.ndarray arr_mul_arr(np.ndarray arr1, np.ndarray arr2, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise multiplication of two 1-D arrays <'ndarray[int64]'>.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_mul_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7200
 * 
 * # . comparison
 * cdef inline np.ndarray arr_eq(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_eq", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7217
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7220
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7221
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7224
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7224, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7225
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7229
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7230
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7231
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7232
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7229
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7235
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7237
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7238
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7239
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7240
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v == value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7238
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7242
 *             continue
 *         # Compare value
 *         out_ptr[i] = v == value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v == __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7243
 *         # Compare value
 *         out_ptr[i] = v == value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7200
 * 
 * # . comparison
 * cdef inline np.ndarray arr_eq(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_eq", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7245
 *     return out
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_gt(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_gt", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7262
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7265
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7266
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7269
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7269, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7270
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7274
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7275
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7276
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7277
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7274
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7280
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7282
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7283
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7284
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7285
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v > value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7283
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7287
 *             continue
 *         # Compare value
 *         out_ptr[i] = v > value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v > __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7288
 *         # Compare value
 *         out_ptr[i] = v > value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7245
 *     return out
 * 
 * cdef inline np.ndarray arr_gt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_gt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7290
 *     return out
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_ge(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_ge", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7307
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7310
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7311
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7314
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7314, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7315
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7319
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7320
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7321
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7322
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7319
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7325
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7327
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7328
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7329
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7330
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v >= value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7328
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7332
 *             continue
 *         # Compare value
 *         out_ptr[i] = v >= value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v >= __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7333
 *         # Compare value
 *         out_ptr[i] = v >= value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7290
 *     return out
 * 
 * cdef inline np.ndarray arr_ge(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_ge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7335
 *     return out
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_lt(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_lt", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7352
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7355
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7356
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7359
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7359, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7360
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7364
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7365
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7366
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7367
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7364
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7370
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7372
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7373
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7374
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7375
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v < value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7373
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7377
 *             continue
 *         # Compare value
 *         out_ptr[i] = v < value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v < __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7378
 *         # Compare value
 *         out_ptr[i] = v < value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7335
 *     return out
 * 
 * cdef inline np.ndarray arr_lt(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_lt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7380
 *     return out
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_le(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_value) {
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_2;
  npy_intp __pyx_t_3[1];
  int __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_le", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7397
 *     """
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":7400
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7401
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7404
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7404, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7405
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7409
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  __pyx_t_4 = (__pyx_v_value == LLONG_MIN);
  if (__pyx_t_4) {

    /* "utils.pxd":7410
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *         return out
*/
    __pyx_t_5 = __pyx_v_size;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "utils.pxd":7411
 *     if value == LLONG_MIN:
 *         for i in range(size):
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;
    }

    /* "utils.pxd":7412
 *         for i in range(size):
 *             out_ptr[i] = False
 *         return out             # <<<<<<<<<<<<<<
 * 
 *     # Compare
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_out);
    __pyx_r = __pyx_v_out;
    goto __pyx_L0;

    /* "utils.pxd":7409
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "utils.pxd":7415
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v = arr_ptr[i]
*/
  __pyx_t_5 = __pyx_v_size;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "utils.pxd":7417
 *     for i in range(size):
 *         # Preserve NaT
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7418
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_4 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_4) {

      /* "utils.pxd":7419
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare value
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7420
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v <= value
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":7418
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7422
 *             continue
 *         # Compare value
 *         out_ptr[i] = v <= value             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v <= __pyx_v_value);
    __pyx_L6_continue:;
  }

  /* "utils.pxd":7423
 *         # Compare value
 *         out_ptr[i] = v <= value
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7380
 *     return out
 * 
 * cdef inline np.ndarray arr_le(np.ndarray arr, np.npy_int64 value):             # <<<<<<<<<<<<<<
 *     """Elementwise less-than-or-equal comparison of a 1-D array to a scalar 'value' `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.arr_le", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7425
 *     return out
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_eq_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_eq_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7441
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7442
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7443
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7446
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7444
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7443, __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(5, 7443, __pyx_L1_error)

    /* "utils.pxd":7442
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7450
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7451
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7454
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7455
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7458
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7458, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7459
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7463
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7465
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7466
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7467
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7468
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7466
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7469
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7470
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7471
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7472
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 == v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7470
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7474
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 == v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 == __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7475
 *         # Compare values
 *         out_ptr[i] = v1 == v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7425
 *     return out
 * 
 * cdef inline np.ndarray arr_eq_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_eq_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7477
 *     return out
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_gt_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_gt_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7493
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7494
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7495
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7498
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7496
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7495, __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(5, 7495, __pyx_L1_error)

    /* "utils.pxd":7494
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7502
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7503
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7506
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7507
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7510
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7510, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7511
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7515
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7517
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7518
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7519
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7520
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7518
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7521
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7522
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7523
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7524
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 > v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7522
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7526
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 > v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 > __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7527
 *         # Compare values
 *         out_ptr[i] = v1 > v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7477
 *     return out
 * 
 * cdef inline np.ndarray arr_gt_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_gt_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7529
 *     return out
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_arr_ge_arr(PyArrayObject *__pyx_v_arr1, PyArrayObject *__pyx_v_arr2) {
  npy_intp __pyx_v_size;
  npy_int64 *__pyx_v_arr1_ptr;
  npy_int64 *__pyx_v_arr2_ptr;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v1;
  npy_int64 __pyx_v_v2;
  PyArrayObject *__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[4];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_9;
  npy_intp __pyx_t_10[1];
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_ge_arr", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_arr1);
  __Pyx_INCREF((PyObject *)__pyx_v_arr2);

  /* "utils.pxd":7545
 *     """
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]             # <<<<<<<<<<<<<<
 *     if size != arr2.shape[0]:
 *         raise ValueError(
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr1)[0]);

  /* "utils.pxd":7546
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  __pyx_t_1 = (__pyx_v_size != (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]));
  if (unlikely(__pyx_t_1)) {

    /* "utils.pxd":7547
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
*/
    __pyx_t_3 = NULL;

    /* "utils.pxd":7550
 *             "Cannot compare ndarrays with different lengths.\n"
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_4 = __Pyx_PyUnicode_From_npy_intp(__pyx_v_size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_npy_intp((__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr2)[0]), 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_ndarrays_with_dif;
    __pyx_t_6[1] = __pyx_t_4;
    __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_arr2_length;
    __pyx_t_6[3] = __pyx_t_5;

    /* "utils.pxd":7548
 *     if size != arr2.shape[0]:
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"             # <<<<<<<<<<<<<<
 *             "  - arr1 length: %d\n"
 *             "  - arr2 length: %d" % (size, arr2.shape[0])
*/
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, 65 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
    if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7547, __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(5, 7547, __pyx_L1_error)

    /* "utils.pxd":7546
 *     # Validate
 *     cdef np.npy_intp size = arr1.shape[0]
 *     if size != arr2.shape[0]:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot compare ndarrays with different lengths.\n"
*/
  }

  /* "utils.pxd":7554
 * 
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)             # <<<<<<<<<<<<<<
 *     arr2 = arr_assure_int64_like(arr2, False)
 *     cdef:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr1, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7555
 *     # Setup
 *     arr1 = arr_assure_int64_like(arr1, False)
 *     arr2 = arr_assure_int64_like(arr2, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target arrays
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.copy = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr2, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_arr2, ((PyArrayObject *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "utils.pxd":7558
 *     cdef:
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)             # <<<<<<<<<<<<<<
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)
 *         np.npy_intp i
*/
  __pyx_v_arr1_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr1));

  /* "utils.pxd":7559
 *         # Target arrays
 *         np.npy_int64* arr1_ptr = <np.npy_int64*> np.PyArray_DATA(arr1)
 *         np.npy_int64* arr2_ptr = <np.npy_int64*> np.PyArray_DATA(arr2)             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_arr2_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr2));

  /* "utils.pxd":7562
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v1, v2
*/
  __pyx_t_10[0] = __pyx_v_size;
  __pyx_t_2 = PyArray_EMPTY(1, __pyx_t_10, NPY_BOOL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 7562, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":7563
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v1, v2
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7567
 * 
 *     # Compare
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7569
 *     for i in range(size):
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]             # <<<<<<<<<<<<<<
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v1 = (__pyx_v_arr1_ptr[__pyx_v_i]);

    /* "utils.pxd":7570
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v1 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7571
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr2_ptr[i]
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7572
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7570
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7573
 *             out_ptr[i] = False
 *             continue
 *         v2 = arr2_ptr[i]             # <<<<<<<<<<<<<<
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
*/
    __pyx_v_v2 = (__pyx_v_arr2_ptr[__pyx_v_i]);

    /* "utils.pxd":7574
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_1 = (__pyx_v_v2 == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":7575
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Compare values
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":7576
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 >= v2
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":7574
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":7578
 *             continue
 *         # Compare values
 *         out_ptr[i] = v1 >= v2             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_v1 >= __pyx_v_v2);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":7579
 *         # Compare values
 *         out_ptr[i] = v1 >= v2
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7529
 *     return out
 * 
 * cdef inline np.ndarray arr_ge_arr(np.ndarray arr1, np.ndarray arr2):             # <<<<<<<<<<<<<<
 *     """Elementwise greater-than-or-equal comparison of two 1-D arrays `<'ndarray[bool]'>`.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils.arr_ge_arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr2);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7583
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'datetime64[*]' `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;

  /* "utils.pxd":7589
 *     >>> isinstance(arr.dtype, np.dtypes.DateTime64DType)
 *     """
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
*/
  __pyx_r = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);
  goto __pyx_L0;

  /* "utils.pxd":7583
 * # NumPy: ndarray[datetime64] ---------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'datetime64[*]' `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":7591
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_dt64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_dt64arr", 0);

  /* "utils.pxd":7593
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 7593, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":7594
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":7596
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_an_instance_of_np_ndarra, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 7596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __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(5, 7594, __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(5, 7594, __pyx_L1_error)

    /* "utils.pxd":7593
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects an instance of 'np.ndarray[datetime64[*]]', "
*/
  }

  /* "utils.pxd":7598
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . range check
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":7591
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 * 
 * cdef inline bint assure_dt64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'datetime64[*]'"""
 *     if not is_dt64arr(arr):
*/

  /* 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("cytimes.utils.assure_dt64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_minimum;
  npy_int64 __pyx_v_maximum;
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PY_LONG_LONG __pyx_t_3;
  PY_LONG_LONG __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64_like __pyx_t_10;
  npy_intp __pyx_t_11;
  npy_intp __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_dt64arr_ns_safe", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":7620
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":7621
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":7622
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 7622, __pyx_L1_error)

      /* "utils.pxd":7621
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":7623
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Get min & max range
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 7623, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":7620
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":7627
 *     # Get min & max range
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":7628
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7627
 *     # Get min & max range
 *     cdef np.npy_int64 minimum, maximum
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":7630
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_US_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_US_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7629
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         minimum, maximum = DT64_NS_NS_MIN, DT64_NS_NS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":7632
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7631
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         minimum, maximum = DT64_NS_US_MIN, DT64_NS_US_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":7634
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7633
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         minimum, maximum = DT64_NS_MS_MIN, DT64_NS_MS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":7636
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7635
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         minimum, maximum = DT64_NS_SS_MIN, DT64_NS_SS_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":7638
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7637
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         minimum, maximum = DT64_NS_MI_MIN, DT64_NS_MI_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":7640
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7639
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         minimum, maximum = DT64_NS_HH_MIN, DT64_NS_HH_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
    break;
    case NPY_FR_W:

    /* "utils.pxd":7642
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7641
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         minimum, maximum = DT64_NS_DD_MIN, DT64_NS_DD_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
    break;
    case NPY_FR_M:

    /* "utils.pxd":7644
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
*/
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN;
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX;
    __pyx_v_minimum = __pyx_t_3;
    __pyx_v_maximum = __pyx_t_4;

    /* "utils.pxd":7643
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         minimum, maximum = DT64_NS_WW_MIN, DT64_NS_WW_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
    break;
    case NPY_FR_Y:

    /* "utils.pxd":7646
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
    __pyx_t_4 = __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN;
    __pyx_t_3 = __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX;
    __pyx_v_minimum = __pyx_t_4;
    __pyx_v_maximum = __pyx_t_3;

    /* "utils.pxd":7645
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         minimum, maximum = DT64_NS_MM_MIN, DT64_NS_MM_MAX
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
 *     else:
*/
    break;
    default:

    /* "utils.pxd":7648
 *         minimum, maximum = DT64_NS_YY_MIN, DT64_NS_YY_MAX
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Unsupported datetime resolution '%s'. "
 *             "Accepts: Y, M, W, D, h, m, s, ms, us, ns."
*/
    __pyx_t_6 = NULL;

    /* "utils.pxd":7651
 *             "Unsupported datetime resolution '%s'. "
 *             "Accepts: Y, M, W, D, h, m, s, ms, us, ns."
 *             % nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 7651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_datetime_resolution, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 7651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7648, __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(5, 7648, __pyx_L1_error)
    break;
  }

  /* "utils.pxd":7655
 * 
 *     # Setup
 *     arr = arr_assure_int64_like(arr, False)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
*/
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.copy = 0;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64_like(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 7655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
  __pyx_t_5 = 0;

  /* "utils.pxd":7657
 *     arr = arr_assure_int64_like(arr, False)
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":7658
 *     cdef:
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":7663
 * 
 *     # Check
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:
*/
  __pyx_t_11 = __pyx_v_size;
  __pyx_t_12 = __pyx_t_11;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "utils.pxd":7664
 *     # Check
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":7665
 *     for i in range(size):
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    __pyx_t_14 = (__pyx_v_minimum < __pyx_v_v);
    if (__pyx_t_14) {
      __pyx_t_14 = (__pyx_v_v < __pyx_v_maximum);
    }
    __pyx_t_15 = (!__pyx_t_14);
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_15 = (__pyx_v_v != LLONG_MIN);
    __pyx_t_1 = __pyx_t_15;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":7666
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "utils.pxd":7665
 *     for i in range(size):
 *         v = arr_ptr[i]
 *         if not minimum < v < maximum and v != LLONG_MIN:             # <<<<<<<<<<<<<<
 *             return False
 *     return True
*/
    }
  }

  /* "utils.pxd":7667
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":7601
 * 
 * # . range check
 * cdef inline bint is_dt64arr_ns_safe(np.ndarray arr, int arr_reso=-1) except -1:             # <<<<<<<<<<<<<<
 *     """Check if a 1-D array can be safely represented as datetime64[ns] `<'bool'>`.
 * 
*/

  /* function exit code */
  __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("cytimes.utils.is_dt64arr_ns_safe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7690
 *     >>> arr.astype('datetime64[Y]').astype('int64') + 1970 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7691
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *     return arr_add(out, EPOCH_YEAR + offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_out, (__pyx_v_7cytimes_5utils_EPOCH_YEAR + __pyx_v_offset), &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7670
 * 
 * # . access
 * cdef inline np.ndarray dt64arr_year(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract civil year numbers from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7715
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7716
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7717
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7721
 *         np.npy_int64 v, r
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7722
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7724
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7725
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to quarter
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7724
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to quarter
*/
    }

    /* "utils.pxd":7728
 *         # Convert to quarter
 *         with cython.cdivision(True):
 *             r = v % 12             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 r += 12
*/
    __pyx_v_r = (__pyx_v_v % 12);

    /* "utils.pxd":7729
 *         with cython.cdivision(True):
 *             r = v % 12
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7730
 *             r = v % 12
 *             if r < 0:
 *                 r += 12             # <<<<<<<<<<<<<<
 *             out_ptr[i] = (r / 3) + 1 + offset
 * 
*/
      __pyx_v_r = (__pyx_v_r + 12);

      /* "utils.pxd":7729
 *         with cython.cdivision(True):
 *             r = v % 12
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset
*/
    }

    /* "utils.pxd":7731
 *             if r < 0:
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (((__pyx_v_r / 3) + 1) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7733
 *             out_ptr[i] = (r / 3) + 1 + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7693
 *     return arr_add(out, EPOCH_YEAR + offset, False)
 * 
 * cdef inline np.ndarray dt64arr_quarter(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract quarter numbers (1..4) from a 1-D ndarray[datetime64[*]] `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7755
 *     >>> arr.astype('datetime64[M]').astype('int64') % 12 + 1 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 12, offset + 1, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7756
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 12, offset + 1, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = (__pyx_v_offset + 1);
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 12, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7735
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_month(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract month numbers (1..12) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_weekday(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7780
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7781
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7782
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7786
 *         np.npy_int64 v, r
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7787
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7789
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to weekday (0=Monday, 6=Sunday)
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7790
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to weekday (0=Monday, 6=Sunday)
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7789
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to weekday (0=Monday, 6=Sunday)
*/
    }

    /* "utils.pxd":7793
 *         # Convert to weekday (0=Monday, 6=Sunday)
 *         with cython.cdivision(True):
 *             r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             r += 7
*/
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":7794
 *         with cython.cdivision(True):
 *             r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         # Anchor to Thursday (3)
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7795
 *             r = v % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         # Anchor to Thursday (3)
 *         r += 3
*/
      __pyx_v_r = (__pyx_v_r + 7);

      /* "utils.pxd":7794
 *         with cython.cdivision(True):
 *             r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         # Anchor to Thursday (3)
*/
    }

    /* "utils.pxd":7797
 *             r += 7
 *         # Anchor to Thursday (3)
 *         r += 3             # <<<<<<<<<<<<<<
 *         if r >= 7:
 *             r -= 7
*/
    __pyx_v_r = (__pyx_v_r + 3);

    /* "utils.pxd":7798
 *         # Anchor to Thursday (3)
 *         r += 3
 *         if r >= 7:             # <<<<<<<<<<<<<<
 *             r -= 7
 *         out_ptr[i] = r + offset
*/
    __pyx_t_6 = (__pyx_v_r >= 7);
    if (__pyx_t_6) {

      /* "utils.pxd":7799
 *         r += 3
 *         if r >= 7:
 *             r -= 7             # <<<<<<<<<<<<<<
 *         out_ptr[i] = r + offset
 * 
*/
      __pyx_v_r = (__pyx_v_r - 7);

      /* "utils.pxd":7798
 *         # Anchor to Thursday (3)
 *         r += 3
 *         if r >= 7:             # <<<<<<<<<<<<<<
 *             r -= 7
 *         out_ptr[i] = r + offset
*/
    }

    /* "utils.pxd":7800
 *         if r >= 7:
 *             r -= 7
 *         out_ptr[i] = r + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_r + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7802
 *         out_ptr[i] = r + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7758
 *     return arr_mod(out, 12, offset + 1, False)
 * 
 * cdef inline np.ndarray dt64arr_weekday(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract weekday numbers (0=Mon .. 6=Sun) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  npy_int64 __pyx_v_days_bf;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __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("dt64arr_day", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7822
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7823
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":7824
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm, days_bf
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":7828
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm, days_bf
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":7829
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":7831
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":7832
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7831
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":7835
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":7839
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":7840
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":7841
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":7840
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":7842
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":7844
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":7846
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":7848
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":7851
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             out_ptr[i] = 31 + offset
 *             continue
*/
    __pyx_t_7 = (__pyx_v_n100 == 4);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_n1 == 4);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_6) {

      /* "utils.pxd":7852
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             out_ptr[i] = 31 + offset             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = (31 + __pyx_v_offset);

      /* "utils.pxd":7853
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             out_ptr[i] = 31 + offset
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Compute day of month (1..31)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":7851
 * 
 *         # End-of-cycle dates map directly to December 31 (day=31)
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             out_ptr[i] = 31 + offset
 *             continue
*/
    }

    /* "utils.pxd":7856
 * 
 *         # Compute day of month (1..31)
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":7857
 *         # Compute day of month (1..31)
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         mm = (n + 50) >> 5  # initial 1..12 estimate             # <<<<<<<<<<<<<<
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
*/
    __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

    /* "utils.pxd":7858
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)             # <<<<<<<<<<<<<<
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)
*/
    __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm);

    /* "utils.pxd":7859
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset
*/
    __pyx_t_6 = (__pyx_v_days_bf > __pyx_v_n);
    if (__pyx_t_6) {

      /* "utils.pxd":7860
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = (n - days_bf + 1) + offset
 * 
*/
      __pyx_v_days_bf = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, (__pyx_v_mm - 1));

      /* "utils.pxd":7859
 *         mm = (n + 50) >> 5  # initial 1..12 estimate
 *         days_bf = days_bf_month(yy, mm)
 *         if days_bf > n:             # <<<<<<<<<<<<<<
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset
*/
    }

    /* "utils.pxd":7861
 *         if days_bf > n:
 *             days_bf = days_bf_month(yy, mm - 1)
 *         out_ptr[i] = (n - days_bf + 1) + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (((__pyx_v_n - __pyx_v_days_bf) + 1) + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":7863
 *         out_ptr[i] = (n - days_bf + 1) + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7804
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract day-of-month (1..31) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_hour(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_hour", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7885
 *     >>> arr.astype('datetime64[h]').astype('int64') % 24 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_h(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 24, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7886
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 24, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 24, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7865
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_hour(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract hour-of-day (0..23) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_hour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_minute(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_minute", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7908
 *     >>> arr.astype('datetime64[m]').astype('int64') % 60 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_m(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 60, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7909
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 60, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 60, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7888
 *     return arr_mod(out, 24, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_minute(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract minute-of-hour (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_minute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_second(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_second *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_second", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7931
 *     >>> arr.astype('datetime64[s]').astype('int64') % 60 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_s(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 60, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7932
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 60, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 60, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7911
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_second(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract second-of-minute (0..59) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_millisecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_millisecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7954
 *     >>> arr.astype('datetime64[ms]').astype('int64') % 1000 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 1_000, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7955
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 1_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0x3E8, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7934
 *     return arr_mod(out, 60, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_millisecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract millisecond-of-second (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_microsecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_microsecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":7977
 *     >>> arr.astype('datetime64[us]').astype('int64') % 1_000_000 + offset
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":7978
 *     """
 *     cdef np.ndarray out = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *     return arr_mod(out, 1_000_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.offset = __pyx_v_offset;
  __pyx_t_3.copy = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0xF4240, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":7957
 *     return arr_mod(out, 1_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_microsecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract microsecond-of-second (0..999,999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_nanosecond(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_nanosecond", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8001
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8002
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8003
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8003, __pyx_L1_error)

      /* "utils.pxd":8002
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8004
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Compute nanosecond
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8004, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8001
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8008
 *     # Compute nanosecond
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":8009
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         return arr_mod(out, 1_000, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.arr_reso = __pyx_v_arr_reso;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":8010
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return zero for coarser resolutions
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_out, 0x3E8, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8008
 *     # Compute nanosecond
 *     cdef np.ndarray out
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         out = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *         return arr_mod(out, 1_000, offset, False)
*/
  }

  /* "utils.pxd":8013
 * 
 *     # Return zero for coarser resolutions
 *     out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
*/
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8015
 *     out = arr_assure_int64(arr, copy)
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i, v
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8016
 *     cdef:
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i, v
 *     for i in range(size):
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8018
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i, v
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:
*/
  __pyx_t_7 = __pyx_v_size;
  __pyx_t_8 = __pyx_t_7;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "utils.pxd":8020
 *     for i in range(size):
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         out_ptr[i] = offset
*/
    __pyx_t_1 = ((__pyx_v_out_ptr[__pyx_v_i]) == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8021
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         out_ptr[i] = offset
 *     return out
*/
      goto __pyx_L6_continue;

      /* "utils.pxd":8020
 *     for i in range(size):
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         out_ptr[i] = offset
*/
    }

    /* "utils.pxd":8022
 *         if out_ptr[i] == LLONG_MIN:
 *             continue
 *         out_ptr[i] = offset             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_offset;
    __pyx_L6_continue:;
  }

  /* "utils.pxd":8023
 *             continue
 *         out_ptr[i] = offset
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":7980
 *     return arr_mod(out, 1_000_000, offset, False)
 * 
 * cdef inline np.ndarray dt64arr_nanosecond(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract nanosecond-of-microsecond (0..999) from a 1-D ndarray[datetime64[*]] <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_nanosecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_times(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_times *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mod __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_times", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8043
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8044
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8045
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8045, __pyx_L1_error)

      /* "utils.pxd":8044
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8046
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Compute times
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8046, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8043
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8049
 * 
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":8050
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":8051
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8051, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8050
 *     # Compute times
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":8052
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":8053
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8052
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mod(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":8054
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":8055
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8054
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mod(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":8056
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":8057
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8056
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mod(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":8058
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":8059
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, 0x5A0, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8058
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mod(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":8060
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":8061
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(__pyx_v_arr, 24, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8060
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_mod(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
*/
  }

  /* "utils.pxd":8062
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_D:

    /* "utils.pxd":8063
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month
*/
    case NPY_FR_W:

    /* "utils.pxd":8064
 *     if arr_reso in (
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
*/
    case NPY_FR_M:

    /* "utils.pxd":8065
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
 *         np.NPY_DATETIMEUNIT.NPY_FR_M,  # month             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
 *     ):
*/
    case NPY_FR_Y:

    /* "utils.pxd":8068
 *         np.NPY_DATETIMEUNIT.NPY_FR_Y,  # year
 *     ):
 *         return arr_mul(arr, 0, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8062
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_mod(arr, 24, offset, False)
 *     if arr_reso in (             # <<<<<<<<<<<<<<
 *         np.NPY_DATETIMEUNIT.NPY_FR_D,  # day
 *         np.NPY_DATETIMEUNIT.NPY_FR_W,  # week
*/
    break;
    default: break;
  }

  /* "utils.pxd":8071
 * 
 *     # Unsupported resolution
 *     _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 * 
 * # . calendar
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8071, __pyx_L1_error)

  /* "utils.pxd":8025
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_times(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract time-of-day (elapsed since midnight) in the same unit as `arr` <'ndarray[int64]'>.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_times", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isocalendar(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isocalendar *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  __pyx_t_7cytimes_5utils_iso __pyx_v__iso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3[2];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __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_RefNannySetupContext("dt64arr_isocalendar", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8106
 *          [2003   43    1]]
 *     """
 *     arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8109
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8110
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8113
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(2, [size, 3], np.NPY_TYPES.NPY_INT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_3[1] = 3;
  __pyx_t_1 = PyArray_EMPTY(2, __pyx_t_3, NPY_INT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8113, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8114
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(2, [size, 3], np.NPY_TYPES.NPY_INT64, 0)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 *         ymd _ymd
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8119
 *         iso _iso
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8120
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8122
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v
 *         # Calculate ISO calendar (year, week, weekday)
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8123
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v             # <<<<<<<<<<<<<<
 *         # Calculate ISO calendar (year, week, weekday)
 *         else:
*/
      (__pyx_v_out_ptr[0]) = __pyx_v_v;
      (__pyx_v_out_ptr[1]) = __pyx_v_v;
      (__pyx_v_out_ptr[2]) = __pyx_v_v;

      /* "utils.pxd":8122
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[0] = out_ptr[1] = out_ptr[2] = v
 *         # Calculate ISO calendar (year, week, weekday)
*/
      goto __pyx_L5;
    }

    /* "utils.pxd":8126
 *         # Calculate ISO calendar (year, week, weekday)
 *         else:
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year
*/
    /*else*/ {
      __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

      /* "utils.pxd":8127
 *         else:
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week
*/
      __pyx_v__iso = __pyx_f_7cytimes_5utils_ymd_isocalendar(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);

      /* "utils.pxd":8128
 *             _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year             # <<<<<<<<<<<<<<
 *             out_ptr[1] = _iso.week
 *             out_ptr[2] = _iso.weekday
*/
      __pyx_t_8 = __pyx_v__iso.year;
      (__pyx_v_out_ptr[0]) = __pyx_t_8;

      /* "utils.pxd":8129
 *             _iso = ymd_isocalendar(_ymd.year, _ymd.month, _ymd.day)
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week             # <<<<<<<<<<<<<<
 *             out_ptr[2] = _iso.weekday
 *         # Increment +3
*/
      __pyx_t_8 = __pyx_v__iso.week;
      (__pyx_v_out_ptr[1]) = __pyx_t_8;

      /* "utils.pxd":8130
 *             out_ptr[0] = _iso.year
 *             out_ptr[1] = _iso.week
 *             out_ptr[2] = _iso.weekday             # <<<<<<<<<<<<<<
 *         # Increment +3
 *         out_ptr += 3
*/
      __pyx_t_8 = __pyx_v__iso.weekday;
      (__pyx_v_out_ptr[2]) = __pyx_t_8;
    }
    __pyx_L5:;

    /* "utils.pxd":8132
 *             out_ptr[2] = _iso.weekday
 *         # Increment +3
 *         out_ptr += 3             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_v_out_ptr = (__pyx_v_out_ptr + 3);
  }

  /* "utils.pxd":8134
 *         out_ptr += 3
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8074
 * 
 * # . calendar
 * cdef inline np.ndarray dt64arr_isocalendar(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Return ISO-8601 calendar components for each element of a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoyear(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoyear *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoyear", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8155
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8156
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8157
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8162
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8163
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8165
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8166
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8165
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO year
*/
    }

    /* "utils.pxd":8168
 *             continue
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8169
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoyear(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8171
 *         out_ptr[i] = ymd_isoyear(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8136
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoyear(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 year numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweek(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweek *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoweek", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8192
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8193
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8194
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8199
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8200
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8202
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO week
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8203
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8202
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO week
*/
    }

    /* "utils.pxd":8205
 *             continue
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8206
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoweek(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8208
 *         out_ptr[i] = ymd_isoweek(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8173
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweek(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 week numbers from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_isoweekday(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_isoweekday *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_isoweekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8229
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8230
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8231
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8236
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8237
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8239
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO weekday
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8240
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8239
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO weekday
*/
    }

    /* "utils.pxd":8242
 *             continue
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8243
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_ymd_isoweekday(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8245
 *         out_ptr[i] = ymd_isoweekday(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8210
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_isoweekday(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract ISO-8601 weekday numbers (1=Mon .. 7=Sun) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_leap_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_leap_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_is_leap_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8264
 *         NaT values (LLONG_MIN) are emitted as `False`.
 *     """
 *     arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8267
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8268
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8271
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8271, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8272
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8275
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Handle NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8276
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Handle NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8278
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8279
 *         # Handle NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Check leap year
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":8280
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Check leap year
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8278
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":8282
 *             continue
 *         # Check leap year
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_is_leap_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8284
 *         out_ptr[i] = is_leap_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8247
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_leap_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for leap years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_is_long_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_is_long_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  PyArrayObject *__pyx_v_out = 0;
  npy_bool *__pyx_v_out_ptr;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_is_long_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8303
 *         NaT values (LLONG_MIN) are emitted as `False`.
 *     """
 *     arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":8306
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":8307
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         # Output array
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":8310
 *         np.npy_intp i
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)             # <<<<<<<<<<<<<<
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)
 *         np.npy_int64 v
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_BOOL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8310, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8311
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_BOOL, 0)
 *         np.npy_bool* out_ptr = <np.npy_bool*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_int64 v
 * 
*/
  __pyx_v_out_ptr = ((npy_bool *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8314
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Handle NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":8315
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Handle NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":8317
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":8318
 *         # Handle NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False             # <<<<<<<<<<<<<<
 *             continue
 *         # Check long year
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = 0;

      /* "utils.pxd":8319
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Check long year
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8317
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "utils.pxd":8321
 *             continue
 *         # Check long year
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_is_long_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8323
 *         out_ptr[i] = is_long_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8286
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_is_long_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Elementwise check for long years of a 1-D datetime64 array `<'ndarray[bool]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_leap_bt_years(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_year, struct __pyx_opt_args_7cytimes_5utils_dt64arr_leap_bt_years *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_leap_bt_years", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8347
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8348
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8349
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8353
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8354
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8356
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate leap years between
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8357
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate leap years between
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8356
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate leap years between
*/
    }

    /* "utils.pxd":8359
 *             continue
 *         # Calculate leap years between
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_leaps_bt_years((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR), __pyx_v_year);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8361
 *         out_ptr[i] = leaps_bt_years(v + EPOCH_YEAR, year)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8325
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_leap_bt_years(np.ndarray arr, np.npy_int64 year, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Compute the number of leap years between the target `year` and elements
 *     of a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_leap_bt_years", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8382
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8383
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8384
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8388
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8389
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8391
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days in year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8392
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days in year
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8391
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days in year
*/
    }

    /* "utils.pxd":8394
 *             continue
 *         # Get days in year
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8396
 *         out_ptr[i] = days_in_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8363
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days in the year (365/366) from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8418
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8419
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8420
 *         np.ndarray out = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8424
 *         np.npy_int64 v
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8425
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8427
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days before year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8428
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days before year
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8427
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days before year
*/
    }

    /* "utils.pxd":8430
 *             continue
 *         # Get days before year
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_year((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_YEAR));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8432
 *         out_ptr[i] = days_bf_year(v + EPOCH_YEAR)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8398
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the number of days strictly before January 1 of year under the
 *     proleptic Gregorian rules from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_year(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_year *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_day_of_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8453
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8454
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8455
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8460
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8461
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8463
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days of year
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8464
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8463
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days of year
*/
    }

    /* "utils.pxd":8466
 *             continue
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8467
 *         # Get days of year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_day_of_year(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8469
 *         out_ptr[i] = day_of_year(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8434
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_year(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-year from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8491
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8492
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8493
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8498
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8499
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8501
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8502
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8501
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in quarter
*/
    }

    /* "utils.pxd":8504
 *             continue
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8505
 *         # Compute days in quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8507
 *         out_ptr[i] = days_in_quarter(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8471
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar quarter under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8530
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8531
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8532
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8537
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8538
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8540
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8541
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8540
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before quarter
*/
    }

    /* "utils.pxd":8543
 *             continue
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8544
 *         # Compute days before quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8546
 *         out_ptr[i] = days_bf_quarter(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8509
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar quarter under the proleptic Gregorian rules from a 1-D
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_day_of_quarter(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_day_of_quarter *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_day_of_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8568
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8569
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8570
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8575
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8576
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8578
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days of quarter
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8579
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8578
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days of quarter
*/
    }

    /* "utils.pxd":8581
 *             continue
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8582
 *         # Compute days of quarter
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_day_of_quarter(__pyx_v__ymd.year, __pyx_v__ymd.month, __pyx_v__ymd.day);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8584
 *         out_ptr[i] = day_of_quarter(_ymd.year, _ymd.month, _ymd.day)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8548
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_day_of_quarter(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract the 1-based ordinal day-of-quarter from a 1-D datetime64 array `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_in_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_in_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8606
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8607
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8608
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8613
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8614
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8616
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in month
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8617
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8616
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in month
*/
    }

    /* "utils.pxd":8619
 *             continue
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8620
 *         # Compute days in month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8622
 *         out_ptr[i] = days_in_month(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8586
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_in_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days in calendar month under the proleptic Gregorian rules
 *     from a 1-D datetime64 array `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_days_bf_month(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_bf_month *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_days_bf_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }

  /* "utils.pxd":8645
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8646
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8647
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8652
 *         ymd _ymd
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Propagate NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8653
 * 
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Propagate NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8655
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before month
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8656
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8655
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before month
*/
    }

    /* "utils.pxd":8658
 *             continue
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)             # <<<<<<<<<<<<<<
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)
 * 
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY));

    /* "utils.pxd":8659
 *         # Compute days before month
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v__ymd.year, __pyx_v__ymd.month);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8661
 *         out_ptr[i] = days_bf_month(_ymd.year, _ymd.month)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . conversion: int64
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8624
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_days_bf_month(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Extract number of days strictly before the first day of the
 *     calendar month under the proleptic Gregorian rules from a 1-D
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8664
 * 
 * # . conversion: int64
 * cdef inline np.ndarray dt64arr_fr_int64(np.npy_int64 value, np.npy_intp size, str unit):             # <<<<<<<<<<<<<<
 *     """Create a 1-D datetime64 array filled with the specified integer `value` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_fr_int64(npy_int64 __pyx_v_value, npy_intp __pyx_v_size, PyObject *__pyx_v_unit) {
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_fr_int64", 0);

  /* "utils.pxd":8675
 *     >>> np.full(size, value, dtype=f"datetime64[{unit}]")
 *     """
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64(__pyx_v_value, __pyx_v_size)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_str2dt64(__pyx_v_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 8675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 8675, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":8664
 * 
 * # . conversion: int64
 * cdef inline np.ndarray dt64arr_fr_int64(np.npy_int64 value, np.npy_intp size, str unit):             # <<<<<<<<<<<<<<
 *     """Create a 1-D datetime64 array filled with the specified integer `value` `<'ndarray[datetime64]'>`.
 * 
*/

  /* 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("cytimes.utils.dt64arr_fr_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  Py_ssize_t __pyx_v_size;
  Py_UCS4 __pyx_v_ch;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_UCS4 __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8703
 *     >>> arr.astype(f"datetime64[{as_unit}]").astype("int64") + offset
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":8704
 *     """
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t size = str_len(as_unit)
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8704, __pyx_L1_error)

    /* "utils.pxd":8703
 *     >>> arr.astype(f"datetime64[{as_unit}]").astype("int64") + offset
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  }

  /* "utils.pxd":8706
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
 *         Py_ssize_t size = str_len(as_unit)             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_size = PyUnicode_GET_LENGTH(__pyx_v_as_unit);

  /* "utils.pxd":8710
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
*/
  __pyx_t_1 = (__pyx_v_size == 1);
  if (__pyx_t_1) {

    /* "utils.pxd":8711
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8711, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":8712
 *     if size == 1:
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x73);
    if (__pyx_t_1) {

      /* "utils.pxd":8713
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 3;
      __pyx_t_4.arr_reso = __pyx_v_arr_reso;
      __pyx_t_4.offset = __pyx_v_offset;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8712
 *     if size == 1:
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    }

    /* "utils.pxd":8714
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":8715
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_5.__pyx_n = 3;
      __pyx_t_5.arr_reso = __pyx_v_arr_reso;
      __pyx_t_5.offset = __pyx_v_offset;
      __pyx_t_5.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8714
 *         if ch == "s":
 *             return dt64arr_as_int64_s(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
*/
    }

    /* "utils.pxd":8716
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x68);
    if (__pyx_t_1) {

      /* "utils.pxd":8717
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6.__pyx_n = 3;
      __pyx_t_6.arr_reso = __pyx_v_arr_reso;
      __pyx_t_6.offset = __pyx_v_offset;
      __pyx_t_6.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8716
 *         if ch == "m":
 *             return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
*/
    }

    /* "utils.pxd":8718
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "utils.pxd":8719
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7.__pyx_n = 3;
      __pyx_t_7.arr_reso = __pyx_v_arr_reso;
      __pyx_t_7.offset = __pyx_v_offset;
      __pyx_t_7.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8718
 *         if ch == "h":
 *             return dt64arr_as_int64_h(arr, arr_reso, offset, copy)
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
*/
    }

    /* "utils.pxd":8720
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
*/
    __pyx_t_1 = (__pyx_v_ch == 87);
    if (__pyx_t_1) {

      /* "utils.pxd":8721
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 3;
      __pyx_t_8.arr_reso = __pyx_v_arr_reso;
      __pyx_t_8.offset = __pyx_v_offset;
      __pyx_t_8.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8720
 *         if ch == "D":
 *             return dt64arr_as_int64_D(arr, arr_reso, offset, copy)
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
*/
    }

    /* "utils.pxd":8722
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
*/
    __pyx_t_1 = (__pyx_v_ch == 77);
    if (__pyx_t_1) {

      /* "utils.pxd":8723
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_9.__pyx_n = 3;
      __pyx_t_9.arr_reso = __pyx_v_arr_reso;
      __pyx_t_9.offset = __pyx_v_offset;
      __pyx_t_9.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8722
 *         if ch == "W":
 *             return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
*/
    }

    /* "utils.pxd":8724
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
*/
    __pyx_t_1 = (__pyx_v_ch == 81);
    if (__pyx_t_1) {

      /* "utils.pxd":8725
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "Y":
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 3;
      __pyx_t_10.arr_reso = __pyx_v_arr_reso;
      __pyx_t_10.offset = __pyx_v_offset;
      __pyx_t_10.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8724
 *         if ch == "M":
 *             return dt64arr_as_int64_M(arr, arr_reso, offset, copy)
 *         if ch == "Q":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
*/
    }

    /* "utils.pxd":8726
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 89);
    if (__pyx_t_1) {

      /* "utils.pxd":8727
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ns', 'us', 'ms'
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_11.__pyx_n = 3;
      __pyx_t_11.arr_reso = __pyx_v_arr_reso;
      __pyx_t_11.offset = __pyx_v_offset;
      __pyx_t_11.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8726
 *         if ch == "Q":
 *             return dt64arr_as_int64_Q(arr, arr_reso, offset, copy)
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_Y(arr, arr_reso, offset, copy)
 * 
*/
    }

    /* "utils.pxd":8710
 * 
 *     # Unit: 's', 'm', 'h', 'D', 'M', 'Y'
 *     if size == 1:             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "s":
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":8730
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
*/
  __pyx_t_12 = (__pyx_v_size == 2);
  if (__pyx_t_12) {
  } else {
    __pyx_t_1 = __pyx_t_12;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 1); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8730, __pyx_L1_error)
  __pyx_t_12 = (__pyx_t_2 == 0x73);
  __pyx_t_1 = __pyx_t_12;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":8731
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)             # <<<<<<<<<<<<<<
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
*/
    __pyx_t_2 = PyUnicode_ReadChar(__pyx_v_as_unit, 0); if (unlikely(__pyx_t_2 == ((Py_UCS4)-1))) __PYX_ERR(5, 8731, __pyx_L1_error)
    __pyx_v_ch = __pyx_t_2;

    /* "utils.pxd":8732
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6E);
    if (__pyx_t_1) {

      /* "utils.pxd":8733
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_13.__pyx_n = 3;
      __pyx_t_13.arr_reso = __pyx_v_arr_reso;
      __pyx_t_13.offset = __pyx_v_offset;
      __pyx_t_13.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8732
 *     elif size == 2 and str_read(as_unit, 1) == "s":
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
*/
    }

    /* "utils.pxd":8734
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    __pyx_t_1 = (__pyx_v_ch == 0x75);
    if (__pyx_t_1) {

      /* "utils.pxd":8735
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 *         if ch == "m":
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_14.__pyx_n = 3;
      __pyx_t_14.arr_reso = __pyx_v_arr_reso;
      __pyx_t_14.offset = __pyx_v_offset;
      __pyx_t_14.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8734
 *         if ch == "n":
 *             return dt64arr_as_int64_ns(arr, arr_reso, offset, copy)
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
*/
    }

    /* "utils.pxd":8736
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
 * 
*/
    __pyx_t_1 = (__pyx_v_ch == 0x6D);
    if (__pyx_t_1) {

      /* "utils.pxd":8737
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_arr_reso;
      __pyx_t_15.offset = __pyx_v_offset;
      __pyx_t_15.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8737, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":8736
 *         if ch == "u":
 *             return dt64arr_as_int64_us(arr, arr_reso, offset, copy)
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return dt64arr_as_int64_ms(arr, arr_reso, offset, copy)
 * 
*/
    }

    /* "utils.pxd":8730
 * 
 *     # Unit: 'ns', 'us', 'ms'
 *     elif size == 2 and str_read(as_unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch = str_read(as_unit, 0)
 *         if ch == "n":
*/
    goto __pyx_L4;
  }

  /* "utils.pxd":8740
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 * 
*/
  __pyx_t_12 = (__pyx_v_size == 3);
  if (__pyx_t_12) {
  } else {
    __pyx_t_1 = __pyx_t_12;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_as_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(5, 8740, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_12;
  __pyx_L18_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":8741
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.arr_reso = __pyx_v_arr_reso;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8740
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and as_unit == "min":             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_m(arr, arr_reso, offset, copy)
 * 
*/
  }
  __pyx_L4:;

  /* "utils.pxd":8744
 * 
 *     # Unsupported unit
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8744, __pyx_L1_error)

  /* "utils.pxd":8677
 *     return arr_fill_int64(value, size).astype(nptime_unit_str2dt64(unit))
 * 
 * cdef inline np.ndarray dt64arr_as_int64(np.ndarray arr, str as_unit, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 ticks in the requested unit `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_Y", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8769
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8770
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8771
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8771, __pyx_L1_error)

      /* "utils.pxd":8770
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8772
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[Y]
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8772, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8769
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8775
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":8776
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8777
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[M]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8775
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  }

  /* "utils.pxd":8780
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":8781
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 12, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8782
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 12, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8780
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_div_floor(arr, 12, offset, False)
*/
  }

  /* "utils.pxd":8786
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_arr_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8787
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8788
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8793
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":8794
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8796
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8797
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":8796
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":8800
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":8804
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":8805
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":8806
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":8805
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":8807
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":8809
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":8811
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":8813
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # Compute the year
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":8816
 * 
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":8817
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
*/
    __pyx_t_11 = (__pyx_v_n100 == 4);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_n1 == 4);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":8818
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
 * 
*/
      __pyx_v_yy = (__pyx_v_yy - 1);

      /* "utils.pxd":8817
 *         # Compute the year
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
*/
    }

    /* "utils.pxd":8819
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1
 *         out_ptr[i] = yy - EPOCH_YEAR + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((__pyx_v_yy - __pyx_v_7cytimes_5utils_EPOCH_YEAR) + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":8821
 *         out_ptr[i] = yy - EPOCH_YEAR + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8746
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, as_unit)
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Y(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 year ticks (Y) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_Y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_Q(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Q *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_Q", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8846
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8847
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8848
 *         np.ndarray out = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8853
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # preserve NaT value
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8854
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # preserve NaT value
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8856
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert months to quarters
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8857
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert months to quarters
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8856
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert months to quarters
*/
    }

    /* "utils.pxd":8860
 *         # convert months to quarters
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 3);
    __pyx_v_r = (__pyx_v_v % 3);

    /* "utils.pxd":8861
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":8862
 *             q = v / 3; r = v % 3
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":8861
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":8863
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8865
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8823
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_Q(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 quarter ticks (Q) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_Q", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_n;
  npy_int64 __pyx_v_r;
  npy_int64 __pyx_v_n400;
  npy_int64 __pyx_v_n100;
  npy_int64 __pyx_v_n4;
  npy_int64 __pyx_v_n1;
  npy_int64 __pyx_v_yy;
  npy_int64 __pyx_v_mm;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_7;
  npy_intp __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_M", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":8890
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":8891
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":8892
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 8892, __pyx_L1_error)

      /* "utils.pxd":8891
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":8893
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[Y]
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 8893, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":8890
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":8896
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":8897
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 12, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8898
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: datetime64[M]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 12, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8896
 * 
 *     # Fast-path: datetime64[Y]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_mul(arr, 12, offset, False)
*/
  }

  /* "utils.pxd":8901
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":8902
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 * 
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.copy = __pyx_v_copy;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":8903
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":8901
 * 
 *     # Fast-path: datetime64[M]
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         arr = arr_assure_int64(arr, copy)
 *         return arr_add(arr, offset, False)
*/
  }

  /* "utils.pxd":8907
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.arr_reso = __pyx_v_arr_reso;
  __pyx_t_7.offset = 0;
  __pyx_t_7.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 8907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":8908
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8909
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, n, r, n400, n100, n4, n1, yy, mm
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8914
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_8 = __pyx_v_size;
  __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;

    /* "utils.pxd":8915
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8917
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    __pyx_t_1 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_1) {

      /* "utils.pxd":8918
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "utils.pxd":8917
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "utils.pxd":8921
 * 
 *         # Convert to 0-based offset from 0001-01-01
 *         n = v + EPOCH_DAY - 1             # <<<<<<<<<<<<<<
 * 
 *         with cython.cdivision(True):
*/
    __pyx_v_n = ((__pyx_v_v + __pyx_v_7cytimes_5utils_EPOCH_DAY) - 1);

    /* "utils.pxd":8925
 *         with cython.cdivision(True):
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
*/
    __pyx_v_n400 = (__pyx_v_n / 0x23AB1);
    __pyx_v_r = (__pyx_v_n % 0x23AB1);

    /* "utils.pxd":8926
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {

      /* "utils.pxd":8927
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:
 *                 n400 -= 1; r += 146_097             # <<<<<<<<<<<<<<
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
*/
      __pyx_v_n400 = (__pyx_v_n400 - 1);
      __pyx_v_r = (__pyx_v_r + 0x23AB1);

      /* "utils.pxd":8926
 *             # Number of complete 400-year cycles
 *             n400 = n / 146_097; r = n % 146_097
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 n400 -= 1; r += 146_097
 *             n = r
*/
    }

    /* "utils.pxd":8928
 *             if r < 0:
 *                 n400 -= 1; r += 146_097
 *             n = r             # <<<<<<<<<<<<<<
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524
*/
    __pyx_v_n = __pyx_v_r;

    /* "utils.pxd":8930
 *             n = r
 *             # Number of complete 100-year cycles within the 400-year cycle
 *             n100 = n / 36_524;  n %= 36_524             # <<<<<<<<<<<<<<
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461
*/
    __pyx_v_n100 = (__pyx_v_n / 0x8EAC);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x8EAC, 1);

    /* "utils.pxd":8932
 *             n100 = n / 36_524;  n %= 36_524
 *             # Number of complete 4-year cycles within the 100-year cycle
 *             n4   = n / 1_461;   n %= 1_461             # <<<<<<<<<<<<<<
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365
*/
    __pyx_v_n4 = (__pyx_v_n / 0x5B5);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x5B5, 1);

    /* "utils.pxd":8934
 *             n4   = n / 1_461;   n %= 1_461
 *             # Number of complete years within the 4-year cycle
 *             n1   = n / 365;     n %= 365             # <<<<<<<<<<<<<<
 * 
 *         # Compute year & month
*/
    __pyx_v_n1 = (__pyx_v_n / 0x16D);
    __pyx_v_n = __Pyx_mod_npy_int64(__pyx_v_n, 0x16D, 1);

    /* "utils.pxd":8937
 * 
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1             # <<<<<<<<<<<<<<
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1; mm = 12
*/
    __pyx_v_yy = (((((__pyx_v_n400 * 0x190) + (__pyx_v_n100 * 0x64)) + (__pyx_v_n4 * 4)) + __pyx_v_n1) + 1);

    /* "utils.pxd":8938
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1; mm = 12
 *         else:
*/
    __pyx_t_11 = (__pyx_v_n100 == 4);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_n1 == 4);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_1) {

      /* "utils.pxd":8939
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates
 *             yy -= 1; mm = 12             # <<<<<<<<<<<<<<
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
*/
      __pyx_v_yy = (__pyx_v_yy - 1);
      __pyx_v_mm = 12;

      /* "utils.pxd":8938
 *         # Compute year & month
 *         yy = n400 * 400 + n100 * 100 + n4 * 4 + n1 + 1
 *         if n100 == 4 or n1 == 4:  # end-of-cycle dates             # <<<<<<<<<<<<<<
 *             yy -= 1; mm = 12
 *         else:
*/
      goto __pyx_L11;
    }

    /* "utils.pxd":8941
 *             yy -= 1; mm = 12
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate             # <<<<<<<<<<<<<<
 *             if days_bf_month(yy, mm) > n:
 *                 mm -= 1
*/
    /*else*/ {
      __pyx_v_mm = ((__pyx_v_n + 50) >> 5);

      /* "utils.pxd":8942
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:             # <<<<<<<<<<<<<<
 *                 mm -= 1
 * 
*/
      __pyx_t_1 = (__pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_yy, __pyx_v_mm) > __pyx_v_n);
      if (__pyx_t_1) {

        /* "utils.pxd":8943
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:
 *                 mm -= 1             # <<<<<<<<<<<<<<
 * 
 *         # Total months since epoch
*/
        __pyx_v_mm = (__pyx_v_mm - 1);

        /* "utils.pxd":8942
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:             # <<<<<<<<<<<<<<
 *                 mm -= 1
 * 
*/
      }
    }
    __pyx_L11:;

    /* "utils.pxd":8946
 * 
 *         # Total months since epoch
 *         out_ptr[i] = (yy - EPOCH_YEAR) * 12 + (mm - 1) + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((((__pyx_v_yy - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12) + (__pyx_v_mm - 1)) + __pyx_v_offset);
    __pyx_L7_continue:;
  }

  /* "utils.pxd":8948
 *         out_ptr[i] = (yy - EPOCH_YEAR) * 12 + (mm - 1) + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8867
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_M(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 month ticks (M) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_M", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_W", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":8973
 *     """
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":8974
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":8975
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":8980
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # preserve NaT value
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":8981
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # preserve NaT value
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":8983
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert days to weeks
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":8984
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert days to weeks
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":8983
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert days to weeks
*/
    }

    /* "utils.pxd":8987
 *         # convert days to weeks
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 7);
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":8988
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_6 = (__pyx_v_r < 0);
    if (__pyx_t_6) {

      /* "utils.pxd":8989
 *             q = v / 7; r = v % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":8988
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":8990
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L3_continue:;
  }

  /* "utils.pxd":8992
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":8950
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_W(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_W", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9017
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9018
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9019
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9019, __pyx_L1_error)

      /* "utils.pxd":9018
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9020
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9020, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9017
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9023
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9024
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9025
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9025, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9024
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9026
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9027
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9026
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9028
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9029
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9028
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9030
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9031
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9030
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9032
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9033
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 0x5A0, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9032
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9034
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9035
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 24, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9034
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 1440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9036
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9037
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9036
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_div_floor(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9038
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9039
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 7, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9038
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9040
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9041
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 1;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9040
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9042
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9043
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 1;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9042
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1, offset, False)
 * 
*/
  }

  /* "utils.pxd":9046
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_D); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9046, __pyx_L1_error)

  /* "utils.pxd":8994
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_int64_D(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 day ticks (D) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_h", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9071
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9072
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9073
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9073, __pyx_L1_error)

      /* "utils.pxd":9072
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9074
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9074, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9071
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9077
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9078
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9079
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9078
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9080
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9081
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9080
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9082
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9083
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9082
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9084
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9085
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9084
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9086
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9087
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, 60, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9086
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9088
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9089
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9088
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_div_floor(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9090
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9091
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 24, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9090
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9092
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9093
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0xa8, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9092
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9094
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9095
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 24;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9094
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 24 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9096
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9097
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 24;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9096
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 24, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 24, offset, False)
 * 
*/
  }

  /* "utils.pxd":9100
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_h); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9100, __pyx_L1_error)

  /* "utils.pxd":9048
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "D")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_h(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 hour ticks (h) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_h", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_m", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9125
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9126
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9127
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9127, __pyx_L1_error)

      /* "utils.pxd":9126
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9128
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9128, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9125
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9131
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9132
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9133
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9132
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9134
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9135
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9134
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9136
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9137
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9136
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9138
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9139
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9138
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9140
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9141
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9140
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_div_floor(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9142
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9143
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 60, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9142
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9144
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9145
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x5A0, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9144
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, 60, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9146
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9147
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x2760, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9146
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9148
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9149
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = 0x5A0;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9148
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, 1_440 * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9150
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9151
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = 0x5A0;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9150
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, 1_440, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, 1_440, offset, False)
 * 
*/
  }

  /* "utils.pxd":9154
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_m); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9154, __pyx_L1_error)

  /* "utils.pxd":9102
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "h")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_m(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 minute ticks (m) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_m", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_s", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9179
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9180
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9181
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9181, __pyx_L1_error)

      /* "utils.pxd":9180
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9182
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9182, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9179
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9185
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9186
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9187
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9186
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9188
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9189
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9188
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9190
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9191
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9190
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9192
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9193
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9192
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_div_floor(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9194
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9195
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9194
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9196
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9197
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9196
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, SS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9198
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9199
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9198
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, SS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9200
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9201
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_SS_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9200
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9202
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9203
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_SS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9202
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, SS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9204
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9205
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_SS_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9204
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, SS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, SS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9208
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9208, __pyx_L1_error)

  /* "utils.pxd":9156
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "m")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_s(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 second ticks (s) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_ms", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9233
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9234
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9235
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9235, __pyx_L1_error)

      /* "utils.pxd":9234
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9236
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9236, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9233
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9239
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9240
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9241
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9240
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9242
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9243
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9242
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9244
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9245
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9244
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_div_floor(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9246
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9247
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9246
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9248
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9249
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9248
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, MS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9250
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9251
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9250
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, MS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9252
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9253
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9252
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, MS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9254
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9255
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_MS_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9254
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9256
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9257
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_MS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9256
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, MS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9258
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9259
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_MS_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9258
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, MS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, MS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9262
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_ms); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9262, __pyx_L1_error)

  /* "utils.pxd":9210
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "s")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ms(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 millisecond ticks (ms) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9287
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9288
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9289
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9289, __pyx_L1_error)

      /* "utils.pxd":9288
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9290
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9290, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9287
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9293
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9294
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9295
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9294
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9296
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9297
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9296
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9298
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9299
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9298
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9300
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9301
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9300
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9302
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9303
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9302
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9304
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9305
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9304
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9306
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9307
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9306
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9308
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9309
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_US_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9308
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9310
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9311
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9310
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9312
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9313
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.factor = __pyx_v_7cytimes_5utils_US_DAY;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9312
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, US_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9316
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9316, __pyx_L1_error)

  /* "utils.pxd":9264
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ms")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_int64_ns", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9341
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9342
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9343
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9343, __pyx_L1_error)

      /* "utils.pxd":9342
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9344
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9344, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9341
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9347
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":9348
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9349
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 1;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9348
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":9350
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":9351
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9350
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":9352
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":9353
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9352
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
*/
  }

  /* "utils.pxd":9354
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":9355
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9354
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, NS_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
*/
  }

  /* "utils.pxd":9356
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":9357
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9356
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:  # second
 *         return arr_mul(arr, NS_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
*/
  }

  /* "utils.pxd":9358
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":9359
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9358
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:  # minute
 *         return arr_mul(arr, NS_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
*/
  }

  /* "utils.pxd":9360
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":9361
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9360
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:  # hour
 *         return arr_mul(arr, NS_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
*/
  }

  /* "utils.pxd":9362
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":9363
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_NS_DAY * 7), &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9362
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:  # day
 *         return arr_mul(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
*/
  }

  /* "utils.pxd":9364
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":9365
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.factor = __pyx_v_7cytimes_5utils_NS_DAY;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9364
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:  # week
 *         return arr_mul(arr, NS_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month             # <<<<<<<<<<<<<<
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
*/
  }

  /* "utils.pxd":9366
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":9367
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.factor = __pyx_v_7cytimes_5utils_NS_DAY;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9366
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:  # month
 *         return _dt64arr_M_as_int64_D(arr, NS_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:  # year             # <<<<<<<<<<<<<<
 *         return _dt64arr_Y_as_int64_D(arr, NS_DAY, offset, False)
 * 
*/
  }

  /* "utils.pxd":9370
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_ns); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9370, __pyx_L1_error)

  /* "utils.pxd":9318
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray dt64arr_as_int64_ns(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 nanosecond ticks (ns) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_int64_ns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_Y_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils__dt64arr_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  npy_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64_Y_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9388
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9389
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9390
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9395
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":9396
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9398
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":9399
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9398
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "utils.pxd":9401
 *             continue
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.factor = __pyx_v_factor;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_7 = __pyx_f_7cytimes_5utils__dt64_Y_as_int64_D(__pyx_v_v, &__pyx_t_8); 
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_t_7;
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9403
 *         out_ptr[i] = _dt64_Y_as_int64_D(v, factor, offset)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9372
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "ns")
 * 
 * cdef inline np.ndarray _dt64arr_Y_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[Y]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_M_as_int64_D(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils__dt64arr_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_factor = ((npy_int64)1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  npy_intp __pyx_t_3;
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  int __pyx_t_6;
  npy_int64 __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__dt64_M_as_int64_D __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_factor = __pyx_optional_args->factor;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9421
 *     # Setup
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9422
 *     cdef:
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9423
 *         np.ndarray out = arr_assure_int64(arr, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, yy_ep, yy, mm, leaps
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9428
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_3 = __pyx_v_size;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "utils.pxd":9429
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9431
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    __pyx_t_6 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_6) {

      /* "utils.pxd":9432
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9431
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "utils.pxd":9434
 *             continue
 *         # Convert to day resolution
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.factor = __pyx_v_factor;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_7 = __pyx_f_7cytimes_5utils__dt64_M_as_int64_D(__pyx_v_v, &__pyx_t_8); 
    (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_t_7;
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9436
 *         out_ptr[i] = _dt64_M_as_int64_D(v, factor, offset)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9405
 *     return out
 * 
 * cdef inline np.ndarray _dt64arr_M_as_int64_D(np.ndarray arr, np.npy_int64 factor=1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert an ndarray[datetime64[M]] to int64 day ticks (D), then
 *     scale by `factor` and add `offset` `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_W_iso(PyArrayObject *__pyx_v_arr, int __pyx_v_weekday, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_W_iso *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  npy_int64 __pyx_v_adj;
  PyArrayObject *__pyx_v_out = 0;
  npy_int64 *__pyx_v_out_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_8;
  npy_intp __pyx_t_9;
  npy_intp __pyx_t_10;
  npy_intp __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_W_iso", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9467
 * 
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)             # <<<<<<<<<<<<<<
 *     if adj == 0:
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
*/
  __pyx_t_1 = 7;
  __pyx_t_2 = 1;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_5 = (__pyx_t_2 > __pyx_t_3);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_2 = __pyx_t_4;
  __pyx_t_5 = (__pyx_t_1 < __pyx_t_2);
  if (__pyx_t_5) {
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_v_adj = (4 - __pyx_t_4);

  /* "utils.pxd":9468
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 * 
*/
  __pyx_t_5 = (__pyx_v_adj == 0);
  if (__pyx_t_5) {

    /* "utils.pxd":9469
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = __pyx_v_arr_reso;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = __pyx_v_copy;
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_r = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9468
 *     # Fast-path
 *     cdef np.npy_int64 adj = 4 - min(max(weekday, 1), 7)
 *     if adj == 0:             # <<<<<<<<<<<<<<
 *         return dt64arr_as_int64_W(arr, arr_reso, offset, copy)
 * 
*/
  }

  /* "utils.pxd":9473
 *     # Setup
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]
*/
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.arr_reso = __pyx_v_arr_reso;
  __pyx_t_8.offset = 0;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_out = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "utils.pxd":9474
 *     cdef:
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = out.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_out_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9475
 *         np.ndarray out = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *         np.npy_int64* out_ptr = <np.npy_int64*> np.PyArray_DATA(out)
 *         np.npy_intp size = out.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_out)[0]);

  /* "utils.pxd":9480
 * 
 *     # Compute
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = out_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_9 = __pyx_v_size;
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "utils.pxd":9481
 *     # Compute
 *     for i in range(size):
 *         v = out_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_out_ptr[__pyx_v_i]);

    /* "utils.pxd":9483
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Aligned to the specified weekday
*/
    __pyx_t_5 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_5) {

      /* "utils.pxd":9484
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Aligned to the specified weekday
 *         v += adj
*/
      goto __pyx_L4_continue;

      /* "utils.pxd":9483
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Aligned to the specified weekday
*/
    }

    /* "utils.pxd":9486
 *             continue
 *         # Aligned to the specified weekday
 *         v += adj             # <<<<<<<<<<<<<<
 *         # Convert to week resolution
 *         with cython.cdivision(True):
*/
    __pyx_v_v = (__pyx_v_v + __pyx_v_adj);

    /* "utils.pxd":9489
 *         # Convert to week resolution
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7             # <<<<<<<<<<<<<<
 *         if r < 0:
 *             q -= 1
*/
    __pyx_v_q = (__pyx_v_v / 7);
    __pyx_v_r = (__pyx_v_v % 7);

    /* "utils.pxd":9490
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    __pyx_t_5 = (__pyx_v_r < 0);
    if (__pyx_t_5) {

      /* "utils.pxd":9491
 *             q = v / 7; r = v % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *         out_ptr[i] = q + offset
 * 
*/
      __pyx_v_q = (__pyx_v_q - 1);

      /* "utils.pxd":9490
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "utils.pxd":9492
 *         if r < 0:
 *             q -= 1
 *         out_ptr[i] = q + offset             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = (__pyx_v_q + __pyx_v_offset);
    __pyx_L4_continue:;
  }

  /* "utils.pxd":9494
 *         out_ptr[i] = q + offset
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9438
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_as_W_iso(np.ndarray arr, int weekday, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 week ticks (W) aligned to an ISO weekday `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_W_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ord(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_to_ord", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }

  /* "utils.pxd":9520
 *     >>> arr.astype("datetime64[D]").astype("int64") + 719163 + offset
 *     """
 *     return dt64arr_as_int64_D(arr, arr_reso, EPOCH_DAY + offset, copy)             # <<<<<<<<<<<<<<
 * 
 * # . conversion: float64
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = (__pyx_v_7cytimes_5utils_EPOCH_DAY + __pyx_v_offset);
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "utils.pxd":9496
 *     return out
 * 
 * cdef inline np.ndarray dt64arr_to_ord(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to int64 proleptic
 *     Gregorian ordinals `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_to_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_to_ts(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ts *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  npy_int64 *__pyx_v_arr_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_v;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_v_out = 0;
  npy_float64 *__pyx_v_out_ptr;
  npy_float64 __pyx_v_inv_us;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_2;
  npy_intp __pyx_t_3[1];
  npy_intp __pyx_t_4;
  npy_intp __pyx_t_5;
  npy_intp __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_to_ts", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9546
 *     >>> arr.astype("datetime64[us]").astype("int64") / 1_000_000
 *     """
 *     arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)  # int64[us]             # <<<<<<<<<<<<<<
 *     cdef:
 *         # Target array
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.arr_reso = __pyx_v_arr_reso;
  __pyx_t_2.offset = 0;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":9549
 *     cdef:
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)             # <<<<<<<<<<<<<<
 *         np.npy_intp size = arr.shape[0]
 *         np.npy_intp i
*/
  __pyx_v_arr_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_arr));

  /* "utils.pxd":9550
 *         # Target array
 *         np.npy_int64* arr_ptr = <np.npy_int64*> np.PyArray_DATA(arr)
 *         np.npy_intp size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         np.npy_intp i
 *         np.npy_int64 v, q, r
*/
  __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

  /* "utils.pxd":9554
 *         np.npy_int64 v, q, r
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_FLOAT64, 0)             # <<<<<<<<<<<<<<
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)
 *         # Pre-computed
*/
  __pyx_t_3[0] = __pyx_v_size;
  __pyx_t_1 = PyArray_EMPTY(1, __pyx_t_3, NPY_FLOAT64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9554, __pyx_L1_error)
  __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":9555
 *         # Output array
 *         np.ndarray out = np.PyArray_EMPTY(1, [size], np.NPY_TYPES.NPY_FLOAT64, 0)
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)             # <<<<<<<<<<<<<<
 *         # Pre-computed
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND
*/
  __pyx_v_out_ptr = ((npy_float64 *)PyArray_DATA(__pyx_v_out));

  /* "utils.pxd":9557
 *         np.npy_float64* out_ptr = <np.npy_float64*> np.PyArray_DATA(out)
 *         # Pre-computed
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND             # <<<<<<<<<<<<<<
 * 
 *     for i in range(size):
*/
  if (unlikely(((npy_float64)__pyx_v_7cytimes_5utils_US_SECOND) == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "float division");
    __PYX_ERR(5, 9557, __pyx_L1_error)
  }
  __pyx_v_inv_us = (((npy_float64)1.0) / ((npy_float64)__pyx_v_7cytimes_5utils_US_SECOND));

  /* "utils.pxd":9559
 *         np.npy_float64 inv_us = 1.0 / <np.npy_float64> US_SECOND
 * 
 *     for i in range(size):             # <<<<<<<<<<<<<<
 *         v = arr_ptr[i]
 *         # Preserve NaT
*/
  __pyx_t_4 = __pyx_v_size;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "utils.pxd":9560
 * 
 *     for i in range(size):
 *         v = arr_ptr[i]             # <<<<<<<<<<<<<<
 *         # Preserve NaT
 *         if v == LLONG_MIN:
*/
    __pyx_v_v = (__pyx_v_arr_ptr[__pyx_v_i]);

    /* "utils.pxd":9562
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = math.NAN
 *             continue
*/
    __pyx_t_7 = (__pyx_v_v == LLONG_MIN);
    if (__pyx_t_7) {

      /* "utils.pxd":9563
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             out_ptr[i] = math.NAN             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to seconds
*/
      (__pyx_v_out_ptr[__pyx_v_i]) = NAN;

      /* "utils.pxd":9564
 *         if v == LLONG_MIN:
 *             out_ptr[i] = math.NAN
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to seconds
 *         #: r in C semantics can be negative; normalize to 0 <= r < US_SECOND
*/
      goto __pyx_L3_continue;

      /* "utils.pxd":9562
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = math.NAN
 *             continue
*/
    }

    /* "utils.pxd":9568
 *         #: r in C semantics can be negative; normalize to 0 <= r < US_SECOND
 *         with cython.cdivision(True):
 *             r = v % US_SECOND             # <<<<<<<<<<<<<<
 *             if r < 0:
 *                 r += US_SECOND
*/
    __pyx_v_r = (__pyx_v_v % __pyx_v_7cytimes_5utils_US_SECOND);

    /* "utils.pxd":9569
 *         with cython.cdivision(True):
 *             r = v % US_SECOND
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
*/
    __pyx_t_7 = (__pyx_v_r < 0);
    if (__pyx_t_7) {

      /* "utils.pxd":9570
 *             r = v % US_SECOND
 *             if r < 0:
 *                 r += US_SECOND             # <<<<<<<<<<<<<<
 *             #: (v - r) is an exact multiple of US_SECOND
 *             q = (v - r) / US_SECOND
*/
      __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":9569
 *         with cython.cdivision(True):
 *             r = v % US_SECOND
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
*/
    }

    /* "utils.pxd":9572
 *                 r += US_SECOND
 *             #: (v - r) is an exact multiple of US_SECOND
 *             q = (v - r) / US_SECOND             # <<<<<<<<<<<<<<
 *         #: Combine whole seconds and sub-second fraction
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q
*/
    __pyx_v_q = ((__pyx_v_v - __pyx_v_r) / ((npy_int64)__pyx_v_7cytimes_5utils_US_SECOND));

    /* "utils.pxd":9574
 *             q = (v - r) / US_SECOND
 *         #: Combine whole seconds and sub-second fraction
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    (__pyx_v_out_ptr[__pyx_v_i]) = ((((npy_float64)__pyx_v_r) * __pyx_v_inv_us) + ((npy_float64)__pyx_v_q));
    __pyx_L3_continue:;
  }

  /* "utils.pxd":9576
 *         out_ptr[i] = (<np.npy_float64> r * inv_us) + <np.npy_float64> q
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * # . conversion: unit
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "utils.pxd":9523
 * 
 * # . conversion: float64
 * cdef inline np.ndarray dt64arr_to_ts(np.ndarray arr, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[datetime64[*]] to float64 Unix timestamps `<'ndarray[float64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_to_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_unit(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_as_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_limit = ((int)0);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_as_reso;
  int __pyx_v_is_ns_safe;
  PyObject *__pyx_v_as_dtype = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  PyObject *__pyx_t_10[5];
  size_t __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_us __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ns __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_ms __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_s __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_m __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_h __pyx_t_21;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_W __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_as_unit", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_limit = __pyx_optional_args->limit;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":9611
 *     """
 *     # Guard
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_as_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":9612
 *     # Guard
 *     if as_unit is None:
 *         _raise_invalid_nptime_str_unit_error(as_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_as_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9612, __pyx_L1_error)

    /* "utils.pxd":9611
 *     """
 *     # Guard
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 * 
*/
  }

  /* "utils.pxd":9615
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":9616
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9617
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":9618
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9618, __pyx_L1_error)

      /* "utils.pxd":9617
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9619
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9619, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9616
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9622
 * 
 *     # Parse target resolution
 *     cdef int as_reso = nptime_unit_str2int(as_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Check limit
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_as_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9622, __pyx_L1_error)
  __pyx_v_as_reso = __pyx_t_2;

  /* "utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  if (__pyx_v_limit) {

    /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    switch (__pyx_v_as_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9627
 *     if limit:
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
*/
      case NPY_FR_us:

      /* "utils.pxd":9628
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
*/
      case NPY_FR_ms:

      /* "utils.pxd":9629
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (
*/
      case NPY_FR_s:

      /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
      __pyx_t_3 = 0;
      break;
      default:
      __pyx_t_3 = 1;
      break;
    }
    __pyx_t_4 = __pyx_t_3;
    if (!__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L8_bool_binop_done;
    }

    /* "utils.pxd":9631
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9632
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
*/
      case NPY_FR_us:

      /* "utils.pxd":9633
 *         ) or arr_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
*/
      case NPY_FR_ms:

      /* "utils.pxd":9634
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ):
*/
      case NPY_FR_s:

      /* "utils.pxd":9631
 *             np.NPY_DATETIMEUNIT.NPY_FR_ms,
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ) or arr_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
      __pyx_t_4 = 0;
      break;
      default:
      __pyx_t_4 = 1;
      break;
    }
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L8_bool_binop_done:;

    /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    if (unlikely(__pyx_t_1)) {

      /* "utils.pxd":9637
 *             np.NPY_DATETIMEUNIT.NPY_FR_s,
 *         ):
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
*/
      __pyx_t_6 = NULL;

      /* "utils.pxd":9640
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
 *                 % (nptime_unit_int2str(arr_reso), nptime_unit_int2str(as_reso))             # <<<<<<<<<<<<<<
 *             )
 * 
*/
      __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_as_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_array_from_dateti;
      __pyx_t_10[1] = __pyx_t_8;
      __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_to_datetime64;
      __pyx_t_10[3] = __pyx_t_9;
      __pyx_t_10[4] = __pyx_mstate_global->__pyx_kp_u_Conversion_limits_to_units_betw;

      /* "utils.pxd":9638
 *         ):
 *             raise ValueError(
 *                 "Cannot convert array from datetime64[%s] to datetime64[%s].\n"             # <<<<<<<<<<<<<<
 *                 "Conversion limits to units between: 's', 'ms', 'us', 'ns'."
 *                 % (nptime_unit_int2str(arr_reso), nptime_unit_int2str(as_reso))
*/
      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, 37 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 61, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9638, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9637, __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(5, 9637, __pyx_L1_error)

      /* "utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    }

    /* "utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  }

  /* "utils.pxd":9644
 * 
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso == __pyx_v_as_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":9645
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":9646
 *     if arr_reso == as_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_12.__pyx_n = 1;
      __pyx_t_12.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9645
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":9647
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     # To nanosecond [ns]
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9647, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9644
 * 
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
  }

  /* "utils.pxd":9651
 *     # To nanosecond [ns]
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None             # <<<<<<<<<<<<<<
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # check 'ns' overflow
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_as_dtype = Py_None;

  /* "utils.pxd":9652
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
*/
  switch (__pyx_v_as_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":9654
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.arr_reso = __pyx_v_arr_reso;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9654, __pyx_L1_error)
    __pyx_v_is_ns_safe = __pyx_t_1;

    /* "utils.pxd":9656
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 if is_dt64:
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_us:

      /* "utils.pxd":9657
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
      __pyx_t_1 = (!__pyx_v_is_ns_safe);
      if (__pyx_t_1) {

        /* "utils.pxd":9658
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:
 *                 if is_dt64:             # <<<<<<<<<<<<<<
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
        if (__pyx_v_is_dt64) {

          /* "utils.pxd":9659
 *             if not is_ns_safe:
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag             # <<<<<<<<<<<<<<
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
*/
          __Pyx_XDECREF((PyObject *)__pyx_r);
          __pyx_t_12.__pyx_n = 1;
          __pyx_t_12.copy = __pyx_v_copy;
          __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_r = ((PyArrayObject *)__pyx_t_5);
          __pyx_t_5 = 0;
          goto __pyx_L0;

          /* "utils.pxd":9658
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:
 *                 if is_dt64:             # <<<<<<<<<<<<<<
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
        }

        /* "utils.pxd":9660
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 9660, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9660, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9657
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 if is_dt64:
 *                     return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
      }

      /* "utils.pxd":9656
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
 *         # my_unit [us] -> [ns]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 if is_dt64:
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9662
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9663
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_1 = (!__pyx_v_is_ns_safe);
      if (__pyx_t_1) {

        /* "utils.pxd":9664
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
*/
        __pyx_t_14.__pyx_n = 3;
        __pyx_t_14.arr_reso = __pyx_v_arr_reso;
        __pyx_t_14.offset = 0;
        __pyx_t_14.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9665
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_NS)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9665, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9663
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             if not is_ns_safe:             # <<<<<<<<<<<<<<
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":9666
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_NS)
 *         # Fallback [rest] -> [ns]
*/
      __pyx_t_15.__pyx_n = 3;
      __pyx_t_15.arr_reso = __pyx_v_arr_reso;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ns(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9667
 *                 return arr.astype(DT64_DTYPE_US)
 *             arr = dt64arr_as_int64_ns(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ns]
 *         as_dtype = DT64_DTYPE_NS if is_ns_safe else DT64_DTYPE_US
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9667, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9662
 *                 return arr.astype(nptime_unit_int2dt64(arr_reso))
 *         # my_unit [M, Y] -> [ns]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             if not is_ns_safe:
 *                 arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9669
 *             return arr.astype(DT64_DTYPE_NS)
 *         # Fallback [rest] -> [ns]
 *         as_dtype = DT64_DTYPE_NS if is_ns_safe else DT64_DTYPE_US             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
    if (__pyx_v_is_ns_safe) {
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
      __pyx_t_5 = __pyx_v_7cytimes_5utils_DT64_DTYPE_NS;
    } else {
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
      __pyx_t_5 = __pyx_v_7cytimes_5utils_DT64_DTYPE_US;
    }
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "utils.pxd":9652
 *     cdef bint is_ns_safe
 *     cdef object as_dtype = None
 *     if as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # check 'ns' overflow
 *         is_ns_safe = is_dt64arr_ns_safe(arr, arr_reso)
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":9674
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9675
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9675, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9676
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9677
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9677, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9678
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9678, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9678, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9675
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
      }

      /* "utils.pxd":9674
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9680
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9681
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Fallback [rest] -> [us]
*/
      __pyx_t_14.__pyx_n = 3;
      __pyx_t_14.arr_reso = __pyx_v_arr_reso;
      __pyx_t_14.offset = 0;
      __pyx_t_14.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_us(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9682
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [us]
 *         as_dtype = DT64_DTYPE_US
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9682, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9680
 *                 return arr.astype(DT64_DTYPE_US)
 *         # my_unit [M, Y] -> [us]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_us(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9684
 *             return arr.astype(DT64_DTYPE_US)
 *         # Fallback [rest] -> [us]
 *         as_dtype = DT64_DTYPE_US             # <<<<<<<<<<<<<<
 * 
 *     # To millisecond [ms]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_US);

    /* "utils.pxd":9672
 * 
 *     # To microsecond [us]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":9689
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9690
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9690, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9691
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_MS)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9692
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9693
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9693, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9693, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9690
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MILLISECOND, 0, False)
*/
      }

      /* "utils.pxd":9689
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9695
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9696
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Fallback [rest] -> [ms]
*/
      __pyx_t_18.__pyx_n = 3;
      __pyx_t_18.arr_reso = __pyx_v_arr_reso;
      __pyx_t_18.offset = 0;
      __pyx_t_18.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_ms(__pyx_v_arr, &__pyx_t_18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9697
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MS
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9697, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9697, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9695
 *                 return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [M, Y] -> [ms]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_ms(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9699
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MS             # <<<<<<<<<<<<<<
 * 
 *     # To second [s]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS);

    /* "utils.pxd":9687
 * 
 *     # To millisecond [ms]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":9704
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9705
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9705, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9706
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_SS)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9707
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9707, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9708
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9708, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9708, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9705
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_SECOND, 0, False)
*/
      }

      /* "utils.pxd":9704
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9710
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9711
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Fallback [rest] -> [s]
*/
      __pyx_t_19.__pyx_n = 3;
      __pyx_t_19.arr_reso = __pyx_v_arr_reso;
      __pyx_t_19.offset = 0;
      __pyx_t_19.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_s(__pyx_v_arr, &__pyx_t_19)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9712
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [s]
 *         as_dtype = DT64_DTYPE_SS
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9712, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9710
 *                 return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [M, Y] -> [s]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_s(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9714
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Fallback [rest] -> [s]
 *         as_dtype = DT64_DTYPE_SS             # <<<<<<<<<<<<<<
 * 
 *     # To minute [m]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS);

    /* "utils.pxd":9702
 * 
 *     # To second [s]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":9719
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9720
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9720, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9721
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_MI)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9722
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9722, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9723
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9723, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9723, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9720
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_MINUTE, 0, False)
*/
      }

      /* "utils.pxd":9719
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9725
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9726
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Fallback [rest] -> [m]
*/
      __pyx_t_20.__pyx_n = 3;
      __pyx_t_20.arr_reso = __pyx_v_arr_reso;
      __pyx_t_20.offset = 0;
      __pyx_t_20.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_m(__pyx_v_arr, &__pyx_t_20)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9727
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [m]
 *         as_dtype = DT64_DTYPE_MI
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9727, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9725
 *                 return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [M, Y] -> [m]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_m(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9729
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Fallback [rest] -> [m]
 *         as_dtype = DT64_DTYPE_MI             # <<<<<<<<<<<<<<
 * 
 *     # To hour [h]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI);

    /* "utils.pxd":9717
 * 
 *     # To minute [m]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":9734
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9735
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9735, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9736
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_HH)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9736, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9737
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9738
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9738, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9735
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_HOUR, 0, False)
*/
      }

      /* "utils.pxd":9734
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9740
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9741
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Fallback [rest] -> [h]
*/
      __pyx_t_21.__pyx_n = 3;
      __pyx_t_21.arr_reso = __pyx_v_arr_reso;
      __pyx_t_21.offset = 0;
      __pyx_t_21.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_h(__pyx_v_arr, &__pyx_t_21)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9742
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [h]
 *         as_dtype = DT64_DTYPE_HH
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9742, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9740
 *                 return arr.astype(DT64_DTYPE_HH)
 *         # my_unit [M, Y] -> [h]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_h(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9744
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Fallback [rest] -> [h]
 *         as_dtype = DT64_DTYPE_HH             # <<<<<<<<<<<<<<
 * 
 *     # To day [D]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH);

    /* "utils.pxd":9732
 * 
 *     # To hour [h]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":9749
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9750
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_3 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 9750, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "utils.pxd":9751
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_DD)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9751, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9752
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9753
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9753, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9753, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9750
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY, 0, False)
*/
      }

      /* "utils.pxd":9749
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9755
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9756
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_DD)
 *         # Fallback [rest] -> [D]
*/
      __pyx_t_22.__pyx_n = 3;
      __pyx_t_22.arr_reso = __pyx_v_arr_reso;
      __pyx_t_22.offset = 0;
      __pyx_t_22.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_22)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9757
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [D]
 *         as_dtype = DT64_DTYPE_DD
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9757, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9757, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9755
 *                 return arr.astype(DT64_DTYPE_DD)
 *         # my_unit [M, Y] -> [D]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_D(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_DD)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9759
 *             return arr.astype(DT64_DTYPE_DD)
 *         # Fallback [rest] -> [D]
 *         as_dtype = DT64_DTYPE_DD             # <<<<<<<<<<<<<<
 * 
 *     # To week [W]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD);

    /* "utils.pxd":9747
 * 
 *     # To day [D]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_W:

    /* "utils.pxd":9764
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":9765
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
*/
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_13); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9765, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_1);
      if (__pyx_t_3) {

        /* "utils.pxd":9766
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
 *                 return arr.astype(DT64_DTYPE_WW)
*/
        __pyx_t_16.__pyx_n = 1;
        __pyx_t_16.copy = __pyx_v_copy;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9767
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
*/
        __pyx_t_17.__pyx_n = 2;
        __pyx_t_17.offset = 0;
        __pyx_t_17.copy = 0;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, (__pyx_v_7cytimes_5utils_NS_DAY * 7), &__pyx_t_17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9767, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
        __pyx_t_5 = 0;

        /* "utils.pxd":9768
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
 *                 return arr.astype(DT64_DTYPE_WW)             # <<<<<<<<<<<<<<
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_7 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9768, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9768, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "utils.pxd":9765
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_assure_int64(arr, copy)
 *                 arr = arr_div_floor(arr, NS_DAY * 7, 0, False)
*/
      }

      /* "utils.pxd":9764
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_assure_int64(arr, copy)
*/
      break;
      case NPY_FR_M:

      /* "utils.pxd":9770
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)
*/
      case NPY_FR_Y:

      /* "utils.pxd":9771
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_WW)
 *         # Fallback [rest] -> [W]
*/
      __pyx_t_23.__pyx_n = 3;
      __pyx_t_23.arr_reso = __pyx_v_arr_reso;
      __pyx_t_23.offset = 0;
      __pyx_t_23.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_W(__pyx_v_arr, &__pyx_t_23)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9772
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [W]
 *         as_dtype = DT64_DTYPE_WW
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9772, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9772, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9770
 *                 return arr.astype(DT64_DTYPE_WW)
 *         # my_unit [M, Y] -> [W]
 *         elif arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_M, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_W(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_WW)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9774
 *             return arr.astype(DT64_DTYPE_WW)
 *         # Fallback [rest] -> [W]
 *         as_dtype = DT64_DTYPE_WW             # <<<<<<<<<<<<<<
 * 
 *     # To month [M]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_WW);

    /* "utils.pxd":9762
 * 
 *     # To week [W]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [W]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_M:

    /* "utils.pxd":9779
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:
      case NPY_FR_Y:

      /* "utils.pxd":9780
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MM)
 *         # Fallback [rest] -> [ms]
*/
      __pyx_t_24.__pyx_n = 3;
      __pyx_t_24.arr_reso = __pyx_v_arr_reso;
      __pyx_t_24.offset = 0;
      __pyx_t_24.copy = __pyx_v_copy;
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_24)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "utils.pxd":9781
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)             # <<<<<<<<<<<<<<
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MM
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_7 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_MM};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9781, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "utils.pxd":9779
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):             # <<<<<<<<<<<<<<
 *             arr = dt64arr_as_int64_M(arr, arr_reso, 0, copy)
 *             return arr.astype(DT64_DTYPE_MM)
*/
      break;
      default: break;
    }

    /* "utils.pxd":9783
 *             return arr.astype(DT64_DTYPE_MM)
 *         # Fallback [rest] -> [ms]
 *         as_dtype = DT64_DTYPE_MM             # <<<<<<<<<<<<<<
 * 
 *     # To year [Y]
*/
    __Pyx_INCREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_v_7cytimes_5utils_DT64_DTYPE_MM);

    /* "utils.pxd":9777
 * 
 *     # To month [M]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:             # <<<<<<<<<<<<<<
 *         # my_unit [ns, Y] -> [M]
 *         if arr_reso in (np.NPY_DATETIMEUNIT.NPY_FR_ns, np.NPY_DATETIMEUNIT.NPY_FR_Y):
*/
    break;
    case NPY_FR_Y:

    /* "utils.pxd":9787
 *     # To year [Y]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)             # <<<<<<<<<<<<<<
 *         return arr.astype(DT64_DTYPE_YY)
 * 
*/
    __pyx_t_25.__pyx_n = 3;
    __pyx_t_25.arr_reso = __pyx_v_arr_reso;
    __pyx_t_25.offset = 0;
    __pyx_t_25.copy = __pyx_v_copy;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "utils.pxd":9788
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         return arr.astype(DT64_DTYPE_YY)             # <<<<<<<<<<<<<<
 * 
 *     # Fallback
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_7cytimes_5utils_DT64_DTYPE_YY};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9788, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9786
 * 
 *     # To year [Y]
 *     elif as_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         arr = dt64arr_as_int64_Y(arr, arr_reso, 0, copy)
 *         return arr.astype(DT64_DTYPE_YY)
*/
    break;
    default: break;
  }

  /* "utils.pxd":9791
 * 
 *     # Fallback
 *     if not is_dt64:             # <<<<<<<<<<<<<<
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
*/
  __pyx_t_3 = (!__pyx_v_is_dt64);
  if (__pyx_t_3) {

    /* "utils.pxd":9792
 *     # Fallback
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)
*/
    __pyx_t_7 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 9792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9792, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "utils.pxd":9791
 * 
 *     # Fallback
 *     if not is_dt64:             # <<<<<<<<<<<<<<
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
*/
  }

  /* "utils.pxd":9793
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:             # <<<<<<<<<<<<<<
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)
*/
  __pyx_t_3 = (__pyx_v_as_dtype == Py_None);
  if (__pyx_t_3) {

    /* "utils.pxd":9794
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)             # <<<<<<<<<<<<<<
 *     return arr.astype(as_dtype)
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_as_reso); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_as_dtype, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "utils.pxd":9793
 *     if not is_dt64:
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:             # <<<<<<<<<<<<<<
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)
*/
  }

  /* "utils.pxd":9795
 *     if as_dtype is None:
 *         as_dtype = nptime_unit_int2dt64(as_reso)
 *     return arr.astype(as_dtype)             # <<<<<<<<<<<<<<
 * 
 * # . manipulation
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6 = ((PyObject *)__pyx_v_arr);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_11 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_as_dtype};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 9795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9795, __pyx_L1_error)
  __pyx_r = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "utils.pxd":9579
 * 
 * # . conversion: unit
 * cdef inline np.ndarray dt64arr_as_unit(np.ndarray arr, str as_unit, int arr_reso=-1, bint limit=False, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D datetime64 array to a specifc NumPy datetime64 unit `<'ndarray[datetime64]'>`
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_as_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_as_dtype);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_add_delta(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_dt64arr_add_delta *__pyx_optional_args) {
  npy_int64 __pyx_v_years = ((npy_int64)0);
  npy_int64 __pyx_v_quarters = ((npy_int64)0);
  npy_int64 __pyx_v_months = ((npy_int64)0);
  npy_int64 __pyx_v_weeks = ((npy_int64)0);
  npy_int64 __pyx_v_days = ((npy_int64)0);
  npy_int64 __pyx_v_hours = ((npy_int64)0);
  npy_int64 __pyx_v_minutes = ((npy_int64)0);
  npy_int64 __pyx_v_seconds = ((npy_int64)0);
  npy_int64 __pyx_v_milliseconds = ((npy_int64)0);
  npy_int64 __pyx_v_microseconds = ((npy_int64)0);
  npy_int64 __pyx_v_nanoseconds = ((npy_int64)0);
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dates = 0;
  npy_int64 __pyx_v_delta;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_v_times = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date __pyx_t_4;
  npy_int64 __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_11;
  size_t __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_add_delta", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                        if (__pyx_optional_args->__pyx_n > 10) {
                          __pyx_v_nanoseconds = __pyx_optional_args->nanoseconds;
                          if (__pyx_optional_args->__pyx_n > 11) {
                            __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "utils.pxd":9833
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9834
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9835
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9835, __pyx_L1_error)

      /* "utils.pxd":9834
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9836
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'ns'
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9836, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9833
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9839
 * 
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return _dt64arr_ns_add_delta(
 *             arr, years, quarters, months, weeks, days,
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":9840
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         return _dt64arr_ns_add_delta(             # <<<<<<<<<<<<<<
 *             arr, years, quarters, months, weeks, days,
 *             hours, minutes, seconds, milliseconds,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "utils.pxd":9843
 *             arr, years, quarters, months, weeks, days,
 *             hours, minutes, seconds, milliseconds,
 *             microseconds, nanoseconds             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds, __pyx_v_nanoseconds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9839
 * 
 *     # Resolution: 'ns'
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return _dt64arr_ns_add_delta(
 *             arr, years, quarters, months, weeks, days,
*/
  }

  /* "utils.pxd":9847
 * 
 *     # Adjust dates -> int64[D]
 *     cdef np.ndarray dates = _dt64arr_add_delta_date(arr, years, quarters, months, weeks, days, arr_reso)             # <<<<<<<<<<<<<<
 * 
 *     # Total time delta in 'us'
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.arr_reso = __pyx_v_arr_reso;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dates = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":9851
 *     # Total time delta in 'us'
 *     cdef np.npy_int64 delta, q, r
 *     if nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
*/
  __pyx_t_1 = (__pyx_v_nanoseconds != 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9853
 *     if nanoseconds != 0:
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND             # <<<<<<<<<<<<<<
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:
*/
    __pyx_v_q = (__pyx_v_nanoseconds / ((npy_int64)__pyx_v_7cytimes_5utils_NS_MICROSECOND));
    __pyx_v_r = (__pyx_v_nanoseconds % __pyx_v_7cytimes_5utils_NS_MICROSECOND);

    /* "utils.pxd":9854
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)             # <<<<<<<<<<<<<<
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:
 *         delta = (
*/
    __pyx_t_1 = (__pyx_v_r < 0);
    if (__pyx_t_1) {
      __pyx_t_5 = (__pyx_v_q - 1);
    } else {
      __pyx_t_5 = __pyx_v_q;
    }
    __pyx_v_microseconds = (__pyx_v_microseconds + __pyx_t_5);

    /* "utils.pxd":9851
 *     # Total time delta in 'us'
 *     cdef np.npy_int64 delta, q, r
 *     if nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
*/
  }

  /* "utils.pxd":9855
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
*/
  __pyx_t_6 = (__pyx_v_hours != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_minutes != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_seconds != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_milliseconds != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_6 = (__pyx_v_microseconds != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":9859
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
 *             + milliseconds * US_MILLISECOND
 *             + microseconds             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
    __pyx_v_delta = ((((((__pyx_v_hours * 0xE10) + (__pyx_v_minutes * 60)) + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_US_SECOND) + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_US_MILLISECOND)) + __pyx_v_microseconds);

    /* "utils.pxd":9855
 *             q = nanoseconds / NS_MICROSECOND; r = nanoseconds % NS_MICROSECOND
 *             microseconds += (q - 1 if r < 0 else q)
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * US_SECOND
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":9862
 *         )
 *     else:
 *         delta = 0             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'us'
*/
  /*else*/ {
    __pyx_v_delta = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":9866
 *     # Resolution: 'us'
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_us:

    /* "utils.pxd":9867
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_us;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9868
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9869
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'ms'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9869, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9869, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9866
 *     # Resolution: 'us'
 *     cdef np.ndarray times
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, delta, True)
 *         dates = arr_mul(dates, US_DAY, 0, False)
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":9873
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9875
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_MILLISECOND));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_MILLISECOND);

      /* "utils.pxd":9876
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9873
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
*/
    }

    /* "utils.pxd":9877
 *                 q = delta / US_MILLISECOND; r = delta % US_MILLISECOND
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, MS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_ms;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9878
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9879
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ms, delta, True)
 *         dates = arr_mul(dates, MS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 's'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9879, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9872
 * 
 *     # Resolution: 'ms'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":9883
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9885
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_SECOND));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_SECOND);

      /* "utils.pxd":9886
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9883
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_SECOND; r = delta % US_SECOND
*/
    }

    /* "utils.pxd":9887
 *                 q = delta / US_SECOND; r = delta % US_SECOND
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, SS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_s;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9888
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9889
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_s, delta, True)
 *         dates = arr_mul(dates, SS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'm'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9889, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9882
 * 
 *     # Resolution: 's'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":9893
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9895
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_MINUTE));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_MINUTE);

      /* "utils.pxd":9896
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9893
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
*/
    }

    /* "utils.pxd":9897
 *                 q = delta / US_MINUTE; r = delta % US_MINUTE
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, 1_440, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_m;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9898
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, 0x5A0, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9899
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_m, delta, True)
 *         dates = arr_mul(dates, 1_440, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'h'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9899, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9892
 * 
 *     # Resolution: 'm'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":9903
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9905
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_HOUR));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_HOUR);

      /* "utils.pxd":9906
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9903
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_HOUR; r = delta % US_HOUR
*/
    }

    /* "utils.pxd":9907
 *                 q = delta / US_HOUR; r = delta % US_HOUR
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, 24, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.arr_reso = NPY_FR_h;
    __pyx_t_7.offset = __pyx_v_delta;
    __pyx_t_7.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":9908
 *                 delta = q - 1 if r < 0 else q
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)
 * 
*/
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, 24, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":9909
 *         times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_h, delta, True)
 *         dates = arr_mul(dates, 24, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'D'
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9909, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9902
 * 
 *     # Resolution: 'h'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":9913
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
*/
    __pyx_t_1 = (__pyx_v_delta != 0);
    if (__pyx_t_1) {

      /* "utils.pxd":9915
 *         if delta != 0:
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY             # <<<<<<<<<<<<<<
 *                 delta = q - 1 if r < 0 else q
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)
*/
      __pyx_v_q = (__pyx_v_delta / ((npy_int64)__pyx_v_7cytimes_5utils_US_DAY));
      __pyx_v_r = (__pyx_v_delta % __pyx_v_7cytimes_5utils_US_DAY);

      /* "utils.pxd":9916
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
 *                 delta = q - 1 if r < 0 else q             # <<<<<<<<<<<<<<
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)
 * 
*/
      __pyx_t_1 = (__pyx_v_r < 0);
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_q - 1);
      } else {
        __pyx_t_5 = __pyx_v_q;
      }
      __pyx_v_delta = __pyx_t_5;

      /* "utils.pxd":9913
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         if delta != 0:             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = delta / US_DAY; r = delta % US_DAY
*/
    }

    /* "utils.pxd":9917
 *                 q = delta / US_DAY; r = delta % US_DAY
 *                 delta = q - 1 if r < 0 else q
 *         return arr_add(dates, delta, False).astype(DT64_DTYPE_DD)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dates, __pyx_v_delta, &__pyx_t_13)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 9917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
    __Pyx_INCREF(__pyx_t_10);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_7cytimes_5utils_DT64_DTYPE_DD};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 9917, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9912
 * 
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    default: break;
  }

  /* "utils.pxd":9920
 * 
 *     # Unsupported array resolution
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Cannot add delta to ndarray[%s].\n"
 *         "Supported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'." % (arr.dtype)
*/
  __pyx_t_9 = NULL;

  /* "utils.pxd":9922
 *     raise ValueError(
 *         "Cannot add delta to ndarray[%s].\n"
 *         "Supported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'." % (arr.dtype)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_14 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Cannot_add_delta_to_ndarray_s_Su, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 9922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 9920, __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(5, 9920, __pyx_L1_error)

  /* "utils.pxd":9798
 * 
 * # . manipulation
 * cdef inline np.ndarray dt64arr_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years=0, np.npy_int64 quarters=0, np.npy_int64 months=0, np.npy_int64 weeks=0, np.npy_int64 days=0,
 *     np.npy_int64 hours=0, np.npy_int64 minutes=0, np.npy_int64 seconds=0, np.npy_int64 milliseconds=0,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_years, npy_int64 __pyx_v_quarters, npy_int64 __pyx_v_months, npy_int64 __pyx_v_weeks, npy_int64 __pyx_v_days, struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dateM = 0;
  PyArrayObject *__pyx_v_dateD = 0;
  PyArrayObject *__pyx_v_delta = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_M __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_add_delta_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":9963
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":9964
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":9965
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 9965, __pyx_L1_error)

      /* "utils.pxd":9964
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":9966
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     cdef np.ndarray dateM, dateD, delta
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 9966, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":9963
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":9970
 *     cdef np.ndarray dateM, dateD, delta
 *     # Year/Quarter/Month -> int64[M] -> int64[D]
 *     if years != 0 or quarters != 0 or months != 0:             # <<<<<<<<<<<<<<
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
*/
  __pyx_t_3 = (__pyx_v_years != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_quarters != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_months != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_1) {

    /* "utils.pxd":9972
 *     if years != 0 or quarters != 0 or months != 0:
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         #: add 'months' delta
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)
*/
    __pyx_t_5.__pyx_n = 3;
    __pyx_t_5.arr_reso = __pyx_v_arr_reso;
    __pyx_t_5.offset = 0;
    __pyx_t_5.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_M(__pyx_v_arr, &__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9974
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
 *         #: add 'months' delta
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)             # <<<<<<<<<<<<<<
 *         #: compute the maximum days in the target month
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)
*/
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateM, (((__pyx_v_years * 12) + (__pyx_v_quarters * 3)) + __pyx_v_months), &__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "utils.pxd":9976
 *         dateM = arr_add(dateM, years * 12 + quarters * 3 + months, False)
 *         #: compute the maximum days in the target month
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)             # <<<<<<<<<<<<<<
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)
*/
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.arr_reso = NPY_FR_M;
    __pyx_t_7.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9978
 *         delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, True)
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)             # <<<<<<<<<<<<<<
 *         #: compute original day and clamp to max days in month
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = NPY_FR_M;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "utils.pxd":9980
 *         dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, False)
 *         #: compute original day and clamp to max days in month
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)             # <<<<<<<<<<<<<<
 *         #: add back original day-1 (0-based) and 'days' delta
 *         return arr_add_arr(dateD, delta, weeks * 7 + days - 1, False)
*/
    __pyx_t_9.__pyx_n = 3;
    __pyx_t_9.arr_reso = __pyx_v_arr_reso;
    __pyx_t_9.offset = 0;
    __pyx_t_9.copy = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 9980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_4), &__pyx_t_11)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_10));
    __pyx_t_10 = 0;

    /* "utils.pxd":9982
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
 *         #: add back original day-1 (0-based) and 'days' delta
 *         return arr_add_arr(dateD, delta, weeks * 7 + days - 1, False)             # <<<<<<<<<<<<<<
 *     # Weeks/Days -> int64[D]
 *     else:
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = (((__pyx_v_weeks * 7) + __pyx_v_days) - 1);
    __pyx_t_12.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_12)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L0;

    /* "utils.pxd":9970
 *     cdef np.ndarray dateM, dateD, delta
 *     # Year/Quarter/Month -> int64[M] -> int64[D]
 *     if years != 0 or quarters != 0 or months != 0:             # <<<<<<<<<<<<<<
 *         #: convert to int64[M]
 *         dateM = dt64arr_as_int64_M(arr, arr_reso, 0, True)
*/
  }

  /* "utils.pxd":9986
 *     else:
 *         #: convert to int64[D]
 *         dateD = dt64arr_as_int64_D(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         #: add weeks/days delta
 *         return arr_add(dateD, weeks * 7 + days, False)
*/
  /*else*/ {
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.arr_reso = __pyx_v_arr_reso;
    __pyx_t_8.offset = 0;
    __pyx_t_8.copy = 1;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_dateD = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;

    /* "utils.pxd":9988
 *         dateD = dt64arr_as_int64_D(arr, arr_reso, 0, True)
 *         #: add weeks/days delta
 *         return arr_add(dateD, weeks * 7 + days, False)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateD, ((__pyx_v_weeks * 7) + __pyx_v_days), &__pyx_t_6)); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 9988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_r = ((PyArrayObject *)__pyx_t_10);
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":9925
 *     )
 * 
 * cdef inline np.ndarray _dt64arr_add_delta_date(np.ndarray arr, np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """(internal) Apply only the calendar delta (Y/Q/M/W/D) to an ndarray[datetime64]
 *     and return `int64` day ticks `<'ndarray[int64]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_add_delta_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":9990
 *         return arr_add(dateD, weeks * 7 + days, False)
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days,
 *     np.npy_int64 hours, np.npy_int64 minutes, np.npy_int64 seconds, np.npy_int64 milliseconds,
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__dt64arr_ns_add_delta(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_years, npy_int64 __pyx_v_quarters, npy_int64 __pyx_v_months, npy_int64 __pyx_v_weeks, npy_int64 __pyx_v_days, npy_int64 __pyx_v_hours, npy_int64 __pyx_v_minutes, npy_int64 __pyx_v_seconds, npy_int64 __pyx_v_milliseconds, npy_int64 __pyx_v_microseconds, npy_int64 __pyx_v_nanoseconds) {
  PyArrayObject *__pyx_v_dates = 0;
  PyArrayObject *__pyx_v_times = 0;
  npy_int64 *__pyx_v_dates_ptr;
  npy_int64 *__pyx_v_times_ptr;
  npy_intp __pyx_v_size;
  npy_intp __pyx_v_i;
  npy_int64 __pyx_v_delta;
  npy_int64 __pyx_v_d;
  npy_int64 __pyx_v_t;
  npy_int64 __pyx_v_q;
  npy_int64 __pyx_v_r;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils__dt64arr_add_delta_date __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_times __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  npy_intp __pyx_t_6;
  npy_intp __pyx_t_7;
  npy_intp __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_14;
  size_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dt64arr_ns_add_delta", 0);

  /* "utils.pxd":10025
 *     """
 *     # Adjust dates -> int64[D]
 *     cdef np.ndarray dates = _dt64arr_add_delta_date(arr, years, quarters, months, weeks, days, np.NPY_DATETIMEUNIT.NPY_FR_ns)             # <<<<<<<<<<<<<<
 * 
 *     # Adjust times -> int64[ns]
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.arr_reso = NPY_FR_ns;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils__dt64arr_add_delta_date(__pyx_v_arr, __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dates = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":10029
 *     # Adjust times -> int64[ns]
 *     cdef:
 *         np.ndarray times = dt64arr_times(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns, 0, True)             # <<<<<<<<<<<<<<
 *         np.npy_int64* dates_ptr
 *         np.npy_int64* times_ptr
*/
  __pyx_t_3.__pyx_n = 3;
  __pyx_t_3.arr_reso = NPY_FR_ns;
  __pyx_t_3.offset = 0;
  __pyx_t_3.copy = 1;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_times(__pyx_v_arr, &__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_times = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "utils.pxd":10034
 *         np.npy_intp size, i
 *         np.npy_int64 delta, d, t, q, r
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0 or nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * NS_SECOND
*/
  __pyx_t_5 = (__pyx_v_hours != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_minutes != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_seconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_milliseconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_microseconds != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = (__pyx_v_nanoseconds != 0);
  __pyx_t_4 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "utils.pxd":10039
 *             + milliseconds * NS_MILLISECOND
 *             + microseconds * NS_MICROSECOND
 *             + nanoseconds             # <<<<<<<<<<<<<<
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
*/
    __pyx_v_delta = (((((((__pyx_v_hours * 0xE10) + (__pyx_v_minutes * 60)) + __pyx_v_seconds) * __pyx_v_7cytimes_5utils_NS_SECOND) + (__pyx_v_milliseconds * __pyx_v_7cytimes_5utils_NS_MILLISECOND)) + (__pyx_v_microseconds * __pyx_v_7cytimes_5utils_NS_MICROSECOND)) + __pyx_v_nanoseconds);

    /* "utils.pxd":10041
 *             + nanoseconds
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)             # <<<<<<<<<<<<<<
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]
*/
    __pyx_v_dates_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_dates));

    /* "utils.pxd":10042
 *         )
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)             # <<<<<<<<<<<<<<
 *         size = arr.shape[0]
 *         for i in range(size):
*/
    __pyx_v_times_ptr = ((npy_int64 *)PyArray_DATA(__pyx_v_times));

    /* "utils.pxd":10043
 *         dates_ptr = <np.npy_int64*> np.PyArray_DATA(dates)
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Preserve NaT
*/
    __pyx_v_size = (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]);

    /* "utils.pxd":10044
 *         times_ptr = <np.npy_int64*> np.PyArray_DATA(times)
 *         size = arr.shape[0]
 *         for i in range(size):             # <<<<<<<<<<<<<<
 *             # Preserve NaT
 *             d = dates_ptr[i]
*/
    __pyx_t_6 = __pyx_v_size;
    __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;

      /* "utils.pxd":10046
 *         for i in range(size):
 *             # Preserve NaT
 *             d = dates_ptr[i]             # <<<<<<<<<<<<<<
 *             if d == LLONG_MIN:
 *                 continue
*/
      __pyx_v_d = (__pyx_v_dates_ptr[__pyx_v_i]);

      /* "utils.pxd":10047
 *             # Preserve NaT
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             t = times_ptr[i]
*/
      __pyx_t_4 = (__pyx_v_d == LLONG_MIN);
      if (__pyx_t_4) {

        /* "utils.pxd":10048
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":10047
 *             # Preserve NaT
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             t = times_ptr[i]
*/
      }

      /* "utils.pxd":10049
 *             if d == LLONG_MIN:
 *                 continue
 *             t = times_ptr[i]             # <<<<<<<<<<<<<<
 *             if t == LLONG_MIN:
 *                 continue
*/
      __pyx_v_t = (__pyx_v_times_ptr[__pyx_v_i]);

      /* "utils.pxd":10050
 *                 continue
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Add delta & Normalize time
*/
      __pyx_t_4 = (__pyx_v_t == LLONG_MIN);
      if (__pyx_t_4) {

        /* "utils.pxd":10051
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Add delta & Normalize time
 *             t += delta
*/
        goto __pyx_L10_continue;

        /* "utils.pxd":10050
 *                 continue
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Add delta & Normalize time
*/
      }

      /* "utils.pxd":10053
 *                 continue
 *             # Add delta & Normalize time
 *             t += delta             # <<<<<<<<<<<<<<
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
*/
      __pyx_v_t = (__pyx_v_t + __pyx_v_delta);

      /* "utils.pxd":10055
 *             t += delta
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY             # <<<<<<<<<<<<<<
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY
*/
      __pyx_v_q = (__pyx_v_t / ((npy_int64)__pyx_v_7cytimes_5utils_NS_DAY));
      __pyx_v_r = (__pyx_v_t % __pyx_v_7cytimes_5utils_NS_DAY);

      /* "utils.pxd":10056
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
*/
      __pyx_t_4 = (__pyx_v_r < 0);
      if (__pyx_t_4) {

        /* "utils.pxd":10057
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY             # <<<<<<<<<<<<<<
 *             dates_ptr[i] = d + q
 *             times_ptr[i] = r
*/
        __pyx_v_q = (__pyx_v_q - 1);
        __pyx_v_r = (__pyx_v_r + __pyx_v_7cytimes_5utils_NS_DAY);

        /* "utils.pxd":10056
 *             with cython.cdivision(True):
 *                 q = t / NS_DAY; r = t % NS_DAY
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
*/
      }

      /* "utils.pxd":10058
 *                 if r < 0:
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q             # <<<<<<<<<<<<<<
 *             times_ptr[i] = r
 * 
*/
      (__pyx_v_dates_ptr[__pyx_v_i]) = (__pyx_v_d + __pyx_v_q);

      /* "utils.pxd":10059
 *                     q -= 1; r += NS_DAY
 *             dates_ptr[i] = d + q
 *             times_ptr[i] = r             # <<<<<<<<<<<<<<
 * 
 *     # If out of 'ns' range, down-convert to 'us'
*/
      (__pyx_v_times_ptr[__pyx_v_i]) = __pyx_v_r;
      __pyx_L10_continue:;
    }

    /* "utils.pxd":10034
 *         np.npy_intp size, i
 *         np.npy_int64 delta, d, t, q, r
 *     if hours != 0 or minutes != 0 or seconds != 0 or milliseconds != 0 or microseconds != 0 or nanoseconds != 0:             # <<<<<<<<<<<<<<
 *         delta = (
 *             (hours * 3600 + minutes * 60 + seconds) * NS_SECOND
*/
  }

  /* "utils.pxd":10062
 * 
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.arr_reso = NPY_FR_D;
  __pyx_t_4 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_dates, &__pyx_t_9); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(5, 10062, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "utils.pxd":10063
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):
 *         dates = arr_mul(dates, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
*/
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10064
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 *     else:
*/
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_times, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10065
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_14)); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 10065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_12 = __pyx_t_13;
    __Pyx_INCREF(__pyx_t_12);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10065, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10062
 * 
 *     # If out of 'ns' range, down-convert to 'us'
 *     if not is_dt64arr_ns_safe(dates, np.NPY_DATETIMEUNIT.NPY_FR_D):             # <<<<<<<<<<<<<<
 *         dates = arr_mul(dates, US_DAY, 0, False)
 *         times = arr_div_floor(times, NS_MICROSECOND, 0, False)
*/
  }

  /* "utils.pxd":10067
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_US)
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
*/
  /*else*/ {
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dates, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_dates, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "utils.pxd":10068
 *     else:
 *         dates = arr_mul(dates, NS_DAY, 0, False)
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dates, __pyx_v_times, &__pyx_t_14)); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 10068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = __pyx_t_12;
    __Pyx_INCREF(__pyx_t_13);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10068, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10068, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "utils.pxd":9990
 *         return arr_add(dateD, weeks * 7 + days, False)
 * 
 * cdef inline np.ndarray _dt64arr_ns_add_delta(np.ndarray arr,             # <<<<<<<<<<<<<<
 *     np.npy_int64 years, np.npy_int64 quarters, np.npy_int64 months, np.npy_int64 weeks, np.npy_int64 days,
 *     np.npy_int64 hours, np.npy_int64 minutes, np.npy_int64 seconds, np.npy_int64 milliseconds,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._dt64arr_ns_add_delta", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dates);
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_dates(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_year, npy_int64 __pyx_v_month, npy_int64 __pyx_v_day, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_dates *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  PyArrayObject *__pyx_v_dateY = 0;
  PyArrayObject *__pyx_v_dateM = 0;
  PyArrayObject *__pyx_v_dateD = 0;
  PyArrayObject *__pyx_v_delta = 0;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_Y __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_5;
  long __pyx_t_6;
  npy_int64 __pyx_t_7;
  npy_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_month __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64_D __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_days_in_month __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_arr_min __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_day __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_min_arr __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_replace_dates", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":10099
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10100
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":10101
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10101, __pyx_L1_error)

      /* "utils.pxd":10100
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10102
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Year replacement -> int64[M] YYYY-01
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10102, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10099
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10107
 *     cdef np.ndarray dateY, dateM, dateD, delta
 *     # . set to specific year
 *     if year > 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
*/
  __pyx_t_1 = (__pyx_v_year > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10108
 *     # . set to specific year
 *     if year > 0:
 *         assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
 *     # . retain original year
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10108, __pyx_L1_error)

    /* "utils.pxd":10109
 *     if year > 0:
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])             # <<<<<<<<<<<<<<
 *     # . retain original year
 *     else:
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64(((__pyx_v_year - __pyx_v_7cytimes_5utils_EPOCH_YEAR) * 12), (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10107
 *     cdef np.ndarray dateY, dateM, dateD, delta
 *     # . set to specific year
 *     if year > 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         dateM = arr_fill_int64((year - EPOCH_YEAR) * 12, arr.shape[0])
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":10112
 *     # . retain original year
 *     else:
 *         dateY = dt64arr_as_int64_Y(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = arr_mul(dateY, 12, 0, False)
 * 
*/
  /*else*/ {
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.arr_reso = __pyx_v_arr_reso;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_Y(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateY = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10113
 *     else:
 *         dateY = dt64arr_as_int64_Y(arr, arr_reso, 0, True)
 *         dateM = arr_mul(dateY, 12, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Month replacement -> int64[M] YYYY-MM
*/
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = 0;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_dateY, 12, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_dateM = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "utils.pxd":10117
 *     # Month replacement -> int64[M] YYYY-MM
 *     # . set to specific month
 *     if month > 0:             # <<<<<<<<<<<<<<
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)
 *     # . retain original month
*/
  __pyx_t_1 = (__pyx_v_month > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10118
 *     # . set to specific month
 *     if month > 0:
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)             # <<<<<<<<<<<<<<
 *     # . retain original month
 *     else:
*/
    __pyx_t_6 = 12;
    __pyx_t_7 = __pyx_v_month;
    __pyx_t_1 = (__pyx_t_6 < __pyx_t_7);
    if (__pyx_t_1) {
      __pyx_t_8 = __pyx_t_6;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_dateM, (__pyx_t_8 - 1), &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10117
 *     # Month replacement -> int64[M] YYYY-MM
 *     # . set to specific month
 *     if month > 0:             # <<<<<<<<<<<<<<
 *         dateM = arr_add(dateM, min(month, 12) - 1, False)
 *     # . retain original month
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":10121
 *     # . retain original month
 *     else:
 *         delta = dt64arr_month(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         dateM = arr_add_arr(dateM, delta, -1, False)
 * 
*/
  /*else*/ {
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.arr_reso = __pyx_v_arr_reso;
    __pyx_t_10.offset = 0;
    __pyx_t_10.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(__pyx_v_arr, &__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10122
 *     else:
 *         delta = dt64arr_month(arr, arr_reso, 0, True)
 *         dateM = arr_add_arr(dateM, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *     # Day replacement -> int64[D] YYYY-MM-DD
*/
    __pyx_t_11.__pyx_n = 2;
    __pyx_t_11.offset = -1LL;
    __pyx_t_11.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateM, __pyx_v_delta, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_dateM, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "utils.pxd":10125
 * 
 *     # Day replacement -> int64[D] YYYY-MM-DD
 *     dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, True)             # <<<<<<<<<<<<<<
 *     delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, False)
 * 
*/
  __pyx_t_12.__pyx_n = 3;
  __pyx_t_12.arr_reso = NPY_FR_M;
  __pyx_t_12.offset = 0;
  __pyx_t_12.copy = 1;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64_D(__pyx_v_dateM, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_dateD = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "utils.pxd":10126
 *     # Day replacement -> int64[D] YYYY-MM-DD
 *     dateD = dt64arr_as_int64_D(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, 0, True)
 *     delta = dt64arr_days_in_month(dateM, np.NPY_DATETIMEUNIT.NPY_FR_M, False)             # <<<<<<<<<<<<<<
 * 
 *     # . set to specific day (clamp to maximum days in month)
*/
  __pyx_t_13.__pyx_n = 2;
  __pyx_t_13.arr_reso = NPY_FR_M;
  __pyx_t_13.copy = 0;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_days_in_month(__pyx_v_dateM, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10129
 * 
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:             # <<<<<<<<<<<<<<
 *         delta = arr_min(delta, day, 0, False)
 *     # . retain original day (clamp to maximum days in month)
*/
  __pyx_t_1 = (__pyx_v_day > 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10130
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:
 *         delta = arr_min(delta, day, 0, False)             # <<<<<<<<<<<<<<
 *     # . retain original day (clamp to maximum days in month)
 *     else:
*/
    __pyx_t_14.__pyx_n = 2;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min(__pyx_v_delta, __pyx_v_day, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10129
 * 
 *     # . set to specific day (clamp to maximum days in month)
 *     if day > 0:             # <<<<<<<<<<<<<<
 *         delta = arr_min(delta, day, 0, False)
 *     # . retain original day (clamp to maximum days in month)
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":10133
 *     # . retain original day (clamp to maximum days in month)
 *     else:
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)             # <<<<<<<<<<<<<<
 *     dateD = arr_add_arr(dateD, delta, -1, False)
 * 
*/
  /*else*/ {
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.arr_reso = __pyx_v_arr_reso;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(__pyx_v_arr, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17.__pyx_n = 2;
    __pyx_t_17.offset = 0;
    __pyx_t_17.copy = 0;
    __pyx_t_16 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_min_arr(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3), &__pyx_t_17)); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_16));
    __pyx_t_16 = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":10134
 *     else:
 *         delta = arr_min_arr(delta, dt64arr_day(arr, arr_reso, 0, True), 0, False)
 *     dateD = arr_add_arr(dateD, delta, -1, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return the date part: int64[D]
*/
  __pyx_t_11.__pyx_n = 2;
  __pyx_t_11.offset = -1LL;
  __pyx_t_11.copy = 0;
  __pyx_t_16 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_dateD, __pyx_v_delta, &__pyx_t_11)); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF_SET(__pyx_v_dateD, ((PyArrayObject *)__pyx_t_16));
  __pyx_t_16 = 0;

  /* "utils.pxd":10137
 * 
 *     # Return the date part: int64[D]
 *     return dateD             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_dateD);
  __pyx_r = __pyx_v_dateD;
  goto __pyx_L0;

  /* "utils.pxd":10070
 *         return arr_add_arr(dates, times, 0, False).astype(DT64_DTYPE_NS)
 * 
 * cdef inline np.ndarray dt64arr_replace_dates(np.ndarray arr, np.npy_int64 year, np.npy_int64 month, np.npy_int64 day, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the Y/M/D components of an ndarray[datetime64] and return `int64` day ticks `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_replace_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dateY);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateM);
  __Pyx_XDECREF((PyObject *)__pyx_v_dateD);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_replace_times(PyArrayObject *__pyx_v_arr, npy_int64 __pyx_v_hour, npy_int64 __pyx_v_minute, npy_int64 __pyx_v_second, npy_int64 __pyx_v_microsecond, npy_int64 __pyx_v_nanosecond, struct __pyx_opt_args_7cytimes_5utils_dt64arr_replace_times *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_hh_f;
  npy_int64 __pyx_v_mi_f;
  npy_int64 __pyx_v_ss_f;
  npy_int64 __pyx_v_us_f;
  PyArrayObject *__pyx_v_times = 0;
  PyArrayObject *__pyx_v_delta = 0;
  npy_int64 __pyx_v_millisecond;
  PyArrayObject *__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;
  size_t __pyx_t_7;
  long __pyx_t_8;
  npy_int64 __pyx_t_9;
  npy_int64 __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_hour __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_minute __pyx_t_14;
  struct __pyx_opt_args_7cytimes_5utils_arr_add_arr __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_second __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_millisecond __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_microsecond __pyx_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_nanosecond __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_replace_times", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
    }
  }

  /* "utils.pxd":10175
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10176
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_DATETIME);
    if (__pyx_t_1) {

      /* "utils.pxd":10177
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10177, __pyx_L1_error)

      /* "utils.pxd":10176
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10178
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Get conversion factors
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10178, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10175
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_DATETIME:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10182
 *     # Get conversion factors
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  switch (__pyx_v_arr_reso) {
    case NPY_FR_ns:

    /* "utils.pxd":10183
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_NS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_NS_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_NS_SECOND;
    __pyx_v_us_f = __pyx_v_7cytimes_5utils_NS_MICROSECOND;

    /* "utils.pxd":10182
 *     # Get conversion factors
 *     cdef np.npy_int64 hh_f, mi_f, ss_f, us_f
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
    break;
    case NPY_FR_us:

    /* "utils.pxd":10185
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_US_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_US_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_US_SECOND;
    __pyx_v_us_f = 1;

    /* "utils.pxd":10184
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         hh_f = NS_HOUR; mi_f = NS_MINUTE; ss_f = NS_SECOND; us_f = NS_MICROSECOND
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10187
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1             # <<<<<<<<<<<<<<
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_MS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_MS_MINUTE;
    __pyx_v_ss_f = __pyx_v_7cytimes_5utils_MS_SECOND;
    __pyx_v_us_f = 1;

    /* "utils.pxd":10186
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         hh_f = US_HOUR; mi_f = US_MINUTE; ss_f = US_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10189
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
    __pyx_v_hh_f = __pyx_v_7cytimes_5utils_SS_HOUR;
    __pyx_v_mi_f = __pyx_v_7cytimes_5utils_SS_MINUTE;
    __pyx_v_ss_f = 1;
    __pyx_v_us_f = 0;

    /* "utils.pxd":10188
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         hh_f = MS_HOUR; mi_f = MS_MINUTE; ss_f = MS_SECOND; us_f = 1
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
 *     else:
*/
    break;
    default:

    /* "utils.pxd":10191
 *         hh_f = SS_HOUR; mi_f = SS_MINUTE; ss_f = 1;         us_f = 0
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Only supports arrays with units in ['ns', 'us', 'ms', 's'], "
 *             "instead got '%s'." % nptime_unit_int2str(arr_reso)
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":10193
 *         raise ValueError(
 *             "Only supports arrays with units in ['ns', 'us', 'ms', 's'], "
 *             "instead got '%s'." % nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Only_supports_arrays_with_units, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __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(5, 10191, __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(5, 10191, __pyx_L1_error)
    break;
  }

  /* "utils.pxd":10200
 *     cdef np.npy_int64 millisecond
 *     # . set to specific hour
 *     if hour >= 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
*/
  __pyx_t_1 = (__pyx_v_hour >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10201
 *     # . set to specific hour
 *     if hour >= 0:
 *         assure_1dim_arr(arr)             # <<<<<<<<<<<<<<
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
 *     # . retain original hour
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_assure_1dim_arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10201, __pyx_L1_error)

    /* "utils.pxd":10202
 *     if hour >= 0:
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])             # <<<<<<<<<<<<<<
 *     # . retain original hour
 *     else:
*/
    __pyx_t_8 = 23;
    __pyx_t_9 = __pyx_v_hour;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
    if (__pyx_t_1) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64((__pyx_t_10 * __pyx_v_hh_f), (__pyx_f_5numpy_7ndarray_5shape_shape(__pyx_v_arr)[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10200
 *     cdef np.npy_int64 millisecond
 *     # . set to specific hour
 *     if hour >= 0:             # <<<<<<<<<<<<<<
 *         assure_1dim_arr(arr)
 *         times = arr_fill_int64(min(hour, 23) * hh_f, arr.shape[0])
*/
    goto __pyx_L5;
  }

  /* "utils.pxd":10205
 *     # . retain original hour
 *     else:
 *         delta = dt64arr_hour(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         times = arr_mul(delta, hh_f, 0, False)
 * 
*/
  /*else*/ {
    __pyx_t_11.__pyx_n = 3;
    __pyx_t_11.arr_reso = __pyx_v_arr_reso;
    __pyx_t_11.offset = 0;
    __pyx_t_11.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_hour(__pyx_v_arr, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_delta = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "utils.pxd":10206
 *     else:
 *         delta = dt64arr_hour(arr, arr_reso, 0, True)
 *         times = arr_mul(delta, hh_f, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_hh_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10206, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_times = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  /* "utils.pxd":10210
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
 *     # . set to specific minute
 *     if minute >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(minute, 59) * mi_f, False)
 *     # . retain original minute
*/
  __pyx_t_1 = (__pyx_v_minute >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10211
 *     # . set to specific minute
 *     if minute >= 0:
 *         times = arr_add(times, min(minute, 59) * mi_f, False)             # <<<<<<<<<<<<<<
 *     # . retain original minute
 *     else:
*/
    __pyx_t_8 = 59;
    __pyx_t_10 = __pyx_v_minute;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
    if (__pyx_t_1) {
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_10;
    }
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_9 * __pyx_v_mi_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10210
 *     # Minute replacement -> int64[ns] hh:mm:00.000000000
 *     # . set to specific minute
 *     if minute >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(minute, 59) * mi_f, False)
 *     # . retain original minute
*/
    goto __pyx_L6;
  }

  /* "utils.pxd":10214
 *     # . retain original minute
 *     else:
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         delta = arr_mul(delta, mi_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)
*/
  /*else*/ {
    __pyx_t_14.__pyx_n = 3;
    __pyx_t_14.arr_reso = __pyx_v_arr_reso;
    __pyx_t_14.offset = 0;
    __pyx_t_14.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_minute(__pyx_v_arr, &__pyx_t_14)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10215
 *     else:
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, mi_f, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_add_arr(times, delta, 0, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_mi_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10216
 *         delta = dt64arr_minute(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, mi_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "utils.pxd":10220
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
 *     # . set to specific second
 *     if second >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(second, 59) * ss_f, False)
 *     # . retain original second
*/
  __pyx_t_1 = (__pyx_v_second >= 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10221
 *     # . set to specific second
 *     if second >= 0:
 *         times = arr_add(times, min(second, 59) * ss_f, False)             # <<<<<<<<<<<<<<
 *     # . retain original second
 *     else:
*/
    __pyx_t_8 = 59;
    __pyx_t_9 = __pyx_v_second;
    __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
    if (__pyx_t_1) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_10 * __pyx_v_ss_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10220
 *     # Second replacement -> int64[ns] hh:mm:ss.000000000
 *     # . set to specific second
 *     if second >= 0:             # <<<<<<<<<<<<<<
 *         times = arr_add(times, min(second, 59) * ss_f, False)
 *     # . retain original second
*/
    goto __pyx_L7;
  }

  /* "utils.pxd":10224
 *     # . retain original second
 *     else:
 *         delta = dt64arr_second(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *         delta = arr_mul(delta, ss_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)
*/
  /*else*/ {
    __pyx_t_16.__pyx_n = 3;
    __pyx_t_16.arr_reso = __pyx_v_arr_reso;
    __pyx_t_16.offset = 0;
    __pyx_t_16.copy = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_second(__pyx_v_arr, &__pyx_t_16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10225
 *     else:
 *         delta = dt64arr_second(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, ss_f, 0, False)             # <<<<<<<<<<<<<<
 *         times = arr_add_arr(times, delta, 0, False)
 * 
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.offset = 0;
    __pyx_t_12.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_ss_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "utils.pxd":10226
 *         delta = dt64arr_second(arr, arr_reso, 0, True)
 *         delta = arr_mul(delta, ss_f, 0, False)
 *         times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
*/
    __pyx_t_15.__pyx_n = 2;
    __pyx_t_15.offset = 0;
    __pyx_t_15.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }
  __pyx_L7:;

  /* "utils.pxd":10229
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":10230
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000             # <<<<<<<<<<<<<<
 *         # . set to specific millisecond
 *         if microsecond >= 0:
*/
    __pyx_t_1 = (__pyx_v_microsecond < 0);
    if (__pyx_t_1) {
      __pyx_t_10 = 0;
    } else {
      __pyx_t_10 = __Pyx_div_npy_int64(__pyx_v_microsecond, 0x3E8, 1);
    }
    __pyx_v_millisecond = __pyx_t_10;

    /* "utils.pxd":10232
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(millisecond, 999), False)
 *         # . retain original millisecond
*/
    __pyx_t_1 = (__pyx_v_microsecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10233
 *         # . set to specific millisecond
 *         if microsecond >= 0:
 *             times = arr_add(times, min(millisecond, 999), False)             # <<<<<<<<<<<<<<
 *         # . retain original millisecond
 *         else:
*/
      __pyx_t_8 = 0x3E7;
      __pyx_t_10 = __pyx_v_millisecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
      if (__pyx_t_1) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, __pyx_t_9, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10232
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(millisecond, 999), False)
 *         # . retain original millisecond
*/
      goto __pyx_L9;
    }

    /* "utils.pxd":10236
 *         # . retain original millisecond
 *         else:
 *             delta = dt64arr_millisecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
    /*else*/ {
      __pyx_t_17.__pyx_n = 3;
      __pyx_t_17.arr_reso = __pyx_v_arr_reso;
      __pyx_t_17.offset = 0;
      __pyx_t_17.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_millisecond(__pyx_v_arr, &__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10237
 *         else:
 *             delta = dt64arr_millisecond(arr, arr_reso, 0, True)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L9:;

    /* "utils.pxd":10229
 * 
 *     # . Millisecond replacement -> int64[ns] hh:mm:ss.sss000000
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         millisecond = 0 if microsecond < 0 else microsecond // 1000
 *         # . set to specific millisecond
*/
    goto __pyx_L8;
  }

  /* "utils.pxd":10240
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # . set to specific microsecond
 *         if microsecond >= 0:
*/
  __pyx_t_1 = (__pyx_v_arr_reso != NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":10242
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # . set to specific microsecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)
 *         # . retain original microsecond
*/
    __pyx_t_1 = (__pyx_v_microsecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10243
 *         # . set to specific microsecond
 *         if microsecond >= 0:
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)             # <<<<<<<<<<<<<<
 *         # . retain original microsecond
 *         else:
*/
      __pyx_t_8 = 0xF423F;
      __pyx_t_9 = __pyx_v_microsecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_9);
      if (__pyx_t_1) {
        __pyx_t_10 = __pyx_t_8;
      } else {
        __pyx_t_10 = __pyx_t_9;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, (__pyx_t_10 * __pyx_v_us_f), &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10242
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # . set to specific microsecond
 *         if microsecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(microsecond, 999_999) * us_f, False)
 *         # . retain original microsecond
*/
      goto __pyx_L10;
    }

    /* "utils.pxd":10246
 *         # . retain original microsecond
 *         else:
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             delta = arr_mul(delta, us_f, 0, False)
 *             times = arr_add_arr(times, delta, 0, False)
*/
    /*else*/ {
      __pyx_t_18.__pyx_n = 3;
      __pyx_t_18.arr_reso = __pyx_v_arr_reso;
      __pyx_t_18.offset = 0;
      __pyx_t_18.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_microsecond(__pyx_v_arr, &__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10247
 *         else:
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)
 *             delta = arr_mul(delta, us_f, 0, False)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_delta, __pyx_v_us_f, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10248
 *             delta = dt64arr_microsecond(arr, arr_reso, 0, True)
 *             delta = arr_mul(delta, us_f, 0, False)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L10:;

    /* "utils.pxd":10240
 * 
 *     # Microsecond replacement -> int64[ns] hh:mm:ss.uuuuuu000
 *     elif arr_reso != np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # . set to specific microsecond
 *         if microsecond >= 0:
*/
  }
  __pyx_L8:;

  /* "utils.pxd":10251
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":10253
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(nanosecond, 999), False)
 *         # . retain original nanosecond
*/
    __pyx_t_1 = (__pyx_v_nanosecond >= 0);
    if (__pyx_t_1) {

      /* "utils.pxd":10254
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
 *             times = arr_add(times, min(nanosecond, 999), False)             # <<<<<<<<<<<<<<
 *         # . retain original nanosecond
 *         else:
*/
      __pyx_t_8 = 0x3E7;
      __pyx_t_10 = __pyx_v_nanosecond;
      __pyx_t_1 = (__pyx_t_8 < __pyx_t_10);
      if (__pyx_t_1) {
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_10;
      }
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_times, __pyx_t_9, &__pyx_t_13)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10253
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:             # <<<<<<<<<<<<<<
 *             times = arr_add(times, min(nanosecond, 999), False)
 *         # . retain original nanosecond
*/
      goto __pyx_L12;
    }

    /* "utils.pxd":10257
 *         # . retain original nanosecond
 *         else:
 *             delta = dt64arr_nanosecond(arr, arr_reso, 0, True)             # <<<<<<<<<<<<<<
 *             times = arr_add_arr(times, delta, 0, False)
 * 
*/
    /*else*/ {
      __pyx_t_19.__pyx_n = 3;
      __pyx_t_19.arr_reso = __pyx_v_arr_reso;
      __pyx_t_19.offset = 0;
      __pyx_t_19.copy = 1;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_nanosecond(__pyx_v_arr, &__pyx_t_19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_delta, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10258
 *         else:
 *             delta = dt64arr_nanosecond(arr, arr_reso, 0, True)
 *             times = arr_add_arr(times, delta, 0, False)             # <<<<<<<<<<<<<<
 * 
 *     # Return the time part: int64[arr_reso]
*/
      __pyx_t_15.__pyx_n = 2;
      __pyx_t_15.offset = 0;
      __pyx_t_15.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add_arr(__pyx_v_times, __pyx_v_delta, &__pyx_t_15)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10258, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_times, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;
    }
    __pyx_L12:;

    /* "utils.pxd":10251
 * 
 *     # Nanosecond replacement -> int64[ns] hh:mm:ss.uuuuuunnn
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         # . set to specific nanosecond
 *         if nanosecond >= 0:
*/
  }

  /* "utils.pxd":10261
 * 
 *     # Return the time part: int64[arr_reso]
 *     return times             # <<<<<<<<<<<<<<
 * 
 * # . arithmetic
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_times);
  __pyx_r = __pyx_v_times;
  goto __pyx_L0;

  /* "utils.pxd":10139
 *     return dateD
 * 
 * cdef inline np.ndarray dt64arr_replace_times(np.ndarray arr, np.npy_int64 hour, np.npy_int64 minute, np.npy_int64 second, np.npy_int64 microsecond, np.npy_int64 nanosecond, int arr_reso=-1):             # <<<<<<<<<<<<<<
 *     """Replace the h/m/s/us/ns components of an ndarray[datetime64] and return the
 *     time components `int64` ticks in the original resolution `<'ndarray[int64]'>`.
*/

  /* 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("cytimes.utils.dt64arr_replace_times", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_times);
  __Pyx_XDECREF((PyObject *)__pyx_v_delta);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_round(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_round *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_even_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_round", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10290
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10291
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10291, __pyx_L1_error)

    /* "utils.pxd":10290
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10294
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10295
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10296
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10297
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10297, __pyx_L1_error)

      /* "utils.pxd":10296
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10298
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10298, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10295
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10301
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10301, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10305
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10306
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10307
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10306
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10308
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10308, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10305
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10311
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10314
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10316
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10317
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10317, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10318
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = __pyx_v_copy;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10319
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10319, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10319, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10317
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10321
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = __pyx_v_copy;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10321, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10322
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, copy)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10322, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10322, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10316
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even(arr, NS_MICROSECOND, 0, copy)
*/
    }

    /* "utils.pxd":10314
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10328
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10329
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10329, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10330
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10331
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10331, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10331, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10329
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10333
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10333, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10334
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10334, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10334, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10328
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10337
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10338
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10338, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10338, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10336
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10326
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10344
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10345
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10345, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10346
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10347
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10347, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10347, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10345
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10349
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10349, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10350
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10350, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10350, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10344
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10353
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10354
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10354, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10354, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10352
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10357
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10358
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10358, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10358, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10356
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10342
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10364
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10365
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10365, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10366
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10367
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10367, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10367, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10365
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10369
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10369, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10370
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10370, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10370, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10364
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10373
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10374
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10374, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10372
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10377
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10378
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10378, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10376
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10381
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10382
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10382, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10380
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10362
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10388
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10389
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10389, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10390
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10391
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10391, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10391, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10389
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10393
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10393, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10394
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10394, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10394, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10388
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10397
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10398
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10398, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10398, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10396
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10401
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10402
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10402, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10400
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10405
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10406
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10406, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10404
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10409
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10410
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10410, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10408
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10386
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10416
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10417
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10417, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10418
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10418, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10419
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10419, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10419, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10417
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10421
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10422
 *             else:
 *                 arr = arr_div_even_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10422, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10416
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_even_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10425
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10426
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10426, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10424
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10429
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10430
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10430, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10428
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10433
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10433, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10434
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10434, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10432
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10437
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10437, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10438
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10438, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10436
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10441
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10442
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10442, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10440
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_even_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10414
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10446
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_round, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10446, __pyx_L1_error)

  /* "utils.pxd":10264
 * 
 * # . arithmetic
 * cdef inline np.ndarray dt64arr_round(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Round a 1-D datetime64 array to the nearest multiple of `to_unit` (ties-to-even) `<'ndarray[datetime64]'>`
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_ceil(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_ceil *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_ceil_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_ceil", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10474
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10475
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10475, __pyx_L1_error)

    /* "utils.pxd":10474
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10478
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10479
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10480
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10481
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10481, __pyx_L1_error)

      /* "utils.pxd":10480
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10482
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10482, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10479
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10485
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10485, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10489
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10490
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10491
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10490
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10492
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10492, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10489
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10495
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10498
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10500
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10501
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10501, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10502
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10502, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10503
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10503, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10501
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10505
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10505, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10506
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10506, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10506, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10500
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil(arr, NS_MICROSECOND, 0, False)
*/
    }

    /* "utils.pxd":10498
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10512
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10513
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10513, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10514
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10514, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10515
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10515, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10515, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10513
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10517
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10517, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10518
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10518, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10518, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10512
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10521
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10522
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10522, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10522, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10520
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10510
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10528
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10529
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10529, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10530
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10530, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10531
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10531, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10531, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10529
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10533
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10533, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10534
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10534, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10528
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10537
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10538
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10538, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10536
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10541
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10542
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10542, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10540
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10526
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10548
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10549
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10549, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10550
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10551
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10551, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10551, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10549
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10553
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10553, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10554
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10554, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10554, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10548
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10557
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10558
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10558, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10556
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10561
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10562
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10562, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10560
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10565
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10566
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10566, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10564
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10546
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10572
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10573
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10573, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10574
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10575
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10575, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10573
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10577
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10578
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10578, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10578, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10572
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10581
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10582
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10582, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10580
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10585
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10586
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10586, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10584
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10589
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10590
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10590, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10588
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10593
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10594
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10594, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10592
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10570
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10600
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10601
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10601, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10602
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10602, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10603
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10603, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10603, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10601
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10605
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10605, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10606
 *             else:
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10606, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10606, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10600
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_ceil_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10609
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10610
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10610, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10608
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10613
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10614
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10614, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10612
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10617
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10618
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10618, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10618, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10616
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10621
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10622
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10622, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10620
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10625
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10626
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10626, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10624
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_ceil_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10598
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10630
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_ceil, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10630, __pyx_L1_error)

  /* "utils.pxd":10448
 *     _raise_arr_dt64_rcl_error("round", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_ceil(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Ceil a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_floor(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_to_unit, struct __pyx_opt_args_7cytimes_5utils_dt64arr_floor *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  int __pyx_v_copy = ((int)1);
  int __pyx_v_is_dt64;
  int __pyx_v_to_reso;
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_is_dt64arr_ns_safe __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor_mul __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dt64arr_floor", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10658
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  __pyx_t_1 = (__pyx_v_to_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "utils.pxd":10659
 *     # Guard
 *     if to_unit is None:
 *         _raise_invalid_nptime_str_unit_error(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Get array resolution
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_invalid_nptime_str_unit_error(__pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10659, __pyx_L1_error)

    /* "utils.pxd":10658
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "utils.pxd":10662
 * 
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME             # <<<<<<<<<<<<<<
 *     if arr_reso < 0:
 *         if not is_dt64:
*/
  __pyx_v_is_dt64 = (PyArray_TYPE(__pyx_v_arr) == NPY_DATETIME);

  /* "utils.pxd":10663
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10664
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (!__pyx_v_is_dt64);
    if (__pyx_t_1) {

      /* "utils.pxd":10665
 *     if arr_reso < 0:
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10665, __pyx_L1_error)

      /* "utils.pxd":10664
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:
 *         if not is_dt64:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10666
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Parse target resolution
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10666, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10663
 *     # Get array resolution
 *     cdef bint is_dt64 = np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_DATETIME
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if not is_dt64:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10669
 * 
 *     # Parse target resolution
 *     cdef int to_reso = nptime_unit_str2int(to_unit)             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_to_unit); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10669, __pyx_L1_error)
  __pyx_v_to_reso = __pyx_t_2;

  /* "utils.pxd":10673
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  __pyx_t_1 = (__pyx_v_arr_reso <= __pyx_v_to_reso);
  if (__pyx_t_1) {

    /* "utils.pxd":10674
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    if (__pyx_v_is_dt64) {

      /* "utils.pxd":10675
 *     if arr_reso <= to_reso:
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag             # <<<<<<<<<<<<<<
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_4.__pyx_n = 1;
      __pyx_t_4.copy = __pyx_v_copy;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, 0, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10674
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:
 *         if is_dt64:             # <<<<<<<<<<<<<<
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))
*/
    }

    /* "utils.pxd":10676
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
 *         return arr.astype(nptime_unit_int2dt64(arr_reso))             # <<<<<<<<<<<<<<
 * 
 *     #: Convert to int64
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5 = ((PyObject *)__pyx_v_arr);
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_7cytimes_5utils_nptime_unit_int2dt64(__pyx_v_arr_reso); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10676, __pyx_L1_error)
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10673
 *     # Fast-path
 *     #: source is coarser or equal to target (no rounding needed)
 *     if arr_reso <= to_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor `copy` flag
*/
  }

  /* "utils.pxd":10679
 * 
 *     #: Convert to int64
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 * 
 *     # To microsecond [us]
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10682
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
  switch (__pyx_v_to_reso) {
    case NPY_FR_us:

    /* "utils.pxd":10684
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
    __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
    if (__pyx_t_1) {

      /* "utils.pxd":10685
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10685, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10686
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_11.__pyx_n = 2;
        __pyx_t_11.offset = 0;
        __pyx_t_11.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10687
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10687, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10685
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10689
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # Coarser/equal units are handled by fast-path.
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10690
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MICROSECOND, NS_MICROSECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10690, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10690, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10684
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor(arr, NS_MICROSECOND, 0, False)
*/
    }

    /* "utils.pxd":10682
 * 
 *     # To microsecond [us]
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [us]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_ms:

    /* "utils.pxd":10696
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10697
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10697, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10698
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10699
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10699, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10699, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10697
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10701
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MILLISECOND, __pyx_v_7cytimes_5utils_NS_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10702
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, NS_MILLISECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10702, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10702, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10696
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MILLISECOND, US_MILLISECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10705
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10706
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10706, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10704
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [ms]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_MILLISECOND, US_MILLISECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10694
 * 
 *     # To millisecond [ms]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [ms]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_s:

    /* "utils.pxd":10712
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10713
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10713, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10714
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10715
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10715, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10715, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10713
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10717
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_SECOND, __pyx_v_7cytimes_5utils_NS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10718
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, NS_SECOND, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10718, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10718, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10712
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_SECOND, US_SECOND, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10721
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10722
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10722, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10722, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10720
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_SECOND, US_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10725
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_SECOND, __pyx_v_7cytimes_5utils_MS_SECOND, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10726
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10726, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10724
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [s]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_SECOND, MS_SECOND, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10710
 * 
 *     # To second [s]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [s]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_m:

    /* "utils.pxd":10732
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10733
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10733, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10734
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10734, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10735
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10735, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10735, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10733
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10737
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MINUTE, __pyx_v_7cytimes_5utils_NS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10737, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10738
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, NS_MINUTE, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10738, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10732
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_MINUTE, US_MINUTE, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10741
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10742
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10742, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10742, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10740
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_MINUTE, US_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10745
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_MINUTE, __pyx_v_7cytimes_5utils_MS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10746
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10746, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10744
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_MINUTE, MS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10749
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_MINUTE, __pyx_v_7cytimes_5utils_SS_MINUTE, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10750
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10750, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10748
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [m]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_MINUTE, SS_MINUTE, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10730
 * 
 *     # To minute [m]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [m]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_h:

    /* "utils.pxd":10756
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10757
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10757, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_1);
      if (__pyx_t_10) {

        /* "utils.pxd":10758
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10758, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10759
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10759, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10759, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10757
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10761
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_HOUR, __pyx_v_7cytimes_5utils_NS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10761, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10762
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, NS_HOUR, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10762, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10762, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10756
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_HOUR, US_HOUR, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10765
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10766
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10766, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10764
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_HOUR, US_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10769
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_HOUR, __pyx_v_7cytimes_5utils_MS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10770
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10770, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10770, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10768
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_HOUR, MS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10773
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_HOUR, __pyx_v_7cytimes_5utils_SS_HOUR, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10774
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10774, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10772
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_HOUR, SS_HOUR, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10777
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 60, 60, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10778
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10778, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10778, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10776
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [h]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 60, 60, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10754
 * 
 *     # To hour [h]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [h]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    case NPY_FR_D:

    /* "utils.pxd":10784
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
*/
    switch (__pyx_v_arr_reso) {
      case NPY_FR_ns:

      /* "utils.pxd":10785
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.arr_reso = NPY_FR_ns;
      __pyx_t_10 = __pyx_f_7cytimes_5utils_is_dt64arr_ns_safe(__pyx_v_arr, &__pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 10785, __pyx_L1_error)
      __pyx_t_1 = (!__pyx_t_10);
      if (__pyx_t_1) {

        /* "utils.pxd":10786
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
*/
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10786, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10787
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10787, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "utils.pxd":10785
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):             # <<<<<<<<<<<<<<
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_US)
*/
      }

      /* "utils.pxd":10789
 *                 return arr.astype(DT64_DTYPE_US)
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
*/
      /*else*/ {
        __pyx_t_12.__pyx_n = 2;
        __pyx_t_12.offset = 0;
        __pyx_t_12.copy = 0;
        __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_DAY, __pyx_v_7cytimes_5utils_NS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10789, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
        __pyx_t_3 = 0;

        /* "utils.pxd":10790
 *             else:
 *                 arr = arr_div_floor_mul(arr, NS_DAY, NS_DAY, 0, False)
 *                 return arr.astype(DT64_DTYPE_NS)             # <<<<<<<<<<<<<<
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_6 = ((PyObject *)__pyx_v_arr);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_NS};
          __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10790, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10790, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L0;
      }

      /* "utils.pxd":10784
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *             if not is_dt64arr_ns_safe(arr, np.NPY_DATETIMEUNIT.NPY_FR_ns):
 *                 arr = arr_div_floor_mul(arr, NS_DAY, US_DAY, 0, False)
*/
      break;
      case NPY_FR_us:

      /* "utils.pxd":10793
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10794
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)             # <<<<<<<<<<<<<<
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_US};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10794, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10794, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10792
 *                 return arr.astype(DT64_DTYPE_NS)
 *         # my_unit [us] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, US_DAY, US_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_US)
*/
      break;
      case NPY_FR_ms:

      /* "utils.pxd":10797
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_MS_DAY, __pyx_v_7cytimes_5utils_MS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10797, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10798
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)             # <<<<<<<<<<<<<<
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10798, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10798, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10796
 *             return arr.astype(DT64_DTYPE_US)
 *         # my_unit [ms] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, MS_DAY, MS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_MS)
*/
      break;
      case NPY_FR_s:

      /* "utils.pxd":10801
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_SS_DAY, __pyx_v_7cytimes_5utils_SS_DAY, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10802
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)             # <<<<<<<<<<<<<<
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_SS};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10802, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10802, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10800
 *             return arr.astype(DT64_DTYPE_MS)
 *         # my_unit [s] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, SS_DAY, SS_DAY, 0, False)
 *             return arr.astype(DT64_DTYPE_SS)
*/
      break;
      case NPY_FR_m:

      /* "utils.pxd":10805
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 0x5A0, 0x5A0, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10806
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)             # <<<<<<<<<<<<<<
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_MI};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10806, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10804
 *             return arr.astype(DT64_DTYPE_SS)
 *         # my_unit [m] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 1440, 1440, 0, False)
 *             return arr.astype(DT64_DTYPE_MI)
*/
      break;
      case NPY_FR_h:

      /* "utils.pxd":10809
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)             # <<<<<<<<<<<<<<
 *             return arr.astype(DT64_DTYPE_HH)
 *         # Coarser/equal units are handled by fast-path.
*/
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.offset = 0;
      __pyx_t_12.copy = 0;
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(__pyx_v_arr, 24, 24, &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "utils.pxd":10810
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)             # <<<<<<<<<<<<<<
 *         # Coarser/equal units are handled by fast-path.
 * 
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_6 = ((PyObject *)__pyx_v_arr);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_7cytimes_5utils_DT64_DTYPE_HH};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(5, 10810, __pyx_L1_error)
      __pyx_r = ((PyArrayObject *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "utils.pxd":10808
 *             return arr.astype(DT64_DTYPE_MI)
 *         # my_unit [h] -> [D]
 *         elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:             # <<<<<<<<<<<<<<
 *             arr = arr_div_floor_mul(arr, 24, 24, 0, False)
 *             return arr.astype(DT64_DTYPE_HH)
*/
      break;
      default: break;
    }

    /* "utils.pxd":10782
 * 
 *     # To day [D]
 *     elif to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         # my_unit [ns] -> [D]
 *         if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:
*/
    break;
    default: break;
  }

  /* "utils.pxd":10814
 * 
 *     # Invalid unit
 *     _raise_arr_dt64_rcl_error("floor", arr_reso, to_unit)             # <<<<<<<<<<<<<<
 * 
 * # . errors
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(__pyx_mstate_global->__pyx_n_u_floor, __pyx_v_arr_reso, __pyx_v_to_unit); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10814, __pyx_L1_error)

  /* "utils.pxd":10632
 *     _raise_arr_dt64_rcl_error("ceil", arr_reso, to_unit)
 * 
 * cdef inline np.ndarray dt64arr_floor(np.ndarray arr, str to_unit, int arr_reso=-1, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Floor a 1-D datetime64 array to the nearest multiple of `to_unit` `<'ndarray[datetime64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils.dt64arr_floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10817
 * 
 * # . errors
 * cdef inline bint _raise_missing_arr_reso_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for array missing resolution information.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(PyArrayObject *__pyx_v_arr) {
  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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_missing_arr_reso_error", 0);

  /* "utils.pxd":10822
 *     :param arr `<'np.ndarray'>`: The array missing resolution information.
 *     """
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "missing time resolution for <ndarray[%s]>. "
 *         "Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array." % arr.dtype
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":10824
 *     raise ValueError(
 *         "missing time resolution for <ndarray[%s]>. "
 *         "Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array." % arr.dtype             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_missing_time_resolution_for_ndar, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 10824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10822, __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(5, 10822, __pyx_L1_error)

  /* "utils.pxd":10817
 * 
 * # . errors
 * cdef inline bint _raise_missing_arr_reso_error(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for array missing resolution information.
 * 
*/

  /* 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("cytimes.utils._raise_missing_arr_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10827
 *     )
 * 
 * cdef inline bint _raise_dt64arr_to_reso_error(np.ndarray arr, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime-like array.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(PyArrayObject *__pyx_v_arr, int __pyx_v_arr_reso, PyObject *__pyx_v_to_unit) {
  PyObject *__pyx_v_dtype_str = 0;
  PyObject *__pyx_v_arr_reso_str = 0;
  PyObject *__pyx_v_err = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[7];
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24[27];
  PyObject *__pyx_t_25 = NULL;
  int __pyx_t_26;
  char const *__pyx_t_27;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  PyObject *__pyx_t_30 = NULL;
  PyObject *__pyx_t_31 = NULL;
  PyObject *__pyx_t_32 = NULL;
  PyObject *__pyx_t_33 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_dt64arr_to_reso_error", 0);

  /* "utils.pxd":10834
 *     :param to_unit `<'str'>`: The target conversion numpy unit.
 *     """
 *     cdef str dtype_str = str(arr.dtype)             # <<<<<<<<<<<<<<
 *     cdef str arr_reso_str
 *     try:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dtype_str = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
  {
    __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:*/ {

      /* "utils.pxd":10837
 *     cdef str arr_reso_str
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         raise ValueError(
*/
      __pyx_t_2 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10837, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_arr_reso_str = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
    }

    /* "utils.pxd":10859
 *         ) from err
 *     else:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
*/
    /*else:*/ {
      __pyx_t_1 = NULL;

      /* "utils.pxd":10862
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (dtype_str, arr_reso_str, to_unit)             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_v_arr_reso_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10862, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10862, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_ndarray;
      __pyx_t_8[1] = __pyx_v_dtype_str;
      __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__10;
      __pyx_t_8[3] = __pyx_t_6;
      __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_to_int64_2;
      __pyx_t_8[5] = __pyx_t_7;
      __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_resolution_Y_M;

      /* "utils.pxd":10860
 *     else:
 *         raise ValueError(
 *             "Cannot convert ndarray[%s[%s]] to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'"
 *             % (dtype_str, arr_reso_str, to_unit)
*/
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 7, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_dtype_str) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 82, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_dtype_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 10860, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10859, __pyx_L5_except_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(5, 10859, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "utils.pxd":10838
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.utils._raise_dt64arr_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(5, 10838, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_err = __pyx_t_9;
      /*try:*/ {

        /* "utils.pxd":10839
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
*/
        __pyx_t_6 = NULL;

        /* "utils.pxd":10844
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
 *                 dtype_str,
 *                 arr_reso,             # <<<<<<<<<<<<<<
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
*/
        __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_arr_reso, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 10844, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "utils.pxd":10845
 *                 dtype_str,
 *                 arr_reso,
 *                 to_unit,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
*/
        __pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 10845, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_13);

        /* "utils.pxd":10846
 *                 arr_reso,
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
*/
        __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 10846, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);

        /* "utils.pxd":10847
 *                 to_unit,
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
*/
        __pyx_t_15 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 10847, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_15);

        /* "utils.pxd":10848
 *                 DT_NPY_UNIT_YY,
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
*/
        __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 10848, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_16);

        /* "utils.pxd":10849
 *                 DT_NPY_UNIT_MM,
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
*/
        __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 10849, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "utils.pxd":10850
 *                 DT_NPY_UNIT_WW,
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
*/
        __pyx_t_18 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, 0, ' ', 'd'); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 10850, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "utils.pxd":10851
 *                 DT_NPY_UNIT_DD,
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
*/
        __pyx_t_19 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, 0, ' ', 'd'); if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 10851, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_19);

        /* "utils.pxd":10852
 *                 DT_NPY_UNIT_HH,
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
*/
        __pyx_t_20 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, 0, ' ', 'd'); if (unlikely(!__pyx_t_20)) __PYX_ERR(5, 10852, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_20);

        /* "utils.pxd":10853
 *                 DT_NPY_UNIT_MI,
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,
*/
        __pyx_t_21 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, 0, ' ', 'd'); if (unlikely(!__pyx_t_21)) __PYX_ERR(5, 10853, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_21);

        /* "utils.pxd":10854
 *                 DT_NPY_UNIT_SS,
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,             # <<<<<<<<<<<<<<
 *                 DT_NPY_UNIT_NS,
 *             )
*/
        __pyx_t_22 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, 0, ' ', 'd'); if (unlikely(!__pyx_t_22)) __PYX_ERR(5, 10854, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_22);

        /* "utils.pxd":10855
 *                 DT_NPY_UNIT_MS,
 *                 DT_NPY_UNIT_US,
 *                 DT_NPY_UNIT_NS,             # <<<<<<<<<<<<<<
 *             )
 *         ) from err
*/
        __pyx_t_23 = __Pyx_PyUnicode_From_int(__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, 0, ' ', 'd'); if (unlikely(!__pyx_t_23)) __PYX_ERR(5, 10855, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_convert_ndarray;
        __pyx_t_24[1] = __pyx_v_dtype_str;
        __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u_from_2;
        __pyx_t_24[3] = __pyx_t_12;
        __pyx_t_24[4] = __pyx_mstate_global->__pyx_kp_u_unit_to_int64;
        __pyx_t_24[5] = __pyx_t_13;
        __pyx_t_24[6] = __pyx_mstate_global->__pyx_kp_u_ticks_Supported_units;
        __pyx_t_24[7] = __pyx_t_14;
        __pyx_t_24[8] = __pyx_mstate_global->__pyx_kp_u_Y_2;
        __pyx_t_24[9] = __pyx_t_15;
        __pyx_t_24[10] = __pyx_mstate_global->__pyx_kp_u_M_2;
        __pyx_t_24[11] = __pyx_t_16;
        __pyx_t_24[12] = __pyx_mstate_global->__pyx_kp_u_W_2;
        __pyx_t_24[13] = __pyx_t_17;
        __pyx_t_24[14] = __pyx_mstate_global->__pyx_kp_u_D_2;
        __pyx_t_24[15] = __pyx_t_18;
        __pyx_t_24[16] = __pyx_mstate_global->__pyx_kp_u_h_2;
        __pyx_t_24[17] = __pyx_t_19;
        __pyx_t_24[18] = __pyx_mstate_global->__pyx_kp_u_m_2;
        __pyx_t_24[19] = __pyx_t_20;
        __pyx_t_24[20] = __pyx_mstate_global->__pyx_kp_u_s_2;
        __pyx_t_24[21] = __pyx_t_21;
        __pyx_t_24[22] = __pyx_mstate_global->__pyx_kp_u_ms_2;
        __pyx_t_24[23] = __pyx_t_22;
        __pyx_t_24[24] = __pyx_mstate_global->__pyx_kp_u_us_2;
        __pyx_t_24[25] = __pyx_t_23;
        __pyx_t_24[26] = __pyx_mstate_global->__pyx_kp_u_ns_2;

        /* "utils.pxd":10840
 *     except Exception as err:
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"             # <<<<<<<<<<<<<<
 *             "Supported units: %d'Y', %d'M', %d'W', %d'D', %d'h', %d'm', "
 *             "%d's', %d'ms', %d'us', %d'ns'" % (
*/
        __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 27, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_dtype_str) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 6 * 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_21) + 7 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_22) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23) + 5, 65535 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_dtype_str) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_25)) __PYX_ERR(5, 10840, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_25);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_25};
          __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10839, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
        }

        /* "utils.pxd":10857
 *                 DT_NPY_UNIT_NS,
 *             )
 *         ) from err             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError(
*/
        __Pyx_Raise(__pyx_t_7, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(5, 10839, __pyx_L14_error)
      }

      /* "utils.pxd":10838
 *     try:
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert ndarray[%s] from '%d' unit to int64 '%s' ticks.\n"
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
          if ( unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __Pyx_XGOTREF(__pyx_t_30);
          __Pyx_XGOTREF(__pyx_t_31);
          __Pyx_XGOTREF(__pyx_t_32);
          __Pyx_XGOTREF(__pyx_t_33);
          __pyx_t_11 = __pyx_lineno; __pyx_t_26 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_31);
          __Pyx_XGIVEREF(__pyx_t_32);
          __Pyx_XGIVEREF(__pyx_t_33);
          __Pyx_ExceptionReset(__pyx_t_31, __pyx_t_32, __pyx_t_33);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_30);
          __Pyx_ErrRestore(__pyx_t_28, __pyx_t_29, __pyx_t_30);
          __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_26; __pyx_filename = __pyx_t_27;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "utils.pxd":10836
 *     cdef str dtype_str = str(arr.dtype)
 *     cdef str arr_reso_str
 *     try:             # <<<<<<<<<<<<<<
 *         arr_reso_str = nptime_unit_int2str(arr_reso)
 *     except Exception as err:
*/
    __pyx_L5_except_error:;
    __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;
  }

  /* "utils.pxd":10827
 *     )
 * 
 * cdef inline bint _raise_dt64arr_to_reso_error(np.ndarray arr, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported conversion unit for datetime-like array.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.utils._raise_dt64arr_to_reso_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_dtype_str);
  __Pyx_XDECREF(__pyx_v_arr_reso_str);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10865
 *         )
 * 
 * cdef inline bint _raise_arr_dt64_rcl_error(str ops, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported unit for 'dt64arr_round/ceil/floor()' functions.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils__raise_arr_dt64_rcl_error(PyObject *__pyx_v_ops, int __pyx_v_arr_reso, PyObject *__pyx_v_to_unit) {
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6[7];
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_raise_arr_dt64_rcl_error", 0);

  /* "utils.pxd":10872
 *     :param to_unit `<'str'>`: The target round/ceil/floor numpy unit.
 *     """
 *     raise ValueError(             # <<<<<<<<<<<<<<
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)
*/
  __pyx_t_2 = NULL;

  /* "utils.pxd":10874
 *     raise ValueError(
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_3 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_v_arr_reso); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_v_ops); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_Failed_ndarray_datetime64;
  __pyx_t_6[1] = __pyx_t_4;
  __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__11;
  __pyx_t_6[3] = __pyx_t_3;
  __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_to;
  __pyx_t_6[5] = __pyx_t_5;
  __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u_resolution_is_not_supported;

  /* "utils.pxd":10873
 *     """
 *     raise ValueError(
 *         "Failed: <'ndarray[datetime64[%s]]'> %s to '%s' resolution is not supported."             # <<<<<<<<<<<<<<
 *         % (nptime_unit_int2str(arr_reso), ops, to_unit)
 *     )
*/
  __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 29 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 5 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 30, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
  if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10872, __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(5, 10872, __pyx_L1_error)

  /* "utils.pxd":10865
 *         )
 * 
 * cdef inline bint _raise_arr_dt64_rcl_error(str ops, int arr_reso, str to_unit) except -1:             # <<<<<<<<<<<<<<
 *     """(internal) Raise error for unsupported unit for 'dt64arr_round/ceil/floor()' functions.
 * 
*/

  /* 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_7);
  __Pyx_AddTraceback("cytimes.utils._raise_arr_dt64_rcl_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10879
 * # NumPy: ndarray[timedelta64] --------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'timedelta64[*]' `<'bool'>`.
 * 
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_td64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;

  /* "utils.pxd":10885
 *     >>> isinstance(arr.dtype, np.dtypes.TimeDelta64DType)
 *     """
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
*/
  __pyx_r = (PyArray_TYPE(__pyx_v_arr) == NPY_TIMEDELTA);
  goto __pyx_L0;

  /* "utils.pxd":10879
 * # NumPy: ndarray[timedelta64] --------------------------------------------------------------------------
 * # . type check
 * cdef inline bint is_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Check if the array is dtype of 'timedelta64[*]' `<'bool'>`.
 * 
*/

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "utils.pxd":10887
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
*/

static CYTHON_INLINE int __pyx_f_7cytimes_5utils_assure_td64arr(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __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;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assure_td64arr", 0);

  /* "utils.pxd":10889
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td64arr(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10889, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "utils.pxd":10890
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
*/
    __pyx_t_4 = NULL;

    /* "utils.pxd":10892
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
 *             "instead got 'np.ndarray[%s]'." % arr.dtype             # <<<<<<<<<<<<<<
 *         )
 *     return True
*/
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expects_instance_of_np_ndarray_t, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 10892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __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(5, 10890, __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(5, 10890, __pyx_L1_error)

    /* "utils.pxd":10889
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Expects instance of 'np.ndarray[timedelta64[*]]', "
*/
  }

  /* "utils.pxd":10894
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "utils.pxd":10887
 *     return np.PyArray_TYPE(arr) == np.NPY_TYPES.NPY_TIMEDELTA
 * 
 * cdef inline bint assure_td64arr(np.ndarray arr) except -1:             # <<<<<<<<<<<<<<
 *     """Assure the array is dtype of 'timedelta64[*]'."""
 *     if not is_td64arr(arr):
*/

  /* 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("cytimes.utils.assure_td64arr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_td64arr_as_int64_us(PyArrayObject *__pyx_v_arr, struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us *__pyx_optional_args) {
  int __pyx_v_arr_reso = ((int)-1);
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_arr_add __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("td64arr_as_int64_us", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_arr_reso = __pyx_optional_args->arr_reso;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_offset = __pyx_optional_args->offset;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_copy = __pyx_optional_args->copy;
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10920
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
*/
  __pyx_t_1 = (__pyx_v_arr_reso < 0);
  if (__pyx_t_1) {

    /* "utils.pxd":10921
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    __pyx_t_1 = (PyArray_TYPE(__pyx_v_arr) != NPY_TIMEDELTA);
    if (__pyx_t_1) {

      /* "utils.pxd":10922
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)             # <<<<<<<<<<<<<<
 *         arr_reso = get_arr_nptime_unit(arr)
 * 
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_missing_arr_reso_error(__pyx_v_arr); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10922, __pyx_L1_error)

      /* "utils.pxd":10921
 *     # Get array resolution
 *     if arr_reso < 0:
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:             # <<<<<<<<<<<<<<
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)
*/
    }

    /* "utils.pxd":10923
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
 *         arr_reso = get_arr_nptime_unit(arr)             # <<<<<<<<<<<<<<
 * 
 *     # Conversion
*/
    __pyx_t_2 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(__pyx_v_arr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 10923, __pyx_L1_error)
    __pyx_v_arr_reso = __pyx_t_2;

    /* "utils.pxd":10920
 *     """
 *     # Get array resolution
 *     if arr_reso < 0:             # <<<<<<<<<<<<<<
 *         if np.PyArray_TYPE(arr) != np.NPY_TYPES.NPY_TIMEDELTA:
 *             _raise_missing_arr_reso_error(arr)
*/
  }

  /* "utils.pxd":10926
 * 
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
*/
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.copy = __pyx_v_copy;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "utils.pxd":10927
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ns);
  if (__pyx_t_1) {

    /* "utils.pxd":10928
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.offset = __pyx_v_offset;
    __pyx_t_5.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(__pyx_v_arr, __pyx_v_7cytimes_5utils_NS_MICROSECOND, &__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10927
 *     # Conversion
 *     arr = arr_assure_int64(arr, copy)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
*/
  }

  /* "utils.pxd":10929
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_us);
  if (__pyx_t_1) {

    /* "utils.pxd":10930
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_add(__pyx_v_arr, __pyx_v_offset, &__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10929
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:   # nanosecond
 *         return arr_div_floor(arr, NS_MICROSECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
*/
  }

  /* "utils.pxd":10931
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_ms);
  if (__pyx_t_1) {

    /* "utils.pxd":10932
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MILLISECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10931
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:   # microsecond
 *         return arr_add(arr, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
*/
  }

  /* "utils.pxd":10933
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_s);
  if (__pyx_t_1) {

    /* "utils.pxd":10934
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_SECOND, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10933
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:   # millisecond
 *         return arr_mul(arr, US_MILLISECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
*/
  }

  /* "utils.pxd":10935
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_m);
  if (__pyx_t_1) {

    /* "utils.pxd":10936
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_MINUTE, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10935
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:    # second
 *         return arr_mul(arr, US_SECOND, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
*/
  }

  /* "utils.pxd":10937
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_h);
  if (__pyx_t_1) {

    /* "utils.pxd":10938
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_HOUR, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10937
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:    # minute
 *         return arr_mul(arr, US_MINUTE, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
*/
  }

  /* "utils.pxd":10939
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_D);
  if (__pyx_t_1) {

    /* "utils.pxd":10940
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_US_DAY, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10939
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:    # hour
 *         return arr_mul(arr, US_HOUR, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
*/
  }

  /* "utils.pxd":10941
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_W);
  if (__pyx_t_1) {

    /* "utils.pxd":10942
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.offset = __pyx_v_offset;
    __pyx_t_7.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, (__pyx_v_7cytimes_5utils_US_DAY * 7), &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10942, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10941
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:    # day
 *         return arr_mul(arr, US_DAY, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
*/
  }

  /* "utils.pxd":10943
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_M);
  if (__pyx_t_1) {

    /* "utils.pxd":10944
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)             # <<<<<<<<<<<<<<
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.offset = __pyx_v_offset;
    __pyx_t_8.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(__pyx_v_arr, NPY_FR_us, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10943
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_W:    # week
 *         return arr_mul(arr, US_DAY * 7, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month             # <<<<<<<<<<<<<<
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
*/
  }

  /* "utils.pxd":10945
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 * 
*/
  __pyx_t_1 = (__pyx_v_arr_reso == NPY_FR_Y);
  if (__pyx_t_1) {

    /* "utils.pxd":10946
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported array resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.offset = __pyx_v_offset;
    __pyx_t_9.copy = 0;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(__pyx_v_arr, NPY_FR_us, &__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 10946, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10945
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_M:    # month
 *         return _td64arr_M_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 *     if arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_Y:    # year             # <<<<<<<<<<<<<<
 *         return _td64arr_Y_as_int64_D(arr, np.NPY_DATETIMEUNIT.NPY_FR_us, offset, False)
 * 
*/
  }

  /* "utils.pxd":10949
 * 
 *     # Unsupported array resolution
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils__raise_dt64arr_to_reso_error(__pyx_v_arr, __pyx_v_arr_reso, __pyx_mstate_global->__pyx_n_u_us); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 10949, __pyx_L1_error)

  /* "utils.pxd":10897
 * 
 * # . conversion
 * cdef inline np.ndarray td64arr_as_int64_us(np.ndarray arr, int arr_reso=-1, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """Convert a 1-D ndarray[timedelta64[*]] to int64 microsecond ticks (us) `<'ndarray[int64]'>`.
 * 
*/

  /* function exit code */
  __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils.td64arr_as_int64_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_Y_as_int64_D(PyArrayObject *__pyx_v_arr, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64arr_Y_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64arr_Y_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":10968
 *     #   8,765.82 h  = 24 * 365.2425     = 438,291 / 50
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":10969
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_3) {

    /* "utils.pxd":10970
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x23AB1, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 0x190, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10969
 *     #   525,949.2 m = 1440 * 365.2425   = 2,629,746 / 5
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":10971
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_3) {

    /* "utils.pxd":10972
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x6B013, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_5), 50, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10971
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 400, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":10973
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_3) {

    /* "utils.pxd":10974
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x282072, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 10974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 5, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10973
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 50, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":10975
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_3) {

    /* "utils.pxd":10976
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_SECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10975
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 2_629_746, 0, False), 5, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":10977
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_3) {

    /* "utils.pxd":10978
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10977
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_YY_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":10979
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_3) {

    /* "utils.pxd":10980
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10979
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_YY_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":10981
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
 * 
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_3) {

    /* "utils.pxd":10982
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":10981
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_YY_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_YY_NANOSECOND, offset, False)
 * 
*/
  }

  /* "utils.pxd":10985
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):
*/
  __pyx_t_1 = NULL;
  __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 10985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 10985, __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(5, 10985, __pyx_L1_error)

  /* "utils.pxd":10951
 *     _raise_dt64arr_to_reso_error(arr, arr_reso, "us")
 * 
 * cdef inline np.ndarray _td64arr_Y_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[Y]] to int64 day ticks using an
 *     average year (365.2425 D), then further adjust the resolution by `to_reso` and
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._td64arr_Y_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/

static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils__td64arr_M_as_int64_D(PyArrayObject *__pyx_v_arr, int __pyx_v_to_reso, struct __pyx_opt_args_7cytimes_5utils__td64arr_M_as_int64_D *__pyx_optional_args) {
  npy_int64 __pyx_v_offset = ((npy_int64)0);
  int __pyx_v_copy = ((int)1);
  PyArrayObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_assure_int64 __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_arr_mul __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_arr_div_floor __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_td64arr_M_as_int64_D", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_offset = __pyx_optional_args->offset;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_copy = __pyx_optional_args->copy;
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "utils.pxd":11004
 *     #   730.485 h   = 24 * 30.436875    = 146097 / 200
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
*/
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.copy = __pyx_v_copy;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_assure_int64(__pyx_v_arr, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "utils.pxd":11005
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_D);
  if (__pyx_t_3) {

    /* "utils.pxd":11006
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0xBE3B, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 0x640, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11005
 *     #   43,829.1 m  = 1440 * 30.436875  = 438291 / 10
 *     arr = arr_assure_int64(arr, copy)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
*/
  }

  /* "utils.pxd":11007
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_h);
  if (__pyx_t_3) {

    /* "utils.pxd":11008
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x23AB1, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_5), 0xC8, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11008, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11007
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:   # day
 *         return arr_div_floor(arr_mul(arr, 48_699, 0, False), 1_600, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
*/
  }

  /* "utils.pxd":11009
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_m);
  if (__pyx_t_3) {

    /* "utils.pxd":11010
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = 0;
    __pyx_t_4.copy = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, 0x6B013, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 11010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6.__pyx_n = 2;
    __pyx_t_6.offset = __pyx_v_offset;
    __pyx_t_6.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_t_1), 10, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11010, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11009
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_h:   # hour
 *         return arr_div_floor(arr_mul(arr, 146_097, 0, False), 200, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute             # <<<<<<<<<<<<<<
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
*/
  }

  /* "utils.pxd":11011
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_s);
  if (__pyx_t_3) {

    /* "utils.pxd":11012
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_SECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11011
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_m:   # minute
 *         return arr_div_floor(arr_mul(arr, 438_291, 0, False), 10, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
*/
  }

  /* "utils.pxd":11013
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ms);
  if (__pyx_t_3) {

    /* "utils.pxd":11014
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11013
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_s:   # second
 *         return arr_mul(arr, TD64_MM_SECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
*/
  }

  /* "utils.pxd":11015
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_us);
  if (__pyx_t_3) {

    /* "utils.pxd":11016
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)             # <<<<<<<<<<<<<<
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11015
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ms:  # millisecond
 *         return arr_mul(arr, TD64_MM_MILLISECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
*/
  }

  /* "utils.pxd":11017
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
 * 
*/
  __pyx_t_3 = (__pyx_v_to_reso == NPY_FR_ns);
  if (__pyx_t_3) {

    /* "utils.pxd":11018
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported conversion resolution
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_4.__pyx_n = 2;
    __pyx_t_4.offset = __pyx_v_offset;
    __pyx_t_4.copy = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mul(__pyx_v_arr, __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND, &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11018, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_r = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "utils.pxd":11017
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_us:  # microsecond
 *         return arr_mul(arr, TD64_MM_MICROSECOND, offset, False)
 *     if to_reso == np.NPY_DATETIMEUNIT.NPY_FR_ns:  # nanosecond             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, TD64_MM_NANOSECOND, offset, False)
 * 
*/
  }

  /* "utils.pxd":11021
 * 
 *     # Unsupported conversion resolution
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)             # <<<<<<<<<<<<<<
*/
  __pyx_t_1 = NULL;
  __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_to_reso); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 11021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unsupported_conversion_unit_d_fo_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 11021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 11021, __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(5, 11021, __pyx_L1_error)

  /* "utils.pxd":10987
 *     raise AssertionError("Unsupported conversion unit '%d' for timedelta64 array." % to_reso)
 * 
 * cdef inline np.ndarray _td64arr_M_as_int64_D(np.ndarray arr, int to_reso, np.npy_int64 offset=0, bint copy=True):             # <<<<<<<<<<<<<<
 *     """(internal) Convert a 1-D ndarray[timedelta64[M]] to int64 day ticks using an
 *     average month (365.2425 / 12 = 30.436875 D), then further adjust the resolution
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._td64arr_M_as_int64_D", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_6parser__timelex(PyObject *__pyx_v_data, Py_ssize_t __pyx_v_pos, struct __pyx_opt_args_7cytimes_6parser__timelex *__pyx_optional_args) {
  Py_ssize_t __pyx_v_length = ((Py_ssize_t)0);
  __pyx_t_7cytimes_6parser_State __pyx_v_state;
  PyObject *__pyx_v_tokens = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_sub_token = 0;
  Py_UCS4 __pyx_v_ch;
  Py_UCS4 __pyx_v_ch_cache;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_dot_count;
  Py_ssize_t __pyx_v_com_count;
  int __pyx_v_is_dot_end;
  int __pyx_v_is_com_end;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_timelex", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_length = __pyx_optional_args->length;
    }
  }

  /* "cytimes/parser.pxd":40
 *     """
 *     # Validate bounds
 *     if length <= 0:             # <<<<<<<<<<<<<<
 *         length = str_len(data)
 *     if pos < 0:
*/
  __pyx_t_1 = (__pyx_v_length <= 0);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":41
 *     # Validate bounds
 *     if length <= 0:
 *         length = str_len(data)             # <<<<<<<<<<<<<<
 *     if pos < 0:
 *         pos = 0
*/
    __pyx_v_length = PyUnicode_GET_LENGTH(__pyx_v_data);

    /* "cytimes/parser.pxd":40
 *     """
 *     # Validate bounds
 *     if length <= 0:             # <<<<<<<<<<<<<<
 *         length = str_len(data)
 *     if pos < 0:
*/
  }

  /* "cytimes/parser.pxd":42
 *     if length <= 0:
 *         length = str_len(data)
 *     if pos < 0:             # <<<<<<<<<<<<<<
 *         pos = 0
 *     elif pos >= length:
*/
  __pyx_t_1 = (__pyx_v_pos < 0);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":43
 *         length = str_len(data)
 *     if pos < 0:
 *         pos = 0             # <<<<<<<<<<<<<<
 *     elif pos >= length:
 *         return []
*/
    __pyx_v_pos = 0;

    /* "cytimes/parser.pxd":42
 *     if length <= 0:
 *         length = str_len(data)
 *     if pos < 0:             # <<<<<<<<<<<<<<
 *         pos = 0
 *     elif pos >= length:
*/
    goto __pyx_L4;
  }

  /* "cytimes/parser.pxd":44
 *     if pos < 0:
 *         pos = 0
 *     elif pos >= length:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  __pyx_t_1 = (__pyx_v_pos >= __pyx_v_length);
  if (__pyx_t_1) {

    /* "cytimes/parser.pxd":45
 *         pos = 0
 *     elif pos >= length:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     # Setup
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cytimes/parser.pxd":44
 *     if pos < 0:
 *         pos = 0
 *     elif pos >= length:             # <<<<<<<<<<<<<<
 *         return []
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/parser.pxd":50
 *     cdef:
 *         State state
 *         list tokens = []             # <<<<<<<<<<<<<<
 *         str  token, sub_token
 *         Py_UCS4 ch              # current character
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tokens = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/parser.pxd":53
 *         str  token, sub_token
 *         Py_UCS4 ch              # current character
 *         Py_UCS4 ch_cache = 0    # cache character for next token             # <<<<<<<<<<<<<<
 *         Py_ssize_t i            # index for 'token'
 *         Py_ssize_t dot_count    # total 'dot' count in 'token'
*/
  __pyx_v_ch_cache = 0;

  /* "cytimes/parser.pxd":61
 * 
 *     # Skip leading control & space characters
 *     while pos < length and utils.is_ascii_ctl_or_space(str_read(data, pos)):             # <<<<<<<<<<<<<<
 *         pos += 1
 * 
*/
  while (1) {
    __pyx_t_3 = (__pyx_v_pos < __pyx_v_length);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(PyUnicode_READ_CHAR(__pyx_v_data, __pyx_v_pos));
    __pyx_t_1 = __pyx_t_3;
    __pyx_L7_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "cytimes/parser.pxd":62
 *     # Skip leading control & space characters
 *     while pos < length and utils.is_ascii_ctl_or_space(str_read(data, pos)):
 *         pos += 1             # <<<<<<<<<<<<<<
 * 
 *     # Main loop: begin -------------------------------------------------------
*/
    __pyx_v_pos = (__pyx_v_pos + 1);
  }

  /* "cytimes/parser.pxd":65
 * 
 *     # Main loop: begin -------------------------------------------------------
 *     while pos < length:             # <<<<<<<<<<<<<<
 *         # Reset
 *         state = State.START
*/
  while (1) {
    __pyx_t_1 = (__pyx_v_pos < __pyx_v_length);
    if (!__pyx_t_1) break;

    /* "cytimes/parser.pxd":67
 *     while pos < length:
 *         # Reset
 *         state = State.START             # <<<<<<<<<<<<<<
 *         token = None
 *         dot_count = com_count = 0
*/
    __pyx_v_state = __pyx_e_7cytimes_6parser_START;

    /* "cytimes/parser.pxd":68
 *         # Reset
 *         state = State.START
 *         token = None             # <<<<<<<<<<<<<<
 *         dot_count = com_count = 0
 *         is_dot_end = is_com_end = False
*/
    __Pyx_INCREF(Py_None);
    __Pyx_XDECREF_SET(__pyx_v_token, ((PyObject*)Py_None));

    /* "cytimes/parser.pxd":69
 *         state = State.START
 *         token = None
 *         dot_count = com_count = 0             # <<<<<<<<<<<<<<
 *         is_dot_end = is_com_end = False
 * 
*/
    __pyx_v_dot_count = 0;
    __pyx_v_com_count = 0;

    /* "cytimes/parser.pxd":70
 *         token = None
 *         dot_count = com_count = 0
 *         is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 * 
 *         # Nested loop: begin - - - - - - - - - - - - - - - - - - - - - - - - -
*/
    __pyx_v_is_dot_end = 0;
    __pyx_v_is_com_end = 0;

    /* "cytimes/parser.pxd":73
 * 
 *         # Nested loop: begin - - - - - - - - - - - - - - - - - - - - - - - - -
 *         while pos < length:             # <<<<<<<<<<<<<<
 *             # Read new character
 *             if ch_cache == 0:
*/
    while (1) {
      __pyx_t_1 = (__pyx_v_pos < __pyx_v_length);
      if (!__pyx_t_1) break;

      /* "cytimes/parser.pxd":75
 *         while pos < length:
 *             # Read new character
 *             if ch_cache == 0:             # <<<<<<<<<<<<<<
 *                 ch = str_read(data, pos)
 *                 # . normalize space
*/
      __pyx_t_1 = (__pyx_v_ch_cache == 0);
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":76
 *             # Read new character
 *             if ch_cache == 0:
 *                 ch = str_read(data, pos)             # <<<<<<<<<<<<<<
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):
*/
        __pyx_v_ch = PyUnicode_READ_CHAR(__pyx_v_data, __pyx_v_pos);

        /* "cytimes/parser.pxd":78
 *                 ch = str_read(data, pos)
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):             # <<<<<<<<<<<<<<
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":79
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):
 *                     ch = 32  # 'space'             # <<<<<<<<<<<<<<
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):
*/
          __pyx_v_ch = 32;

          /* "cytimes/parser.pxd":81
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):             # <<<<<<<<<<<<<<
 *                         pos += 1
 *             # Comsume cache
*/
          while (1) {
            __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(PyUnicode_READ_CHAR(__pyx_v_data, (__pyx_v_pos + 1)));
            if (!__pyx_t_1) break;

            /* "cytimes/parser.pxd":82
 *                     # remove adjacent spaces*
 *                     while utils.is_ascii_ctl_or_space(str_read(data, pos + 1)):
 *                         pos += 1             # <<<<<<<<<<<<<<
 *             # Comsume cache
 *             else:
*/
            __pyx_v_pos = (__pyx_v_pos + 1);
          }

          /* "cytimes/parser.pxd":78
 *                 ch = str_read(data, pos)
 *                 # . normalize space
 *                 if utils.is_ascii_ctl_or_space(ch):             # <<<<<<<<<<<<<<
 *                     ch = 32  # 'space'
 *                     # remove adjacent spaces*
*/
        }

        /* "cytimes/parser.pxd":75
 *         while pos < length:
 *             # Read new character
 *             if ch_cache == 0:             # <<<<<<<<<<<<<<
 *                 ch = str_read(data, pos)
 *                 # . normalize space
*/
        goto __pyx_L13;
      }

      /* "cytimes/parser.pxd":85
 *             # Comsume cache
 *             else:
 *                 ch = ch_cache             # <<<<<<<<<<<<<<
 *                 ch_cache = 0
 * 
*/
      /*else*/ {
        __pyx_v_ch = __pyx_v_ch_cache;

        /* "cytimes/parser.pxd":86
 *             else:
 *                 ch = ch_cache
 *                 ch_cache = 0             # <<<<<<<<<<<<<<
 * 
 *             # State: START
*/
        __pyx_v_ch_cache = 0;
      }
      __pyx_L13:;

      /* "cytimes/parser.pxd":89
 * 
 *             # State: START
 *             if state == State.START:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
*/
      switch (__pyx_v_state) {
        case __pyx_e_7cytimes_6parser_START:

        /* "cytimes/parser.pxd":91
 *             if state == State.START:
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":92
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
 *                     token = str_chr(ch)             # collect digit             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT             # set state: DIGIT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 92, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":93
 *                 if utils.is_ascii_digit(ch):
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT;

          /* "cytimes/parser.pxd":94
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":91
 *             if state == State.START:
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect digit
 *                     state = State.DIGIT             # set state: DIGIT
*/
          goto __pyx_L17;
        }

        /* "cytimes/parser.pxd":96
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":97
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):
 *                     token = str_chr(ch)             # collect alpha             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA             # set state: ALPHA
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 97, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":98
 *                 elif utils.is_alpha(ch):
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . emit single character token
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA;

          /* "cytimes/parser.pxd":99
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . emit single character token
 *                 else:
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":96
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: a)
 *                 elif utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token = str_chr(ch)             # collect alpha
 *                     state = State.ALPHA             # set state: ALPHA
*/
          goto __pyx_L17;
        }

        /* "cytimes/parser.pxd":102
 *                 # . emit single character token
 *                 else:
 *                     tokens.append(str_chr(ch))             # <<<<<<<<<<<<<<
 *                     pos += 1
 *                     break   # end token; start a new one
*/
        /*else*/ {
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 102, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_t_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 102, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":103
 *                 else:
 *                     tokens.append(str_chr(ch))
 *                     pos += 1             # <<<<<<<<<<<<<<
 *                     break   # end token; start a new one
 * 
*/
          __pyx_v_pos = (__pyx_v_pos + 1);

          /* "cytimes/parser.pxd":104
 *                     tokens.append(str_chr(ch))
 *                     pos += 1
 *                     break   # end token; start a new one             # <<<<<<<<<<<<<<
 * 
 *             # State: DIGIT
*/
          goto __pyx_L12_break;
        }
        __pyx_L17:;

        /* "cytimes/parser.pxd":89
 * 
 *             # State: START
 *             if state == State.START:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: 1)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_DIGIT:

        /* "cytimes/parser.pxd":109
 *             elif state == State.DIGIT:
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":110
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":111
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":109
 *             elif state == State.DIGIT:
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":113
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":114
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":115
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":116
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":117
 *                     dot_count += 1                  # increase dot count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":113
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":119
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:             # <<<<<<<<<<<<<<
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
*/
        __pyx_t_1 = (__pyx_v_ch == 44);
        if (__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L19_bool_binop_done;
        }
        __pyx_t_1 = (__pyx_v_dot_count == 0);
        if (__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L19_bool_binop_done;
        }
        __pyx_t_1 = (__pyx_v_com_count == 0);
        __pyx_t_3 = __pyx_t_1;
        __pyx_L19_bool_binop_done:;
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":120
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
 *                     token += ","                    # collect comma             # <<<<<<<<<<<<<<
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__12); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 120, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":121
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = False, True
*/
          __pyx_v_com_count = (__pyx_v_com_count + 1);

          /* "cytimes/parser.pxd":122
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = False, True
 *                 # . cache for next token & stop
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":123
 *                     com_count += 1                  # increase comma count
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end, is_com_end = False, True             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_3 = 0;
          __pyx_t_1 = 1;
          __pyx_v_is_dot_end = __pyx_t_3;
          __pyx_v_is_com_end = __pyx_t_1;

          /* "cytimes/parser.pxd":119
 *                     is_dot_end, is_com_end = True, False
 *                 # . comma (e.g: [X]1,)
 *                 elif ch == ',' and dot_count == 0 and com_count == 0:             # <<<<<<<<<<<<<<
 *                     token += ","                    # collect comma
 *                     com_count += 1                  # increase comma count
*/
          goto __pyx_L18;
        }

        /* "cytimes/parser.pxd":126
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":127
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: DIGIT_DOT
*/
          goto __pyx_L12_break;
        }
        __pyx_L18:;

        /* "cytimes/parser.pxd":107
 * 
 *             # State: DIGIT
 *             elif state == State.DIGIT:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]12)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_DIGIT_DOT:

        /* "cytimes/parser.pxd":132
 *             elif state == State.DIGIT_DOT:
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":133
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":134
 *                 if utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":132
 *             elif state == State.DIGIT_DOT:
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":136
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
*/
        if (__pyx_v_is_dot_end) {
        } else {
          __pyx_t_1 = __pyx_v_is_dot_end;
          goto __pyx_L23_bool_binop_done;
        }
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        __pyx_t_1 = __pyx_t_3;
        __pyx_L23_bool_binop_done:;
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":137
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 137, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 137, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":138
 *                 elif is_dot_end and utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA_DOT;

          /* "cytimes/parser.pxd":139
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":136
 *                     is_dot_end = is_com_end = False
 *                 # . alpha (e.g: [X]1.a)
 *                 elif is_dot_end and utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     state = State.ALPHA_DOT  # set state: ALPHA_DOT
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":141
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":142
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 142, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":143
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":144
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":141
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]1.2.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L22;
        }

        /* "cytimes/parser.pxd":147
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":148
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: ALPHA
*/
          goto __pyx_L12_break;
        }
        __pyx_L22:;

        /* "cytimes/parser.pxd":130
 * 
 *             # State: DIGIT_DOT
 *             elif state == State.DIGIT_DOT:             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]1.2)
 *                 if utils.is_ascii_digit(ch):
*/
        break;
        case __pyx_e_7cytimes_6parser_ALPHA:

        /* "cytimes/parser.pxd":153
 *             elif state == State.ALPHA:
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":154
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":155
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":153
 *             elif state == State.ALPHA:
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L25;
        }

        /* "cytimes/parser.pxd":157
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_3 = (__pyx_v_ch == 46);
        if (__pyx_t_3) {

          /* "cytimes/parser.pxd":158
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
*/
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":159
 *                 elif ch == ".":
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":160
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_ALPHA_DOT;

          /* "cytimes/parser.pxd":161
 *                     dot_count += 1                  # increase dot count
 *                     state = State.ALPHA_DOT         # set state: ALPHA_DOT
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_3 = 1;
          __pyx_t_1 = 0;
          __pyx_v_is_dot_end = __pyx_t_3;
          __pyx_v_is_com_end = __pyx_t_1;

          /* "cytimes/parser.pxd":157
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.)
 *                 elif ch == ".":             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L25;
        }

        /* "cytimes/parser.pxd":164
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":165
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # State: ALPHA_DOT
*/
          goto __pyx_L12_break;
        }
        __pyx_L25:;

        /* "cytimes/parser.pxd":151
 * 
 *             # State: ALPHA
 *             elif state == State.ALPHA:             # <<<<<<<<<<<<<<
 *                 # . alpha (e.g: [X]ab)
 *                 if utils.is_alpha(ch):
*/
        break;
        default:

        /* "cytimes/parser.pxd":170
 *             else:
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
        __pyx_t_1 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_ch);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":171
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
*/
          __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 171, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 171, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

          /* "cytimes/parser.pxd":172
 *                 if utils.is_alpha(ch):
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":170
 *             else:
 *                 # . alpha (e.g: [X]a.b)
 *                 if utils.is_alpha(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect alpha
 *                     is_dot_end = is_com_end = False
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":174
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
        if (__pyx_v_is_dot_end) {
        } else {
          __pyx_t_1 = __pyx_v_is_dot_end;
          goto __pyx_L27_bool_binop_done;
        }
        __pyx_t_3 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_ch);
        __pyx_t_1 = __pyx_t_3;
        __pyx_L27_bool_binop_done:;
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":175
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit             # <<<<<<<<<<<<<<
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end = is_com_end = False
*/
          __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":176
 *                 elif is_dot_end and utils.is_ascii_digit(ch):
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT             # <<<<<<<<<<<<<<
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
*/
          __pyx_v_state = __pyx_e_7cytimes_6parser_DIGIT_DOT;

          /* "cytimes/parser.pxd":177
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
 *                     is_dot_end = is_com_end = False             # <<<<<<<<<<<<<<
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':
*/
          __pyx_v_is_dot_end = 0;
          __pyx_v_is_com_end = 0;

          /* "cytimes/parser.pxd":174
 *                     is_dot_end = is_com_end = False
 *                 # . digit (e.g: [X]a.1)
 *                 elif is_dot_end and utils.is_ascii_digit(ch):             # <<<<<<<<<<<<<<
 *                     token += str_chr(ch)            # collect digit
 *                     state = State.DIGIT_DOT         # set state: DIGIT_DOT
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":179
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
        __pyx_t_1 = (__pyx_v_ch == 46);
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":180
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':
 *                     token += "."                    # collect dot             # <<<<<<<<<<<<<<
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False
*/
          __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 180, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_token, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

          /* "cytimes/parser.pxd":181
 *                 elif ch == '.':
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count             # <<<<<<<<<<<<<<
 *                     is_dot_end, is_com_end = True, False
 *                 # . cache for next token & stop
*/
          __pyx_v_dot_count = (__pyx_v_dot_count + 1);

          /* "cytimes/parser.pxd":182
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
 *                     is_dot_end, is_com_end = True, False             # <<<<<<<<<<<<<<
 *                 # . cache for next token & stop
 *                 else:
*/
          __pyx_t_1 = 1;
          __pyx_t_3 = 0;
          __pyx_v_is_dot_end = __pyx_t_1;
          __pyx_v_is_com_end = __pyx_t_3;

          /* "cytimes/parser.pxd":179
 *                     is_dot_end = is_com_end = False
 *                 # . dot   (e.g: [X]a.b.)
 *                 elif ch == '.':             # <<<<<<<<<<<<<<
 *                     token += "."                    # collect dot
 *                     dot_count += 1                  # increase dot count
*/
          goto __pyx_L26;
        }

        /* "cytimes/parser.pxd":185
 *                 # . cache for next token & stop
 *                 else:
 *                     ch_cache = ch             # <<<<<<<<<<<<<<
 *                     break
 * 
*/
        /*else*/ {
          __pyx_v_ch_cache = __pyx_v_ch;

          /* "cytimes/parser.pxd":186
 *                 else:
 *                     ch_cache = ch
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             # Next character
*/
          goto __pyx_L12_break;
        }
        __pyx_L26:;
        break;
      }

      /* "cytimes/parser.pxd":189
 * 
 *             # Next character
 *             pos += 1             # <<<<<<<<<<<<<<
 * 
 *         # Add token
*/
      __pyx_v_pos = (__pyx_v_pos + 1);
    }
    __pyx_L12_break:;

    /* "cytimes/parser.pxd":192
 * 
 *         # Add token
 *         if token is not None:             # <<<<<<<<<<<<<<
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
*/
    __pyx_t_3 = (__pyx_v_token != ((PyObject*)Py_None));
    if (__pyx_t_3) {

      /* "cytimes/parser.pxd":194
 *         if token is not None:
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):             # <<<<<<<<<<<<<<
 *                 tokens.append(token)
 * 
*/
      switch (__pyx_v_state) {
        case __pyx_e_7cytimes_6parser_ALPHA:
        case __pyx_e_7cytimes_6parser_DIGIT:
        __pyx_t_3 = 1;
        break;
        default:
        __pyx_t_3 = 0;
        break;
      }
      __pyx_t_1 = __pyx_t_3;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":195
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
 *                 tokens.append(token)             # <<<<<<<<<<<<<<
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
*/
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 195, __pyx_L1_error)

        /* "cytimes/parser.pxd":194
 *         if token is not None:
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):             # <<<<<<<<<<<<<<
 *                 tokens.append(token)
 * 
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":198
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:             # <<<<<<<<<<<<<<
 *                 sub_token = None
 *                 for i in range(str_len(token)):
*/
      __pyx_t_3 = (__pyx_v_state == __pyx_e_7cytimes_6parser_ALPHA_DOT);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L31_bool_binop_done;
      }
      if (!__pyx_v_is_dot_end) {
      } else {
        __pyx_t_1 = __pyx_v_is_dot_end;
        goto __pyx_L31_bool_binop_done;
      }
      if (!__pyx_v_is_com_end) {
      } else {
        __pyx_t_1 = __pyx_v_is_com_end;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_dot_count > 1);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_com_count > 1);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L31_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":199
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:
 *                 sub_token = None             # <<<<<<<<<<<<<<
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
*/
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

        /* "cytimes/parser.pxd":200
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:
 *                 sub_token = None
 *                 for i in range(str_len(token)):             # <<<<<<<<<<<<<<
 *                     ch = str_read(token, i)
 *                     if ch == '.':
*/
        __pyx_t_6 = PyUnicode_GET_LENGTH(__pyx_v_token);
        __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;

          /* "cytimes/parser.pxd":201
 *                 sub_token = None
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)             # <<<<<<<<<<<<<<
 *                     if ch == '.':
 *                         if sub_token is not None:
*/
          __pyx_v_ch = PyUnicode_READ_CHAR(__pyx_v_token, __pyx_v_i);

          /* "cytimes/parser.pxd":202
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
 *                     if ch == '.':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
          switch (__pyx_v_ch) {
            case 46:

            /* "cytimes/parser.pxd":203
 *                     ch = str_read(token, i)
 *                     if ch == '.':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":204
 *                     if ch == '.':
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)             # <<<<<<<<<<<<<<
 *                             sub_token = None
 *                         tokens.append(".")
*/
              __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 204, __pyx_L1_error)

              /* "cytimes/parser.pxd":205
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
 *                             sub_token = None             # <<<<<<<<<<<<<<
 *                         tokens.append(".")
 *                     elif ch == ',':
*/
              __Pyx_INCREF(Py_None);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

              /* "cytimes/parser.pxd":203
 *                     ch = str_read(token, i)
 *                     if ch == '.':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            }

            /* "cytimes/parser.pxd":206
 *                             tokens.append(sub_token)
 *                             sub_token = None
 *                         tokens.append(".")             # <<<<<<<<<<<<<<
 *                     elif ch == ',':
 *                         if sub_token is not None:
*/
            __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 206, __pyx_L1_error)

            /* "cytimes/parser.pxd":202
 *                 for i in range(str_len(token)):
 *                     ch = str_read(token, i)
 *                     if ch == '.':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
            break;
            case 44:

            /* "cytimes/parser.pxd":208
 *                         tokens.append(".")
 *                     elif ch == ',':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":209
 *                     elif ch == ',':
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)             # <<<<<<<<<<<<<<
 *                             sub_token = None
 *                         tokens.append(",")
*/
              __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 209, __pyx_L1_error)

              /* "cytimes/parser.pxd":210
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
 *                             sub_token = None             # <<<<<<<<<<<<<<
 *                         tokens.append(",")
 *                     else:
*/
              __Pyx_INCREF(Py_None);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)Py_None));

              /* "cytimes/parser.pxd":208
 *                         tokens.append(".")
 *                     elif ch == ',':
 *                         if sub_token is not None:             # <<<<<<<<<<<<<<
 *                             tokens.append(sub_token)
 *                             sub_token = None
*/
            }

            /* "cytimes/parser.pxd":211
 *                             tokens.append(sub_token)
 *                             sub_token = None
 *                         tokens.append(",")             # <<<<<<<<<<<<<<
 *                     else:
 *                         if sub_token is None:
*/
            __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_mstate_global->__pyx_kp_u__12); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 211, __pyx_L1_error)

            /* "cytimes/parser.pxd":207
 *                             sub_token = None
 *                         tokens.append(".")
 *                     elif ch == ',':             # <<<<<<<<<<<<<<
 *                         if sub_token is not None:
 *                             tokens.append(sub_token)
*/
            break;
            default:

            /* "cytimes/parser.pxd":213
 *                         tokens.append(",")
 *                     else:
 *                         if sub_token is None:             # <<<<<<<<<<<<<<
 *                             sub_token = str_chr(ch)
 *                         else:
*/
            __pyx_t_1 = (__pyx_v_sub_token == ((PyObject*)Py_None));
            if (__pyx_t_1) {

              /* "cytimes/parser.pxd":214
 *                     else:
 *                         if sub_token is None:
 *                             sub_token = str_chr(ch)             # <<<<<<<<<<<<<<
 *                         else:
 *                             sub_token += str_chr(ch)
*/
              __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 214, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)__pyx_t_2));
              __pyx_t_2 = 0;

              /* "cytimes/parser.pxd":213
 *                         tokens.append(",")
 *                     else:
 *                         if sub_token is None:             # <<<<<<<<<<<<<<
 *                             sub_token = str_chr(ch)
 *                         else:
*/
              goto __pyx_L40;
            }

            /* "cytimes/parser.pxd":216
 *                             sub_token = str_chr(ch)
 *                         else:
 *                             sub_token += str_chr(ch)             # <<<<<<<<<<<<<<
 *                 if sub_token is not None:
 *                     tokens.append(sub_token)
*/
            /*else*/ {
              __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_ch); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 216, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_5 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(__pyx_v_sub_token, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 216, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF_SET(__pyx_v_sub_token, ((PyObject*)__pyx_t_5));
              __pyx_t_5 = 0;
            }
            __pyx_L40:;
            break;
          }
        }

        /* "cytimes/parser.pxd":217
 *                         else:
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:             # <<<<<<<<<<<<<<
 *                     tokens.append(sub_token)
 * 
*/
        __pyx_t_1 = (__pyx_v_sub_token != ((PyObject*)Py_None));
        if (__pyx_t_1) {

          /* "cytimes/parser.pxd":218
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:
 *                     tokens.append(sub_token)             # <<<<<<<<<<<<<<
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
*/
          __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_sub_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 218, __pyx_L1_error)

          /* "cytimes/parser.pxd":217
 *                         else:
 *                             sub_token += str_chr(ch)
 *                 if sub_token is not None:             # <<<<<<<<<<<<<<
 *                     tokens.append(sub_token)
 * 
*/
        }

        /* "cytimes/parser.pxd":198
 * 
 *             # Mixed token with dots/commas => split into sub-tokens
 *             elif state == State.ALPHA_DOT or is_dot_end or is_com_end or dot_count > 1 or com_count > 1:             # <<<<<<<<<<<<<<
 *                 sub_token = None
 *                 for i in range(str_len(token)):
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":221
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:             # <<<<<<<<<<<<<<
 *                 tokens.append(str_replace(token, ",", ".", -1))
 * 
*/
      __pyx_t_3 = (__pyx_v_state == __pyx_e_7cytimes_6parser_DIGIT_DOT);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_com_count == 1);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_3 = (__pyx_v_dot_count == 0);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L42_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cytimes/parser.pxd":222
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:
 *                 tokens.append(str_replace(token, ",", ".", -1))             # <<<<<<<<<<<<<<
 * 
 *             # Other cases
*/
        __pyx_t_5 = PyUnicode_Replace(__pyx_v_token, __pyx_mstate_global->__pyx_kp_u__12, __pyx_mstate_global->__pyx_kp_u__2, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 222, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cytimes/parser.pxd":221
 * 
 *             # Decimal comma normalization (e.g., '1,234' -> '1.234')
 *             elif state == State.DIGIT_DOT and com_count == 1 and dot_count == 0:             # <<<<<<<<<<<<<<
 *                 tokens.append(str_replace(token, ",", ".", -1))
 * 
*/
        goto __pyx_L30;
      }

      /* "cytimes/parser.pxd":226
 *             # Other cases
 *             else:
 *                 tokens.append(token)             # <<<<<<<<<<<<<<
 * 
 *         # Nested loop: break - - - - - - - - - - - - - - - - - - - - - - - - -
*/
      /*else*/ {
        __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_tokens, __pyx_v_token); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 226, __pyx_L1_error)
      }
      __pyx_L30:;

      /* "cytimes/parser.pxd":192
 * 
 *         # Add token
 *         if token is not None:             # <<<<<<<<<<<<<<
 *             # Pure alpha or digit token
 *             if state in (State.ALPHA, State.DIGIT):
*/
    }
  }

  /* "cytimes/parser.pxd":231
 * 
 *     # Main loop: break -------------------------------------------------------
 *     return tokens             # <<<<<<<<<<<<<<
 * 
 * cpdef list timelex(str dtstr)
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_tokens);
  __pyx_r = __pyx_v_tokens;
  goto __pyx_L0;

  /* "cytimes/parser.pxd":20
 *     ALPHA_DOT = 4
 * 
 * cdef inline list _timelex(str data, Py_ssize_t pos, Py_ssize_t length=0):             # <<<<<<<<<<<<<<
 *     """Tokenize a datetime-like string into lexical units (tokens).
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.parser._timelex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tokens);
  __Pyx_XDECREF(__pyx_v_token);
  __Pyx_XDECREF(__pyx_v_sub_token);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":44
 * 
 * # Utils ---------------------------------------------------------------------------------------
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * @cython.exceptval(-2, check=False)
*/

static PY_LONG_LONG __pyx_f_7cytimes_4pydt__parse_unit_factor(PyObject *__pyx_v_cls, PyObject *__pyx_v_unit) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  PY_LONG_LONG __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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("_parse_unit_factor", 0);

  /* "cytimes/pydt.py":56
 *     """
 *     # Guard
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         errors.raise_argument_error(
 *             cls,
*/
  __pyx_t_1 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":57
 *     # Guard
 *     if unit is None:
 *         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *             cls,
 *             "round/ceil/floor(unit)",
*/
    __pyx_t_2.__pyx_n = 3;
    __pyx_t_2.cls = __pyx_v_cls;
    __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_round_ceil_floor_unit;
    __pyx_t_2.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_D_h_m_s_ms_or_us_got_No;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error)

    /* "cytimes/pydt.py":56
 *     """
 *     # Guard
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         errors.raise_argument_error(
 *             cls,
*/
  }

  /* "cytimes/pydt.py":64
 * 
 *     # Unit: 's', 'm', 'h', 'D'
 *     unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *     if unit_len == 1:
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":65
 *     # Unit: 's', 'm', 'h', 'D'
 *     unit_len: cython.Py_ssize_t = str_len(unit)
 *     if unit_len == 1:             # <<<<<<<<<<<<<<
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "s":
*/
  __pyx_t_1 = (__pyx_v_unit_len == 1);
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":66
 *     unit_len: cython.Py_ssize_t = str_len(unit)
 *     if unit_len == 1:
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "s":
 *             return utils.US_SECOND
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":67
 *     if unit_len == 1:
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "s":             # <<<<<<<<<<<<<<
 *             return utils.US_SECOND
 *         if ch0 == "m":
*/
    __pyx_t_1 = (__pyx_v_ch0 == 0x73);
    if (__pyx_t_1) {

      /* "cytimes/pydt.py":68
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "s":
 *             return utils.US_SECOND             # <<<<<<<<<<<<<<
 *         if ch0 == "m":
 *             return utils.US_MINUTE
*/
      __pyx_r = __pyx_v_7cytimes_5utils_US_SECOND;
      goto __pyx_L0;

      /* "cytimes/pydt.py":67
 *     if unit_len == 1:
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "s":             # <<<<<<<<<<<<<<
 *             return utils.US_SECOND
 *         if ch0 == "m":
*/
    }

    /* "cytimes/pydt.py":69
 *         if ch0 == "s":
 *             return utils.US_SECOND
 *         if ch0 == "m":             # <<<<<<<<<<<<<<
 *             return utils.US_MINUTE
 *         if ch0 == "h":
*/
    __pyx_t_1 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_1) {

      /* "cytimes/pydt.py":70
 *             return utils.US_SECOND
 *         if ch0 == "m":
 *             return utils.US_MINUTE             # <<<<<<<<<<<<<<
 *         if ch0 == "h":
 *             return utils.US_HOUR
*/
      __pyx_r = __pyx_v_7cytimes_5utils_US_MINUTE;
      goto __pyx_L0;

      /* "cytimes/pydt.py":69
 *         if ch0 == "s":
 *             return utils.US_SECOND
 *         if ch0 == "m":             # <<<<<<<<<<<<<<
 *             return utils.US_MINUTE
 *         if ch0 == "h":
*/
    }

    /* "cytimes/pydt.py":71
 *         if ch0 == "m":
 *             return utils.US_MINUTE
 *         if ch0 == "h":             # <<<<<<<<<<<<<<
 *             return utils.US_HOUR
 *         if ch0 == "D":
*/
    __pyx_t_1 = (__pyx_v_ch0 == 0x68);
    if (__pyx_t_1) {

      /* "cytimes/pydt.py":72
 *             return utils.US_MINUTE
 *         if ch0 == "h":
 *             return utils.US_HOUR             # <<<<<<<<<<<<<<
 *         if ch0 == "D":
 *             return utils.US_DAY
*/
      __pyx_r = __pyx_v_7cytimes_5utils_US_HOUR;
      goto __pyx_L0;

      /* "cytimes/pydt.py":71
 *         if ch0 == "m":
 *             return utils.US_MINUTE
 *         if ch0 == "h":             # <<<<<<<<<<<<<<
 *             return utils.US_HOUR
 *         if ch0 == "D":
*/
    }

    /* "cytimes/pydt.py":73
 *         if ch0 == "h":
 *             return utils.US_HOUR
 *         if ch0 == "D":             # <<<<<<<<<<<<<<
 *             return utils.US_DAY
 * 
*/
    __pyx_t_1 = (__pyx_v_ch0 == 68);
    if (__pyx_t_1) {

      /* "cytimes/pydt.py":74
 *             return utils.US_HOUR
 *         if ch0 == "D":
 *             return utils.US_DAY             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'ms', 'us', 'ns'
*/
      __pyx_r = __pyx_v_7cytimes_5utils_US_DAY;
      goto __pyx_L0;

      /* "cytimes/pydt.py":73
 *         if ch0 == "h":
 *             return utils.US_HOUR
 *         if ch0 == "D":             # <<<<<<<<<<<<<<
 *             return utils.US_DAY
 * 
*/
    }

    /* "cytimes/pydt.py":65
 *     # Unit: 's', 'm', 'h', 'D'
 *     unit_len: cython.Py_ssize_t = str_len(unit)
 *     if unit_len == 1:             # <<<<<<<<<<<<<<
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "s":
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":77
 * 
 *     # Unit: 'ms', 'us', 'ns'
 *     elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "m":
*/
  __pyx_t_3 = (__pyx_v_unit_len == 2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_3 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":78
 *     # Unit: 'ms', 'us', 'ns'
 *     elif unit_len == 2 and str_read(unit, 1) == "s":
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *         if ch0 == "m":
 *             return utils.US_MILLISECOND
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":79
 *     elif unit_len == 2 and str_read(unit, 1) == "s":
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "m":             # <<<<<<<<<<<<<<
 *             return utils.US_MILLISECOND
 *         if ch0 in ("u", "n"):
*/
    __pyx_t_1 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_1) {

      /* "cytimes/pydt.py":80
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "m":
 *             return utils.US_MILLISECOND             # <<<<<<<<<<<<<<
 *         if ch0 in ("u", "n"):
 *             return 1
*/
      __pyx_r = __pyx_v_7cytimes_5utils_US_MILLISECOND;
      goto __pyx_L0;

      /* "cytimes/pydt.py":79
 *     elif unit_len == 2 and str_read(unit, 1) == "s":
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "m":             # <<<<<<<<<<<<<<
 *             return utils.US_MILLISECOND
 *         if ch0 in ("u", "n"):
*/
    }

    /* "cytimes/pydt.py":81
 *         if ch0 == "m":
 *             return utils.US_MILLISECOND
 *         if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *             return 1
 * 
*/
    switch (__pyx_v_ch0) {
      case 0x75:
      case 0x6E:

      /* "cytimes/pydt.py":82
 *             return utils.US_MILLISECOND
 *         if ch0 in ("u", "n"):
 *             return 1             # <<<<<<<<<<<<<<
 * 
 *     # Unit: 'min' for pandas compatibility
*/
      __pyx_r = 1;
      goto __pyx_L0;

      /* "cytimes/pydt.py":81
 *         if ch0 == "m":
 *             return utils.US_MILLISECOND
 *         if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *             return 1
 * 
*/
      break;
      default: break;
    }

    /* "cytimes/pydt.py":77
 * 
 *     # Unit: 'ms', 'us', 'ns'
 *     elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *         ch0: cython.Py_UCS4 = str_read(unit, 0)
 *         if ch0 == "m":
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":85
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return utils.US_MINUTE
 * 
*/
  __pyx_t_3 = (__pyx_v_unit_len == 3);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":86
 *     # Unit: 'min' for pandas compatibility
 *     elif unit_len == 3 and unit == "min":
 *         return utils.US_MINUTE             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported unit
*/
    __pyx_r = __pyx_v_7cytimes_5utils_US_MINUTE;
    goto __pyx_L0;

    /* "cytimes/pydt.py":85
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return utils.US_MINUTE
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/pydt.py":92
 *         cls,
 *         "round/ceil/floor(unit)",
 *         "Supports: 'D', 'h', 'm', 's', 'ms' or 'us'; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *     )
 * 
*/
  __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_D_h_m_s_ms_or_us_got_s, __pyx_v_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/pydt.py":89
 * 
 *     # Unsupported unit
 *     errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *         cls,
 *         "round/ceil/floor(unit)",
*/
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.cls = __pyx_v_cls;
  __pyx_t_2.input_msg = __pyx_mstate_global->__pyx_kp_u_round_ceil_floor_unit;
  __pyx_t_2.error_msg = ((PyObject*)__pyx_t_4);
  __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/pydt.py":44
 * 
 * # Utils ---------------------------------------------------------------------------------------
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * @cython.exceptval(-2, check=False)
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._parse_unit_factor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -2LL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":107
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_1_new(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt__new, "(internal) Create a new `Pydt` instance.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_1_new = {"_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_1_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt__new};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_1_new(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  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_tzinfo = 0;
  int __pyx_v_fold;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_tzinfo,&__pyx_mstate_global->__pyx_n_u_fold,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 107, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_new", 0) < (0)) __PYX_ERR(0, 107, __pyx_L3_error)

      /* "cytimes/pydt.py":117
 *         second: cython.int = 0,
 *         microsecond: cython.int = 0,
 *         tzinfo: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         fold: cython.int = 1,
 *     ) -> Self:
*/
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    if (values[0]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)1);
    }
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)1);
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)1);
    }
    if (values[3]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 113, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)0);
    }
    if (values[4]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)0);
    }
    if (values[5]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)0);
    }
    if (values[6]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)0);
    }
    __pyx_v_tzinfo = values[7];
    if (values[8]) {
      __pyx_v_fold = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_fold == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L3_error)
    } else {
      __pyx_v_fold = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new", 0, 0, 9, __pyx_nargs); __PYX_ERR(0, 107, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt__new(((PyTypeObject*)__pyx_v_cls), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, __pyx_v_fold);

  /* "cytimes/pydt.py":107
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt__new(PyTypeObject *__pyx_v_cls, 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_tzinfo, int __pyx_v_fold) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyDateTime_DateTime *__pyx_v_dt_norm = 0;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_pt = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_opt_args_7cpython_8datetime_datetime_new __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_normalize_tz __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  size_t __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new", 0);
  __Pyx_INCREF(__pyx_v_tzinfo);

  /* "cytimes/pydt.py":122
 *         """(internal) Create a new `Pydt` instance."""
 *         # Normalize non-fixed timezone
 *         tzinfo = utils.tz_parse(tzinfo)             # <<<<<<<<<<<<<<
 *         if tzinfo is not None and type(tzinfo) is not utils.T_TIMEZONE:
 *             dt: datetime.datetime = datetime.datetime_new(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":123
 *         # Normalize non-fixed timezone
 *         tzinfo = utils.tz_parse(tzinfo)
 *         if tzinfo is not None and type(tzinfo) is not utils.T_TIMEZONE:             # <<<<<<<<<<<<<<
 *             dt: datetime.datetime = datetime.datetime_new(
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
*/
  __pyx_t_3 = (__pyx_v_tzinfo != Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_tzinfo)) != __pyx_v_7cytimes_5utils_T_TIMEZONE);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":124
 *         tzinfo = utils.tz_parse(tzinfo)
 *         if tzinfo is not None and type(tzinfo) is not utils.T_TIMEZONE:
 *             dt: datetime.datetime = datetime.datetime_new(             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
 *             )
*/
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.fold = __pyx_v_fold;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(__pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":127
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
 *             )
 *             try:             # <<<<<<<<<<<<<<
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:
*/
    {
      __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:*/ {

        /* "cytimes/pydt.py":128
 *             )
 *             try:
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 raise errors.AmbiguousTimeError(err) from err
*/
        __pyx_t_8.__pyx_n = 1;
        __pyx_t_8.dtclass = Py_None;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_normalize_tz(__pyx_v_dt, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_dt_norm = ((PyDateTime_DateTime *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/pydt.py":127
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
 *             )
 *             try:             # <<<<<<<<<<<<<<
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:
*/
      }
      __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;

      /* "cytimes/pydt.py":129
 *             try:
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 raise errors.AmbiguousTimeError(err) from err
 *             if dt is not dt_norm:
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("cytimes.pydt._Pydt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 129, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __pyx_v_err = __pyx_t_10;
        /*try:*/ {

          /* "cytimes/pydt.py":130
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:
 *                 raise errors.AmbiguousTimeError(err) from err             # <<<<<<<<<<<<<<
 *             if dt is not dt_norm:
 *                 year = dt_norm.year
*/
          __pyx_t_13 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 130, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_AmbiguousTimeError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 130, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_16 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
            assert(__pyx_t_13);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
            __pyx_t_16 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_err};
            __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 130, __pyx_L17_error)
            __Pyx_GOTREF(__pyx_t_12);
          }
          __Pyx_Raise(__pyx_t_12, 0, 0, __pyx_v_err);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 130, __pyx_L17_error)
        }

        /* "cytimes/pydt.py":129
 *             try:
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 raise errors.AmbiguousTimeError(err) from err
 *             if dt is not dt_norm:
*/
        /*finally:*/ {
          __pyx_L17_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_9 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L8_except_error;
          }
        }
      }
      goto __pyx_L8_except_error;

      /* "cytimes/pydt.py":127
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
 *             )
 *             try:             # <<<<<<<<<<<<<<
 *                 dt_norm: datetime.datetime = utils.dt_normalize_tz(dt, None)
 *             except Exception as err:
*/
      __pyx_L8_except_error:;
      __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_L11_try_end:;
    }

    /* "cytimes/pydt.py":131
 *             except Exception as err:
 *                 raise errors.AmbiguousTimeError(err) from err
 *             if dt is not dt_norm:             # <<<<<<<<<<<<<<
 *                 year = dt_norm.year
 *                 month = dt_norm.month
*/
    __pyx_t_2 = (__pyx_v_dt != __pyx_v_dt_norm);
    if (__pyx_t_2) {

      /* "cytimes/pydt.py":132
 *                 raise errors.AmbiguousTimeError(err) from err
 *             if dt is not dt_norm:
 *                 year = dt_norm.year             # <<<<<<<<<<<<<<
 *                 month = dt_norm.month
 *                 day = dt_norm.day
*/
      __pyx_v_year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":133
 *             if dt is not dt_norm:
 *                 year = dt_norm.year
 *                 month = dt_norm.month             # <<<<<<<<<<<<<<
 *                 day = dt_norm.day
 *                 hour = dt_norm.hour
*/
      __pyx_v_month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":134
 *                 year = dt_norm.year
 *                 month = dt_norm.month
 *                 day = dt_norm.day             # <<<<<<<<<<<<<<
 *                 hour = dt_norm.hour
 *                 minute = dt_norm.minute
*/
      __pyx_v_day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":135
 *                 month = dt_norm.month
 *                 day = dt_norm.day
 *                 hour = dt_norm.hour             # <<<<<<<<<<<<<<
 *                 minute = dt_norm.minute
 *                 second = dt_norm.second
*/
      __pyx_v_hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":136
 *                 day = dt_norm.day
 *                 hour = dt_norm.hour
 *                 minute = dt_norm.minute             # <<<<<<<<<<<<<<
 *                 second = dt_norm.second
 *                 microsecond = dt_norm.microsecond
*/
      __pyx_v_minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":137
 *                 hour = dt_norm.hour
 *                 minute = dt_norm.minute
 *                 second = dt_norm.second             # <<<<<<<<<<<<<<
 *                 microsecond = dt_norm.microsecond
 *                 fold = 0
*/
      __pyx_v_second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":138
 *                 minute = dt_norm.minute
 *                 second = dt_norm.second
 *                 microsecond = dt_norm.microsecond             # <<<<<<<<<<<<<<
 *                 fold = 0
 * 
*/
      __pyx_v_microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt_norm);

      /* "cytimes/pydt.py":139
 *                 second = dt_norm.second
 *                 microsecond = dt_norm.microsecond
 *                 fold = 0             # <<<<<<<<<<<<<<
 * 
 *         # Construct datetime
*/
      __pyx_v_fold = 0;

      /* "cytimes/pydt.py":131
 *             except Exception as err:
 *                 raise errors.AmbiguousTimeError(err) from err
 *             if dt is not dt_norm:             # <<<<<<<<<<<<<<
 *                 year = dt_norm.year
 *                 month = dt_norm.month
*/
    }

    /* "cytimes/pydt.py":123
 *         # Normalize non-fixed timezone
 *         tzinfo = utils.tz_parse(tzinfo)
 *         if tzinfo is not None and type(tzinfo) is not utils.T_TIMEZONE:             # <<<<<<<<<<<<<<
 *             dt: datetime.datetime = datetime.datetime_new(
 *                 year, month, day, hour, minute, second, microsecond, tzinfo, fold
*/
  }

  /* "cytimes/pydt.py":142
 * 
 *         # Construct datetime
 *         if fold == 1:             # <<<<<<<<<<<<<<
 *             pt: _Pydt = _Pydt.__new__(
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo, fold=1
*/
  __pyx_t_2 = (__pyx_v_fold == 1);
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":143
 *         # Construct datetime
 *         if fold == 1:
 *             pt: _Pydt = _Pydt.__new__(             # <<<<<<<<<<<<<<
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo, fold=1
 *             )
*/
    __pyx_t_10 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    __Pyx_INCREF(__pyx_t_10);

    /* "cytimes/pydt.py":144
 *         if fold == 1:
 *             pt: _Pydt = _Pydt.__new__(
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo, fold=1             # <<<<<<<<<<<<<<
 *             )
 *         else:
*/
    __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_25 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_26 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_16 = 0;
    {
      PyObject *__pyx_callargs[10 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, ((PyObject *)__pyx_v_cls), __pyx_t_1, __pyx_t_12, __pyx_t_15, __pyx_t_13, __pyx_t_14, __pyx_t_25, __pyx_t_26, __pyx_v_tzinfo};
      __pyx_t_27 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_27);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1, __pyx_t_27, __pyx_callargs+10, 0) < (0)) __PYX_ERR(0, 143, __pyx_L1_error)
      __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_16, (10-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_27);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
    }

    /* "cytimes/pydt.py":143
 *         # Construct datetime
 *         if fold == 1:
 *             pt: _Pydt = _Pydt.__new__(             # <<<<<<<<<<<<<<
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo, fold=1
 *             )
*/
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 143, __pyx_L1_error)
    __pyx_v_pt = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_11);
    __pyx_t_11 = 0;

    /* "cytimes/pydt.py":142
 * 
 *         # Construct datetime
 *         if fold == 1:             # <<<<<<<<<<<<<<
 *             pt: _Pydt = _Pydt.__new__(
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo, fold=1
*/
    goto __pyx_L24;
  }

  /* "cytimes/pydt.py":147
 *             )
 *         else:
 *             pt: _Pydt = _Pydt.__new__(             # <<<<<<<<<<<<<<
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo
 *             )
*/
  /*else*/ {
    __pyx_t_27 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    __Pyx_INCREF(__pyx_t_27);

    /* "cytimes/pydt.py":148
 *         else:
 *             pt: _Pydt = _Pydt.__new__(
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo             # <<<<<<<<<<<<<<
 *             )
 *         pt.__cls = cls
*/
    __pyx_t_26 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
    __pyx_t_25 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_16 = 0;
    {
      PyObject *__pyx_callargs[10] = {__pyx_t_27, ((PyObject *)__pyx_v_cls), __pyx_t_26, __pyx_t_25, __pyx_t_14, __pyx_t_13, __pyx_t_15, __pyx_t_12, __pyx_t_1, __pyx_v_tzinfo};
      __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_16, (10-__pyx_t_16) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
      __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
    }

    /* "cytimes/pydt.py":147
 *             )
 *         else:
 *             pt: _Pydt = _Pydt.__new__(             # <<<<<<<<<<<<<<
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo
 *             )
*/
    if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 147, __pyx_L1_error)
    __pyx_v_pt = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_11);
    __pyx_t_11 = 0;
  }
  __pyx_L24:;

  /* "cytimes/pydt.py":150
 *                 cls, year, month, day, hour, minute, second, microsecond, tzinfo
 *             )
 *         pt.__cls = cls             # <<<<<<<<<<<<<<
 *         return pt
 * 
*/
  __Pyx_INCREF((PyObject *)__pyx_v_cls);
  __Pyx_GIVEREF((PyObject *)__pyx_v_cls);
  __Pyx_GOTREF(__pyx_v_pt->_Pydt__cls);
  __Pyx_DECREF(__pyx_v_pt->_Pydt__cls);
  __pyx_v_pt->_Pydt__cls = ((PyObject *)__pyx_v_cls);

  /* "cytimes/pydt.py":151
 *             )
 *         pt.__cls = cls
 *         return pt             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_pt);
  __pyx_r = ((PyObject *)__pyx_v_pt);
  goto __pyx_L0;

  /* "cytimes/pydt.py":107
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_AddTraceback("cytimes.pydt._Pydt._new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt_norm);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF((PyObject *)__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":153
 *         return pt
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_3parse(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_2parse, "Parse a datetime-like object into a datetime `<'Pydt'>`.\n\n        :param dtobj `<'Datetime-Like'>`: A datetime-like object, supports:\n\n            - `<'str'>`                 \342\206\222 parses into datetime, honoring `default`, `yearfirst`, `dayfirst`,\n                                          `ignoretz`, `isoformat` and `cfg`.\n            - `<'datetime.datetime'>`   \342\206\222 accepts `as-is`.\n            - `<'datetime.date'>`       \342\206\222 converts to timezone-naive datetime with the same date fields.\n            - `<'int/float'>`           \342\206\222 interprets as `seconds since Unix epoch` and converts to timezone-naive datetime\n                                          (fractional seconds as microseconds).\n            - `<'np.datetime64'>`       \342\206\222 converts to timezone-naive datetime; resolution finer than microseconds is truncated.\n\n        ## Parameters (Only for String Input)\n\n        :param default `<'datetime/date/None'>`: Fallback source for missing Y/M/D. Defaults to `None`.\n            If `None` and required fields are missing, raises an error.\n        :param yearfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D value as year. Defaults to `None`.\n            If 'None', uses `cfg.yearfirst` if 'cfg' is specified; otherwise. Defaults to `True`.\n        :param dayfirst `<'bool/None'>`: Parse the first ambiguous Y/M/D values as day. Defaults to `None`.\n            If 'None', uses `cfg.dayfirst` if 'cfg' is specified; otherwise. Defaults to `False`.\n        :param ignoretz `<'bool'>`: If `True`, ignore any timezone information and return a naive datetime. Defaults to `True`.\n            When timezone info is not needed, setting to `True` can improve performance.\n        :param isoformat `<'bool'>`: If `True`, attempt ISO parsing first (automatically falls back to token parsing on failure).\n            Otherwise always use token parsing. Defaults to `True`. For most common datetime strings,\n            ISO par""sing (when matched even partially) is faster.\n        :param cfg `<'Configs/None'>`: The Parser configuration. Defaults to `None`.\n            If `None`, uses the module's default `Configs`.\n\n        :returns `<'Pydt'>`: The parsed or converted datetime.\n        :raises `<'InvalidArgumentError'>`: On unsupported input types or any conversion/parsing failed.\n\n        ## Notes\n        - Non-string inputs do `NOT` use `default`, `yearfirst`, `dayfirst`, `ignoretz`, `isoformat` or `cfg`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_3parse = {"parse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_3parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_2parse};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_3parse(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dtobj = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_v_yearfirst = 0;
  PyObject *__pyx_v_dayfirst = 0;
  int __pyx_v_ignoretz;
  int __pyx_v_isoformat;
  struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtobj,&__pyx_mstate_global->__pyx_n_u_default,&__pyx_mstate_global->__pyx_n_u_yearfirst,&__pyx_mstate_global->__pyx_n_u_dayfirst,&__pyx_mstate_global->__pyx_n_u_ignoretz,&__pyx_mstate_global->__pyx_n_u_isoformat,&__pyx_mstate_global->__pyx_n_u_cfg,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 153, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse", 0) < (0)) __PYX_ERR(0, 153, __pyx_L3_error)

      /* "cytimes/pydt.py":157
 *         cls,
 *         dtobj: object,
 *         default: object | None = None,             # <<<<<<<<<<<<<<
 *         yearfirst: bool | None = None,
 *         dayfirst: bool | None = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":158
 *         dtobj: object,
 *         default: object | None = None,
 *         yearfirst: bool | None = None,             # <<<<<<<<<<<<<<
 *         dayfirst: bool | None = None,
 *         ignoretz: cython.bint = True,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pydt.py":159
 *         default: object | None = None,
 *         yearfirst: bool | None = None,
 *         dayfirst: bool | None = None,             # <<<<<<<<<<<<<<
 *         ignoretz: cython.bint = True,
 *         isoformat: cython.bint = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pydt.py":162
 *         ignoretz: cython.bint = True,
 *         isoformat: cython.bint = True,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Parse a datetime-like object into a datetime `<'Pydt'>`.
*/
      if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 7, i); __PYX_ERR(0, 153, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 153, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 153, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pydt.py":157
 *         cls,
 *         dtobj: object,
 *         default: object | None = None,             # <<<<<<<<<<<<<<
 *         yearfirst: bool | None = None,
 *         dayfirst: bool | None = None,
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":158
 *         dtobj: object,
 *         default: object | None = None,
 *         yearfirst: bool | None = None,             # <<<<<<<<<<<<<<
 *         dayfirst: bool | None = None,
 *         ignoretz: cython.bint = True,
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pydt.py":159
 *         default: object | None = None,
 *         yearfirst: bool | None = None,
 *         dayfirst: bool | None = None,             # <<<<<<<<<<<<<<
 *         ignoretz: cython.bint = True,
 *         isoformat: cython.bint = True,
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None));

      /* "cytimes/pydt.py":162
 *         ignoretz: cython.bint = True,
 *         isoformat: cython.bint = True,
 *         cfg: Configs = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Parse a datetime-like object into a datetime `<'Pydt'>`.
*/
      if (!values[6]) values[6] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None));
    }
    __pyx_v_dtobj = values[0];
    __pyx_v_default = values[1];
    __pyx_v_yearfirst = ((PyObject*)values[2]);
    __pyx_v_dayfirst = ((PyObject*)values[3]);
    if (values[4]) {
      __pyx_v_ignoretz = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_ignoretz == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":160
 *         yearfirst: bool | None = None,
 *         dayfirst: bool | None = None,
 *         ignoretz: cython.bint = True,             # <<<<<<<<<<<<<<
 *         isoformat: cython.bint = True,
 *         cfg: Configs = None,
*/
      __pyx_v_ignoretz = ((int)1);
    }
    if (values[5]) {
      __pyx_v_isoformat = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_isoformat == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":161
 *         dayfirst: bool | None = None,
 *         ignoretz: cython.bint = True,
 *         isoformat: cython.bint = True,             # <<<<<<<<<<<<<<
 *         cfg: Configs = None,
 *     ) -> Self:
*/
      __pyx_v_isoformat = ((int)1);
    }
    __pyx_v_cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)values[6]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 153, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_yearfirst), (&PyBool_Type), 1, "yearfirst", 2))) __PYX_ERR(0, 158, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dayfirst), (&PyBool_Type), 1, "dayfirst", 2))) __PYX_ERR(0, 159, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfg), __pyx_mstate_global->__pyx_ptype_7cytimes_6parser_Configs, 1, "cfg", 0))) __PYX_ERR(0, 162, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_2parse(((PyTypeObject*)__pyx_v_cls), __pyx_v_dtobj, __pyx_v_default, __pyx_v_yearfirst, __pyx_v_dayfirst, __pyx_v_ignoretz, __pyx_v_isoformat, __pyx_v_cfg);

  /* "cytimes/pydt.py":153
 *         return pt
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_2parse(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_default, PyObject *__pyx_v_yearfirst, PyObject *__pyx_v_dayfirst, int __pyx_v_ignoretz, int __pyx_v_isoformat, struct __pyx_obj_7cytimes_6parser_Configs *__pyx_v_cfg) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  char const *__pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);
  __Pyx_INCREF(__pyx_v_default);

  /* "cytimes/pydt.py":199
 *         """
 *         # Default value
 *         if default is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 default = _parse_obj(
*/
  __pyx_t_1 = (__pyx_v_default != Py_None);
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":200
 *         # Default value
 *         if default is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 default = _parse_obj(
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "cytimes/pydt.py":201
 *         if default is not None:
 *             try:
 *                 default = _parse_obj(             # <<<<<<<<<<<<<<
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
 *                 )
*/
        __pyx_t_6.__pyx_n = 7;
        __pyx_t_6.__pyx_default = Py_None;
        __pyx_t_6.yearfirst = __pyx_v_yearfirst;
        __pyx_t_6.dayfirst = __pyx_v_dayfirst;
        __pyx_t_6.ignoretz = 1;
        __pyx_t_6.isoformat = __pyx_v_isoformat;
        __pyx_t_6.cfg = __pyx_v_cfg;
        __pyx_t_6.dtclass = Py_None;
        __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_default, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_default, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "cytimes/pydt.py":200
 *         # Default value
 *         if default is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 default = _parse_obj(
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
*/
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cytimes/pydt.py":204
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "parse(default, ...)", None, err)
 * 
*/
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_7) {
        __Pyx_AddTraceback("cytimes.pydt._Pydt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 204, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __pyx_v_err = __pyx_t_8;
        /*try:*/ {

          /* "cytimes/pydt.py":205
 *                 )
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "parse(default, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *         # Parse datetime object
*/
          __pyx_t_10.__pyx_n = 4;
          __pyx_t_10.cls = ((PyObject *)__pyx_v_cls);
          __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_parse_default;
          __pyx_t_10.error_msg = ((PyObject*)Py_None);
          __pyx_t_10.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L15_error)
        }

        /* "cytimes/pydt.py":204
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "parse(default, ...)", None, err)
 * 
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L16;
          }
          __pyx_L15_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
            if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_14);
            __Pyx_XGOTREF(__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_13);
            __Pyx_XGIVEREF(__pyx_t_14);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
            __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
            __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
            goto __pyx_L6_except_error;
          }
          __pyx_L16:;
        }
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;

      /* "cytimes/pydt.py":200
 *         # Default value
 *         if default is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 default = _parse_obj(
 *                     default, None, yearfirst, dayfirst, True, isoformat, cfg, None
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "cytimes/pydt.py":199
 *         """
 *         # Default value
 *         if default is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 default = _parse_obj(
*/
  }

  /* "cytimes/pydt.py":208
 * 
 *         # Parse datetime object
 *         try:             # <<<<<<<<<<<<<<
 *             return _parse_obj(
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    /*try:*/ {

      /* "cytimes/pydt.py":209
 *         # Parse datetime object
 *         try:
 *             return _parse_obj(             # <<<<<<<<<<<<<<
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
 *             )
*/
      __Pyx_XDECREF(__pyx_r);

      /* "cytimes/pydt.py":210
 *         try:
 *             return _parse_obj(
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_6.__pyx_n = 7;
      __pyx_t_6.__pyx_default = __pyx_v_default;
      __pyx_t_6.yearfirst = __pyx_v_yearfirst;
      __pyx_t_6.dayfirst = __pyx_v_dayfirst;
      __pyx_t_6.ignoretz = __pyx_v_ignoretz;
      __pyx_t_6.isoformat = __pyx_v_isoformat;
      __pyx_t_6.cfg = __pyx_v_cfg;
      __pyx_t_6.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_dtobj, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 209, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L25_try_return;

      /* "cytimes/pydt.py":208
 * 
 *         # Parse datetime object
 *         try:             # <<<<<<<<<<<<<<
 *             return _parse_obj(
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
*/
    }
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pydt.py":212
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_5) < 0) __PYX_ERR(0, 212, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_err = __pyx_t_8;
      /*try:*/ {

        /* "cytimes/pydt.py":213
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_parse_dtobj;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L32_error)
      }

      /* "cytimes/pydt.py":212
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L33;
        }
        __pyx_L32_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_13);
          __pyx_t_11 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_19;
          goto __pyx_L23_except_error;
        }
        __pyx_L33:;
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L22_exception_handled;
    }
    goto __pyx_L23_except_error;

    /* "cytimes/pydt.py":208
 * 
 *         # Parse datetime object
 *         try:             # <<<<<<<<<<<<<<
 *             return _parse_obj(
 *                 dtobj, default, yearfirst, dayfirst, ignoretz, isoformat, cfg, cls
*/
    __pyx_L23_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
    goto __pyx_L1_error;
    __pyx_L25_try_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
    goto __pyx_L0;
    __pyx_L22_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
  }

  /* "cytimes/pydt.py":153
 *         return pt
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_default);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":215
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_4now, "Contruct a current datetime with optional timezone `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: The optional timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_5now = {"now", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_5now, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_4now};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 215, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 215, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "now", 0) < (0)) __PYX_ERR(0, 215, __pyx_L3_error)

      /* "cytimes/pydt.py":216
 * 
 *     @classmethod
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:             # <<<<<<<<<<<<<<
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 215, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_tz = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("now", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 215, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_4now(((PyTypeObject*)__pyx_v_cls), __pyx_v_tz);

  /* "cytimes/pydt.py":215
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4now(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("now", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":227
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         return utils.dt_now(tz, cls)
 * 
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":228
 *         """
 *         tz = utils.tz_parse(tz)
 *         return utils.dt_now(tz, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tz;
  __pyx_t_2.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":215
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":230
 *         return utils.dt_now(tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(cls) -> Self:
 *         """Construct a current `UTC` datetime (timezone-aware) `<'Pydt'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7utcnow(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_6utcnow, "Construct a current `UTC` datetime (timezone-aware) `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_7utcnow = {"utcnow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_7utcnow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_6utcnow};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7utcnow(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcnow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("utcnow", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("utcnow", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_6utcnow(((PyTypeObject*)__pyx_v_cls));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6utcnow(PyTypeObject *__pyx_v_cls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcnow", 0);

  /* "cytimes/pydt.py":233
 *     def utcnow(cls) -> Self:
 *         """Construct a current `UTC` datetime (timezone-aware) `<'Pydt'>`."""
 *         return utils.dt_now(utils.UTC, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.tzinfo = __pyx_t_1;
  __pyx_t_3.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __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;

  /* "cytimes/pydt.py":230
 *         return utils.dt_now(tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(cls) -> Self:
 *         """Construct a current `UTC` datetime (timezone-aware) `<'Pydt'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utcnow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":235
 *         return utils.dt_now(utils.UTC, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(cls) -> Self:
 *         """Construct a current `local` datetime (timezone-naive) `<'Pydt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_9today(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_8today, "Construct a current `local` datetime (timezone-naive) `<'Pydt'>`.\n\n        ## Equivalent\n        >>> Pydt.now(None)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_9today = {"today", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_9today, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_8today};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_9today(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("today (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("today", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("today", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_8today(((PyTypeObject*)__pyx_v_cls));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_8today(PyTypeObject *__pyx_v_cls) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("today", 0);

  /* "cytimes/pydt.py":242
 *         >>> Pydt.now(None)
 *         """
 *         return utils.dt_now(None, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = Py_None;
  __pyx_t_2.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":235
 *         return utils.dt_now(utils.UTC, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(cls) -> Self:
 *         """Construct a current `local` datetime (timezone-naive) `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.today", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":244
 *         return utils.dt_now(None, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11combine(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_10combine, "Combine date and time into a new datetime `<'Pydt'>`.\n\n        :param date `<'date/str/None'>`: A date-like object. Defaults to `None`.\n            If None, uses today's `local` date.\n        :param time `<'time/str/None'>`: A time-like object. Defaults to `None`.\n            If None, uses `00:00:00.000000`.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `time` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting combined datetime.\n\n        ## Notes\n        - Both `date` and `time` supports datetime-like object (please refer\n          to `parse()` method for details), but only the corresponding date\n          or time fields are used for combination.\n        - If `tz` is `None`, but `time` contains timezone information, the\n          resulting datetime will be timezone-aware using `time`'s timezone.\n        - If `tz` is specified (not `None`), it `overrides` any timezone\n          information in `time`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_11combine = {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_11combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_10combine};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11combine(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_date = 0;
  PyObject *__pyx_v_time = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("combine (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_date,&__pyx_mstate_global->__pyx_n_u_time,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 244, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "combine", 0) < (0)) __PYX_ERR(0, 244, __pyx_L3_error)

      /* "cytimes/pydt.py":247
 *     def combine(
 *         cls,
 *         date: datetime.date | str | None = None,             # <<<<<<<<<<<<<<
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":248
 *         cls,
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *     ) -> Self:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":249
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Combine date and time into a new datetime `<'Pydt'>`.
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 244, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }

      /* "cytimes/pydt.py":247
 *     def combine(
 *         cls,
 *         date: datetime.date | str | None = None,             # <<<<<<<<<<<<<<
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":248
 *         cls,
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,             # <<<<<<<<<<<<<<
 *         tz: datetime.tzinfo | str | None = None,
 *     ) -> Self:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));

      /* "cytimes/pydt.py":249
 *         date: datetime.date | str | None = None,
 *         time: datetime.time | str | None = None,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Combine date and time into a new datetime `<'Pydt'>`.
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_date = values[0];
    __pyx_v_time = values[1];
    __pyx_v_tz = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("combine", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_10combine(((PyTypeObject*)__pyx_v_cls), __pyx_v_date, __pyx_v_time, __pyx_v_tz);

  /* "cytimes/pydt.py":244
 *         return utils.dt_now(None, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_10combine(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_date, PyObject *__pyx_v_time, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_12;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_21;
  char const *__pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt_combine __pyx_t_24;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("combine", 0);
  __Pyx_INCREF(__pyx_v_date);
  __Pyx_INCREF(__pyx_v_time);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":275
 *         """
 *         # Timezone
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 * 
 *         # Parse date
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":278
 * 
 *         # Parse date
 *         if date is not None and not utils.is_date(date):             # <<<<<<<<<<<<<<
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
*/
  __pyx_t_3 = (__pyx_v_date != Py_None);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_date); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 278, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_3);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":279
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
    {
      __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:*/ {

        /* "cytimes/pydt.py":280
 *         if date is not None and not utils.is_date(date):
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)             # <<<<<<<<<<<<<<
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
*/
        __pyx_t_8.__pyx_n = 7;
        __pyx_t_8.__pyx_default = Py_None;
        __pyx_t_8.yearfirst = Py_True;
        __pyx_t_8.dayfirst = Py_False;
        __pyx_t_8.ignoretz = 1;
        __pyx_t_8.isoformat = 1;
        __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
        __pyx_t_8.dtclass = Py_None;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_date, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/pydt.py":279
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
      }
      __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;

      /* "cytimes/pydt.py":281
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)
*/
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_9) {
        __Pyx_AddTraceback("cytimes.pydt._Pydt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 281, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_10);
        __pyx_v_err = __pyx_t_10;
        /*try:*/ {

          /* "cytimes/pydt.py":282
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)             # <<<<<<<<<<<<<<
 *             date = utils.date_fr_dt(date, None)
 * 
*/
          __pyx_t_12.__pyx_n = 4;
          __pyx_t_12.cls = ((PyObject *)__pyx_v_cls);
          __pyx_t_12.input_msg = __pyx_mstate_global->__pyx_kp_u_combine_date;
          __pyx_t_12.error_msg = ((PyObject*)Py_None);
          __pyx_t_12.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L17_error)
        }

        /* "cytimes/pydt.py":281
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L18;
          }
          __pyx_L17_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_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
            if ( 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_9 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __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_9; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
            goto __pyx_L8_except_error;
          }
          __pyx_L18:;
        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L7_exception_handled;
      }
      goto __pyx_L8_except_error;

      /* "cytimes/pydt.py":279
 *         # Parse date
 *         if date is not None and not utils.is_date(date):
 *             try:             # <<<<<<<<<<<<<<
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
 *             except Exception as err:
*/
      __pyx_L8_except_error:;
      __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:;
    }

    /* "cytimes/pydt.py":283
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(date, ...)", None, err)
 *             date = utils.date_fr_dt(date, None)             # <<<<<<<<<<<<<<
 * 
 *         # Prase time
*/
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 283, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.dclass = Py_None;
    __pyx_t_11 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_date), &__pyx_t_21)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cytimes/pydt.py":278
 * 
 *         # Parse date
 *         if date is not None and not utils.is_date(date):             # <<<<<<<<<<<<<<
 *             try:
 *                 date = _parse_obj(date, None, True, False, True, True, None, None)
*/
  }

  /* "cytimes/pydt.py":286
 * 
 *         # Prase time
 *         if time is not None and not utils.is_time(time):             # <<<<<<<<<<<<<<
 *             try:
 *                 time = _parse_obj(
*/
  __pyx_t_4 = (__pyx_v_time != Py_None);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L24_bool_binop_done;
  }
  __pyx_t_4 = __pyx_f_7cytimes_5utils_is_time(__pyx_v_time); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_4);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L24_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":287
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "cytimes/pydt.py":289
 *             try:
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None             # <<<<<<<<<<<<<<
 *                 )
 *             except Exception as err:
*/
        __pyx_t_11 = ((PyObject *)__pyx_v_7cytimes_5utils_EPOCH_DT);
        __Pyx_INCREF(__pyx_t_11);

        /* "cytimes/pydt.py":288
 *         if time is not None and not utils.is_time(time):
 *             try:
 *                 time = _parse_obj(             # <<<<<<<<<<<<<<
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
*/
        __pyx_t_8.__pyx_n = 7;
        __pyx_t_8.__pyx_default = __pyx_t_11;
        __pyx_t_8.yearfirst = Py_True;
        __pyx_t_8.dayfirst = Py_False;
        __pyx_t_8.ignoretz = 0;
        __pyx_t_8.isoformat = 1;
        __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
        __pyx_t_8.dtclass = Py_None;
        __pyx_t_10 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_time, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 288, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF_SET(__pyx_v_time, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "cytimes/pydt.py":287
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
      }
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L31_try_end;
      __pyx_L26_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "cytimes/pydt.py":291
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)
*/
      __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_13) {
        __Pyx_AddTraceback("cytimes.pydt._Pydt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_1) < 0) __PYX_ERR(0, 291, __pyx_L28_except_error)
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_11);
        __pyx_v_err = __pyx_t_11;
        /*try:*/ {

          /* "cytimes/pydt.py":292
 *                 )
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)             # <<<<<<<<<<<<<<
 *             time = utils.time_fr_dt(time, None)
 * 
*/
          __pyx_t_12.__pyx_n = 4;
          __pyx_t_12.cls = ((PyObject *)__pyx_v_cls);
          __pyx_t_12.input_msg = __pyx_mstate_global->__pyx_kp_u_combine_time;
          __pyx_t_12.error_msg = ((PyObject*)Py_None);
          __pyx_t_12.tb_exc = __pyx_v_err;
          __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L37_error)
        }

        /* "cytimes/pydt.py":291
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
 *                 )
 *             except Exception as err:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L38;
          }
          __pyx_L37_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
            if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_15);
            __pyx_t_13 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            }
            __Pyx_XGIVEREF(__pyx_t_17);
            __Pyx_XGIVEREF(__pyx_t_16);
            __Pyx_XGIVEREF(__pyx_t_15);
            __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ErrRestore(__pyx_t_20, __pyx_t_19, __pyx_t_18);
            __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0;
            __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22;
            goto __pyx_L28_except_error;
          }
          __pyx_L38:;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L27_exception_handled;
      }
      goto __pyx_L28_except_error;

      /* "cytimes/pydt.py":287
 *         # Prase time
 *         if time is not None and not utils.is_time(time):
 *             try:             # <<<<<<<<<<<<<<
 *                 time = _parse_obj(
 *                     time, utils.EPOCH_DT, True, False, False, True, None, None
*/
      __pyx_L28_except_error:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L27_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
      __pyx_L31_try_end:;
    }

    /* "cytimes/pydt.py":293
 *             except Exception as err:
 *                 errors.raise_argument_error(cls, "combine(time, ...)", None, err)
 *             time = utils.time_fr_dt(time, None)             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    if (!(likely(((__pyx_v_time) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 293, __pyx_L1_error)
    __pyx_t_23.__pyx_n = 1;
    __pyx_t_23.tclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_time), &__pyx_t_23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_time, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":286
 * 
 *         # Prase time
 *         if time is not None and not utils.is_time(time):             # <<<<<<<<<<<<<<
 *             try:
 *                 time = _parse_obj(
*/
  }

  /* "cytimes/pydt.py":296
 * 
 *         # New instance
 *         return utils.dt_combine(date, time, tz, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 296, __pyx_L1_error)
  if (!(likely(((__pyx_v_time) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 296, __pyx_L1_error)
  __pyx_t_24.__pyx_n = 4;
  __pyx_t_24.date = ((PyDateTime_Date *)__pyx_v_date);
  __pyx_t_24.time = ((PyDateTime_Time *)__pyx_v_time);
  __pyx_t_24.tzinfo = __pyx_v_tz;
  __pyx_t_24.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":244
 *         return utils.dt_now(None, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.combine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":298
 *         return utils.dt_combine(date, time, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_13fromordinal(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_12fromordinal, "Construct a datetime from Gregorian ordinal days `<'Pydt'>`.\n\n        :param ordinal `<'int'>`: The proleptic Gregorian ordinal (day 1 is `0001-01-01`).\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_13fromordinal = {"fromordinal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_13fromordinal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_12fromordinal};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_13fromordinal(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_ordinal;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromordinal (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ordinal,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 298, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromordinal", 0) < (0)) __PYX_ERR(0, 298, __pyx_L3_error)

      /* "cytimes/pydt.py":302
 *         cls,
 *         ordinal: cython.int,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from Gregorian ordinal days `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 1, 2, i); __PYX_ERR(0, 298, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ordinal = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_ordinal == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromordinal", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_12fromordinal(((PyTypeObject*)__pyx_v_cls), __pyx_v_ordinal, __pyx_v_tz);

  /* "cytimes/pydt.py":298
 *         return utils.dt_combine(date, time, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_12fromordinal(PyTypeObject *__pyx_v_cls, int __pyx_v_ordinal, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_ord __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromordinal", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":315
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_ord(ordinal, tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":316
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":317
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_ord(ordinal, tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.tzinfo = __pyx_v_tz;
      __pyx_t_5.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_v_ordinal, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":316
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":318
 *         try:
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 318, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pydt.py":319
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_fromordinal_ordinal;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":318
 *         try:
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":316
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ord(ordinal, tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":298
 *         return utils.dt_combine(date, time, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/

  /* 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_AddTraceback("cytimes.pydt._Pydt.fromordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":321
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_15fromseconds(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_14fromseconds, "Construct a datetime from seconds since the epoch `<'Pydt'>`.\n\n        :param seconds `<'int/float'>`: Seconds since epoch.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Notes\n        - Unlike `fromtimestamp()`, this method never assumes local time when\n          `tz is None`, and interprets `seconds` as-is without any local-time conversion.\n        - When `tz` is specified, the timezone is simply `attached` without any conversion.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_15fromseconds = {"fromseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_15fromseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_14fromseconds};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_15fromseconds(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_seconds = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 321, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 321, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 321, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromseconds", 0) < (0)) __PYX_ERR(0, 321, __pyx_L3_error)

      /* "cytimes/pydt.py":325
 *         cls,
 *         seconds: int | float,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from seconds since the epoch `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromseconds", 0, 1, 2, i); __PYX_ERR(0, 321, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 321, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 321, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_seconds = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromseconds", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 321, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_14fromseconds(((PyTypeObject*)__pyx_v_cls), __pyx_v_seconds, __pyx_v_tz);

  /* "cytimes/pydt.py":321
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_14fromseconds(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_seconds, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  double __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromseconds", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":343
 *         - When `tz` is specified, the timezone is simply `attached` without any conversion.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":344
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":345
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_sec(float(seconds), tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_seconds); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_5, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
      __pyx_t_6.__pyx_n = 2;
      __pyx_t_6.tzinfo = __pyx_v_tz;
      __pyx_t_6.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_sec(__pyx_t_5, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":344
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":346
 *         try:
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 346, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_err = __pyx_t_8;
      /*try:*/ {

        /* "cytimes/pydt.py":347
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_fromseconds_seconds;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":346
 *         try:
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":344
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_sec(float(seconds), tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":321
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":349
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_17frommicroseconds(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_16frommicroseconds, "Construct a datetime from microseconds since the epoch `<'Pydt'>`.\n\n        :param us `<'int'>`: Microseconds since epoch.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Notes\n        - Unlike `fromtimestamp()`, this method never assumes local time when\n          `tz is None`, and interprets `us` as-is without any local-time conversion.\n        - When `tz` is specified, the timezone is simply `attached` without any conversion.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_17frommicroseconds = {"frommicroseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_17frommicroseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_16frommicroseconds};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_17frommicroseconds(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PY_LONG_LONG __pyx_v_us;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("frommicroseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_us,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 349, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 349, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 349, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "frommicroseconds", 0) < (0)) __PYX_ERR(0, 349, __pyx_L3_error)

      /* "cytimes/pydt.py":353
 *         cls,
 *         us: cython.longlong,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from microseconds since the epoch `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("frommicroseconds", 0, 1, 2, i); __PYX_ERR(0, 349, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 349, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 349, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_us = __Pyx_PyLong_As_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_us == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("frommicroseconds", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 349, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_16frommicroseconds(((PyTypeObject*)__pyx_v_cls), __pyx_v_us, __pyx_v_tz);

  /* "cytimes/pydt.py":349
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_16frommicroseconds(PyTypeObject *__pyx_v_cls, PY_LONG_LONG __pyx_v_us, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("frommicroseconds", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":371
 *         - When `tz` is specified, the timezone is simply `attached` without any conversion.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_us(us, tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":372
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":373
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_us(us, tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.tzinfo = __pyx_v_tz;
      __pyx_t_5.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_us, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":372
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":374
 *         try:
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 374, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pydt.py":375
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_frommicroseconds_us;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":374
 *         try:
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":372
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(us, tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":349
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/

  /* 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_AddTraceback("cytimes.pydt._Pydt.frommicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":377
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_19fromtimestamp(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_18fromtimestamp, "Construct a datetime from a POSIX timestamp optionally converted to a timezone `<'Pydt'>`.\n\n        POSIX timestamps are interpreted as seconds since the Unix epoch (1970-01-01 00:00:00 UTC).\n\n        :param ts `<'int/float'>`: POSIX timestamp.\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` naive `local` time (assumes local timezone).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime. Naive if `tz is None`,\n            otherwise aware in the specifed timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_19fromtimestamp = {"fromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_19fromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_18fromtimestamp};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_19fromtimestamp(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ts = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromtimestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ts,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 377, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 377, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 377, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromtimestamp", 0) < (0)) __PYX_ERR(0, 377, __pyx_L3_error)

      /* "cytimes/pydt.py":381
 *         cls,
 *         ts: int | float,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from a POSIX timestamp optionally converted to a timezone `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromtimestamp", 0, 1, 2, i); __PYX_ERR(0, 377, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 377, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 377, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_ts = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromtimestamp", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 377, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_18fromtimestamp(((PyTypeObject*)__pyx_v_cls), __pyx_v_ts, __pyx_v_tz);

  /* "cytimes/pydt.py":377
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_18fromtimestamp(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_ts, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  double __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromtimestamp", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":397
 *             otherwise aware in the specifed timezone.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_ts(float(ts), tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":398
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":399
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_ts(float(ts), tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_v_ts); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_5, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L3_error)
      __pyx_t_6.__pyx_n = 2;
      __pyx_t_6.tzinfo = __pyx_v_tz;
      __pyx_t_6.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts(__pyx_t_5, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":398
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":400
 *         try:
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
 * 
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 400, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_err = __pyx_t_8;
      /*try:*/ {

        /* "cytimes/pydt.py":401
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_fromtimestamp_ts;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":400
 *         try:
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_7 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":398
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":377
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":403
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(cls, ts: int | float) -> Self:
 *         """Construct a UTC-aware datetime from a POSIX timestamp (timezone-aware) `<'Pydt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_21utcfromtimestamp(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_20utcfromtimestamp, "Construct a UTC-aware datetime from a POSIX timestamp (timezone-aware) `<'Pydt'>`.\n\n        :param ts `<'int/float'>`: POSIX timestamp.\n        :returns `<'Pydt'>`: A UTC-aware datetime.\n\n        ## Equivalent\n        >>> Pydt.fromtimestamp(ts, tz='UTC')\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_21utcfromtimestamp = {"utcfromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_21utcfromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_20utcfromtimestamp};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_21utcfromtimestamp(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ts = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcfromtimestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ts,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 403, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 403, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "utcfromtimestamp", 0) < (0)) __PYX_ERR(0, 403, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("utcfromtimestamp", 1, 1, 1, i); __PYX_ERR(0, 403, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 403, __pyx_L3_error)
    }
    __pyx_v_ts = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utcfromtimestamp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 403, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utcfromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_20utcfromtimestamp(((PyTypeObject*)__pyx_v_cls), __pyx_v_ts);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_20utcfromtimestamp(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_ts) {
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  double __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_t_11;
  char const *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcfromtimestamp", 0);

  /* "cytimes/pydt.py":413
 *         >>> Pydt.fromtimestamp(ts, tz='UTC')
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":414
 *         """
 *         try:
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_AsDouble(__pyx_v_ts); if (unlikely(__PYX_CHECK_FLOAT_EXCEPTION(__pyx_t_4, ((double)((double)-1))) && PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L3_error)
      __pyx_t_5 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7.__pyx_n = 2;
      __pyx_t_7.tzinfo = __pyx_t_5;
      __pyx_t_7.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts(__pyx_t_4, &__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":413
 *         >>> Pydt.fromtimestamp(ts, tz='UTC')
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cytimes/pydt.py":415
 *         try:
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
 * 
*/
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.utcfromtimestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 415, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_err = __pyx_t_5;
      /*try:*/ {

        /* "cytimes/pydt.py":416
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_10.__pyx_n = 4;
        __pyx_t_10.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_utcfromtimestamp_ts;
        __pyx_t_10.error_msg = ((PyObject*)Py_None);
        __pyx_t_10.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":415
 *         try:
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          if ( unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_8 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":413
 *         >>> Pydt.fromtimestamp(ts, tz='UTC')
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_ts(float(ts), utils.UTC, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  }

  /* "cytimes/pydt.py":403
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(cls, ts: int | float) -> Self:
 *         """Construct a UTC-aware datetime from a POSIX timestamp (timezone-aware) `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utcfromtimestamp", __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;
}

/* "cytimes/pydt.py":418
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(cls, dtstr: str) -> Self:
 *         """Construct a datetime from an ISO format string `<'Pydt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_23fromisoformat(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_22fromisoformat, "Construct a datetime from an ISO format string `<'Pydt'>`.\n\n        :param dtstr `<'str'>`: The ISO format datetime string.\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_23fromisoformat = {"fromisoformat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_23fromisoformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_22fromisoformat};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_23fromisoformat(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dtstr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromisoformat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtstr,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 418, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromisoformat", 0) < (0)) __PYX_ERR(0, 418, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromisoformat", 1, 1, 1, i); __PYX_ERR(0, 418, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error)
    }
    __pyx_v_dtstr = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromisoformat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 418, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtstr), (&PyUnicode_Type), 0, "dtstr", 2))) __PYX_ERR(0, 419, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_22fromisoformat(((PyTypeObject*)__pyx_v_cls), __pyx_v_dtstr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_22fromisoformat(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtstr) {
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromisoformat", 0);

  /* "cytimes/pydt.py":425
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":426
 *         """
 *         try:
 *             dt = datetime.datetime.fromisoformat(dtstr)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)
*/
      __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_dtstr};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromisoformat, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_dt = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cytimes/pydt.py":425
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":427
 *         try:
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 427, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_err = __pyx_t_5;
      /*try:*/ {

        /* "cytimes/pydt.py":428
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         return utils.dt_fr_dt(dt, cls)
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisoformat_dtstr;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L14_error)

        /* "cytimes/pydt.py":429
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         return utils.dt_fr_dt(dt, cls)
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L13_return;
      }

      /* "cytimes/pydt.py":427
 *         try:
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L13_return: {
          __pyx_t_17 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_17;
          __pyx_t_17 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":425
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.fromisoformat(dtstr)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "cytimes/pydt.py":430
 *             errors.raise_argument_error(cls, "fromisoformat(dtstr)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         return utils.dt_fr_dt(dt, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 430, __pyx_L1_error)
  __pyx_t_18.__pyx_n = 1;
  __pyx_t_18.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_18)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":418
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(cls, dtstr: str) -> Self:
 *         """Construct a datetime from an ISO format string `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromisoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":432
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_25fromisocalendar(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_24fromisocalendar, "Construct a datetime from from ISO calendar values (year, week, weekday) `<'Pydt'>`.\n\n        :param year `<'int'>`: ISO year number.\n        :param week `<'int'>`: ISO week number.\n            Automatically clamped to [1..52/53] (depends on whether is a long year).\n        :param weekday `<'int'>`: ISO weekday.\n            Automatically clamped to [1=Mon..7=Sun].\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_25fromisocalendar = {"fromisocalendar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_25fromisocalendar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_24fromisocalendar};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_25fromisocalendar(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_year;
  int __pyx_v_week;
  int __pyx_v_weekday;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromisocalendar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_week,&__pyx_mstate_global->__pyx_n_u_weekday,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 432, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromisocalendar", 0) < (0)) __PYX_ERR(0, 432, __pyx_L3_error)

      /* "cytimes/pydt.py":438
 *         week: cython.int,
 *         weekday: cython.int,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from from ISO calendar values (year, week, weekday) `<'Pydt'>`.
*/
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromisocalendar", 0, 3, 4, i); __PYX_ERR(0, 432, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 432, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 432, __pyx_L3_error)
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 432, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 432, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 435, __pyx_L3_error)
    __pyx_v_week = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_week == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error)
    __pyx_v_weekday = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_weekday == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L3_error)
    __pyx_v_tz = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromisocalendar", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 432, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromisocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_24fromisocalendar(((PyTypeObject*)__pyx_v_cls), __pyx_v_year, __pyx_v_week, __pyx_v_weekday, __pyx_v_tz);

  /* "cytimes/pydt.py":432
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_24fromisocalendar(PyTypeObject *__pyx_v_cls, int __pyx_v_year, int __pyx_v_week, int __pyx_v_weekday, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_iso __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromisocalendar", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":455
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":456
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":457
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.tzinfo = __pyx_v_tz;
      __pyx_t_5.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":456
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":458
 *         try:
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromisocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 458, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pydt.py":459
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_fromisocalendar;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":458
 *         try:
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":456
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_iso(year, week, weekday, tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":432
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/

  /* 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_AddTraceback("cytimes.pydt._Pydt.fromisocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":461
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_27fromdayofyear(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_26fromdayofyear, "Construct a datetime from Gregorian year and day-of-year `<'Pydt'>`.\n\n        :param year `<'int'>`: Gregorian year number.\n        :param doy `<'int'>`: The day-of-year.\n            Automatically clamped to [1..365/366] (depends on whether is a long year).\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_27fromdayofyear = {"fromdayofyear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_27fromdayofyear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_26fromdayofyear};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_27fromdayofyear(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_year;
  int __pyx_v_doy;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdayofyear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_doy,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 461, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 461, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 461, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 461, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdayofyear", 0) < (0)) __PYX_ERR(0, 461, __pyx_L3_error)

      /* "cytimes/pydt.py":466
 *         year: cython.int,
 *         doy: cython.int,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from Gregorian year and day-of-year `<'Pydt'>`.
*/
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdayofyear", 0, 2, 3, i); __PYX_ERR(0, 461, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 461, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 461, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 461, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 464, __pyx_L3_error)
    __pyx_v_doy = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_doy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 465, __pyx_L3_error)
    __pyx_v_tz = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdayofyear", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 461, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_26fromdayofyear(((PyTypeObject*)__pyx_v_cls), __pyx_v_year, __pyx_v_doy, __pyx_v_tz);

  /* "cytimes/pydt.py":461
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_26fromdayofyear(PyTypeObject *__pyx_v_cls, int __pyx_v_year, int __pyx_v_doy, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_doy __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdayofyear", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":481
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt_fr_doy(year, doy, tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":482
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":483
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt_fr_doy(year, doy, tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.tzinfo = __pyx_v_tz;
      __pyx_t_5.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_doy(__pyx_v_year, __pyx_v_doy, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":482
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":484
 *         try:
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 484, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pydt.py":485
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdayofyear_year_doy;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 485, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":484
 *         try:
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":482
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_doy(year, doy, tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":461
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/

  /* 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_AddTraceback("cytimes.pydt._Pydt.fromdayofyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":487
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_29fromdate(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_28fromdate, "Construct a datetime from a date (all time fields set to 0) `<'Pydt'>`.\n\n        :param date `<'datetime.date'>`: An instance or subclass of `datetime.date`.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime with time fields set to zero.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_29fromdate = {"fromdate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_29fromdate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_28fromdate};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_29fromdate(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyDateTime_Date *__pyx_v_date = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_date,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 487, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 487, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 487, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdate", 0) < (0)) __PYX_ERR(0, 487, __pyx_L3_error)

      /* "cytimes/pydt.py":491
 *         cls,
 *         date: datetime.date,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from a date (all time fields set to 0) `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdate", 0, 1, 2, i); __PYX_ERR(0, 487, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 487, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 487, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_date = ((PyDateTime_Date *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdate", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 487, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_date), __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date, 0, "date", 0))) __PYX_ERR(0, 490, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_28fromdate(((PyTypeObject*)__pyx_v_cls), __pyx_v_date, __pyx_v_tz);

  /* "cytimes/pydt.py":487
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_28fromdate(PyTypeObject *__pyx_v_cls, PyDateTime_Date *__pyx_v_date, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_date __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdate", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":504
 *         :returns `<'Pydt'>`: The resulting datetime with time fields set to zero.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         return utils.dt_fr_date(date, tz, cls)
 * 
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":505
 *         """
 *         tz = utils.tz_parse(tz)
 *         return utils.dt_fr_date(date, tz, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.tzinfo = __pyx_v_tz;
  __pyx_t_2.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_date(__pyx_v_date, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":487
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":507
 *         return utils.dt_fr_date(date, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_31fromdatetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_30fromdatetime, "Construct a datetime from another datetime `<'Pydt'>`.\n\n        :param dt `<'datetime.datetime'>`: An instance or subclass of `datetime.datetime`.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive (when `dt` has no timezone info, see `Notes`).\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime with the same fields\n            and optional replaced timezone info.\n\n        ## Notes\n        - If `tz` is `None`, but `dt` contains timezone information, the\n          resulting datetime will be timezone-aware using `dt`'s timezone.\n        - If `tz` is specified (not `None`), it `overrides` any timezone\n          information in `dt`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_31fromdatetime = {"fromdatetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_31fromdatetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_30fromdatetime};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_31fromdatetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdatetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dt,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 507, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdatetime", 0) < (0)) __PYX_ERR(0, 507, __pyx_L3_error)

      /* "cytimes/pydt.py":511
 *         cls,
 *         dt: datetime.datetime,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from another datetime `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdatetime", 0, 1, 2, i); __PYX_ERR(0, 507, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 507, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_dt = ((PyDateTime_DateTime *)values[0]);
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdatetime", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime, 0, "dt", 0))) __PYX_ERR(0, 510, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_30fromdatetime(((PyTypeObject*)__pyx_v_cls), __pyx_v_dt, __pyx_v_tz);

  /* "cytimes/pydt.py":507
 *         return utils.dt_fr_date(date, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_30fromdatetime(PyTypeObject *__pyx_v_cls, PyDateTime_DateTime *__pyx_v_dt, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_3;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdatetime", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":531
 *           information in `dt`.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         if tz is not None:
 *             # fmt: off
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":532
 *         """
 *         tz = utils.tz_parse(tz)
 *         if tz is not None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_new(
*/
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":534
 *         if tz is not None:
 *             # fmt: off
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *                 dt.second, dt.microsecond, tz, 1, cls,
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":536
 *             return utils.dt_new(
 *                 dt.year, dt.month, dt.day, dt.hour, dt.minute,
 *                 dt.second, dt.microsecond, tz, 1, cls,             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
    __pyx_t_3.__pyx_n = 10;
    __pyx_t_3.year = __pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_dt);
    __pyx_t_3.month = __pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_dt);
    __pyx_t_3.day = __pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_dt);
    __pyx_t_3.hour = __pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_dt);
    __pyx_t_3.minute = __pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_dt);
    __pyx_t_3.second = __pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_dt);
    __pyx_t_3.microsecond = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt);
    __pyx_t_3.tzinfo = __pyx_v_tz;
    __pyx_t_3.fold = 1;
    __pyx_t_3.dtclass = ((PyObject *)__pyx_v_cls);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":532
 *         """
 *         tz = utils.tz_parse(tz)
 *         if tz is not None:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_new(
*/
  }

  /* "cytimes/pydt.py":539
 *             )
 *             # fmt: on
 *         return utils.dt_fr_dt(dt, cls)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(__pyx_v_dt, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":507
 *         return utils.dt_fr_date(date, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdatetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":541
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_33fromdatetime64(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_32fromdatetime64, "Construct a datetime from numpy.datetime64 `<'Pydt'>`.\n\n        :param dt64 `<'datetime64'>`: The numpy.datetime64 instance.\n        :param tz `<'tzinfo/str/None'>`: The optional timezone to `attach`. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime.\n            Resolution finer than microseconds is truncated.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_33fromdatetime64 = {"fromdatetime64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_33fromdatetime64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_32fromdatetime64};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_33fromdatetime64(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dt64 = 0;
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fromdatetime64 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dt64,&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 541, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fromdatetime64", 0) < (0)) __PYX_ERR(0, 541, __pyx_L3_error)

      /* "cytimes/pydt.py":545
 *         cls,
 *         dt64: object,
 *         tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *     ) -> Self:
 *         """Construct a datetime from numpy.datetime64 `<'Pydt'>`.
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fromdatetime64", 0, 1, 2, i); __PYX_ERR(0, 541, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_dt64 = values[0];
    __pyx_v_tz = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fromdatetime64", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 541, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdatetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_32fromdatetime64(((PyTypeObject*)__pyx_v_cls), __pyx_v_dt64, __pyx_v_tz);

  /* "cytimes/pydt.py":541
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_32fromdatetime64(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dt64, PyObject *__pyx_v_tz) {
  PyObject *__pyx_v_err = 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;
  struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fromdatetime64", 0);
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":559
 *             Resolution finer than microseconds is truncated.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         try:
 *             return utils.dt64_to_dt(dt64, tz, cls)
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":560
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cytimes/pydt.py":561
 *         tz = utils.tz_parse(tz)
 *         try:
 *             return utils.dt64_to_dt(dt64, tz, cls)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5.__pyx_n = 2;
      __pyx_t_5.tzinfo = __pyx_v_tz;
      __pyx_t_5.dtclass = ((PyObject *)__pyx_v_cls);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64_to_dt(__pyx_v_dt64, &__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":560
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":562
 *         try:
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
 * 
*/
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.fromdatetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 562, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/pydt.py":563
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_fromdatetime64_dt64;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L14_error)
      }

      /* "cytimes/pydt.py":562
 *         try:
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":560
 *         """
 *         tz = utils.tz_parse(tz)
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt64_to_dt(dt64, tz, cls)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cytimes/pydt.py":541
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/

  /* 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_AddTraceback("cytimes.pydt._Pydt.fromdatetime64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":565
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(cls, dtstr: str, fmt: str) -> Self:
 *         """Construct a datetime parsed from a datetime-string `<'Pydt'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_35strptime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_34strptime, "Construct a datetime parsed from a datetime-string `<'Pydt'>`.\n\n        :param dtstr `<'str'>`: The datetime-string.\n        :param format `<'str'>`: The format used to parse the strings.\n        :returns `<'Pydt'>`: The resulting datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_35strptime = {"strptime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_35strptime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_34strptime};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_35strptime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dtstr = 0;
  PyObject *__pyx_v_fmt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strptime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtstr,&__pyx_mstate_global->__pyx_n_u_fmt,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 565, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 565, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "strptime", 0) < (0)) __PYX_ERR(0, 565, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("strptime", 1, 2, 2, i); __PYX_ERR(0, 565, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 565, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 565, __pyx_L3_error)
    }
    __pyx_v_dtstr = ((PyObject*)values[0]);
    __pyx_v_fmt = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strptime", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 565, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtstr), (&PyUnicode_Type), 0, "dtstr", 2))) __PYX_ERR(0, 566, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fmt), (&PyUnicode_Type), 0, "fmt", 2))) __PYX_ERR(0, 566, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_34strptime(((PyTypeObject*)__pyx_v_cls), __pyx_v_dtstr, __pyx_v_fmt);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_34strptime(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dtstr, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_9;
  int __pyx_t_10;
  char const *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strptime", 0);

  /* "cytimes/pydt.py":573
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":574
 *         """
 *         try:
 *             dt = datetime.datetime.strptime(dtstr, fmt)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
*/
      __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_dtstr, __pyx_v_fmt};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strptime, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_v_dt = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cytimes/pydt.py":573
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:
*/
    }
    __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;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":575
 *         try:
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_7) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 575, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_err = __pyx_t_5;
      /*try:*/ {

        /* "cytimes/pydt.py":576
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)             # <<<<<<<<<<<<<<
 *             return  # unreachable: suppress compiler warning
 *         return utils.dt_fr_dt(dt, cls)
*/
        __pyx_t_9.__pyx_n = 4;
        __pyx_t_9.cls = ((PyObject *)__pyx_v_cls);
        __pyx_t_9.input_msg = __pyx_mstate_global->__pyx_kp_u_strptime_dtstr_fmt;
        __pyx_t_9.error_msg = ((PyObject*)Py_None);
        __pyx_t_9.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L14_error)

        /* "cytimes/pydt.py":577
 *         except Exception as err:
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *             return  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         return utils.dt_fr_dt(dt, cls)
 * 
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L13_return;
      }

      /* "cytimes/pydt.py":575
 *         try:
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *             return  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
          goto __pyx_L5_except_error;
        }
        __pyx_L13_return: {
          __pyx_t_17 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_17;
          __pyx_t_17 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":573
 *         :returns `<'Pydt'>`: The resulting datetime.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             dt = datetime.datetime.strptime(dtstr, fmt)
 *         except Exception as err:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "cytimes/pydt.py":578
 *             errors.raise_argument_error(cls, "strptime(dtstr, fmt)", None, err)
 *             return  # unreachable: suppress compiler warning
 *         return utils.dt_fr_dt(dt, cls)             # <<<<<<<<<<<<<<
 * 
 *     # Convertor ----------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 578, __pyx_L1_error)
  __pyx_t_18.__pyx_n = 1;
  __pyx_t_18.dtclass = ((PyObject *)__pyx_v_cls);
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_18)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":565
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(cls, dtstr: str, fmt: str) -> Self:
 *         """Construct a datetime parsed from a datetime-string `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.strptime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":581
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ctime(self) -> str:
 *         """Return ctime-style string `<'str'>`
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_37ctime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_ctime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ctime", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ctime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_37ctime)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 581, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":587
 *         - ctime-stype: 'Tue Oct  1 08:19:05 2024'
 *         """
 *         return utils.dt_to_ctime(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_to_ctime(((PyDateTime_DateTime *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":581
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ctime(self) -> str:
 *         """Return ctime-style string `<'str'>`
*/

  /* 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("cytimes.pydt._Pydt.ctime", __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_7cytimes_4pydt_5_Pydt_37ctime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_36ctime, "Return ctime-style string `<'str'>`\n\n        - ctime-stype: 'Tue Oct  1 08:19:05 2024'\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_37ctime = {"ctime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_37ctime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_36ctime};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_37ctime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ctime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("ctime", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("ctime", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_36ctime(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_36ctime(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("ctime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_ctime(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __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("cytimes.pydt._Pydt.ctime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":589
 *         return utils.dt_to_ctime(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def strftime(self, fmt: str) -> str:
 *         """Format to string according to the given format `<'str'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_39strftime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_strftime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt, 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strftime", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_strftime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_39strftime)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fmt};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 589, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":596
 *         :returns `<'str'>`: The formatted string.
 *         """
 *         return utils.dt_strformat(self, fmt)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_strformat(((PyDateTime_DateTime *)__pyx_v_self), __pyx_v_fmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":589
 *         return utils.dt_to_ctime(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def strftime(self, fmt: str) -> str:
 *         """Format to string according to the given format `<'str'>`.
*/

  /* 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("cytimes.pydt._Pydt.strftime", __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_7cytimes_4pydt_5_Pydt_39strftime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_38strftime, "Format to string according to the given format `<'str'>`.\n\n        :param fmt `<'str'>`: The format, e.g.: `'%d/%m/%Y, %H:%M:%S'`.\n        :returns `<'str'>`: The formatted string.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_39strftime = {"strftime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_39strftime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_38strftime};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_39strftime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_fmt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strftime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fmt,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 589, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 589, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "strftime", 0) < (0)) __PYX_ERR(0, 589, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("strftime", 1, 1, 1, i); __PYX_ERR(0, 589, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 589, __pyx_L3_error)
    }
    __pyx_v_fmt = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strftime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 589, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fmt), (&PyUnicode_Type), 0, "fmt", 2))) __PYX_ERR(0, 590, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_38strftime(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_fmt);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_38strftime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt) {
  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("strftime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_strftime(__pyx_v_self, __pyx_v_fmt, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __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("cytimes.pydt._Pydt.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":598
 *         return utils.dt_strformat(self, fmt)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isoformat(self, sep: str = "T") -> str:
 *         """Return the date and time formatted according to ISO format `<'str'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_41isoformat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_isoformat(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat *__pyx_optional_args) {
  PyObject *__pyx_v_sep = ((PyObject*)__pyx_mstate_global->__pyx_n_u_T);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_isoformat __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoformat", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_sep = __pyx_optional_args->sep;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_isoformat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_41isoformat)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_sep};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 598, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":610
 *         """
 *         # Guard
 *         if sep is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_6 = (__pyx_v_sep == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":612
 *         if sep is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "isoformat(sep)",
 *                 "Argument 'sep' cannot be None.",
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":611
 *         # Guard
 *         if sep is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "isoformat(sep)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_isoformat_sep;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Argument_sep_cannot_be_None;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":610
 *         """
 *         # Guard
 *         if sep is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":616
 *                 "Argument 'sep' cannot be None.",
 *             )
 *         return utils.dt_isoformat(self, sep, True)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.sep = __pyx_v_sep;
  __pyx_t_8.utc = 1;
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_isoformat(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":598
 *         return utils.dt_strformat(self, fmt)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isoformat(self, sep: str = "T") -> str:
 *         """Return the date and time formatted according to ISO format `<'str'>`.
*/

  /* 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("cytimes.pydt._Pydt.isoformat", __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_7cytimes_4pydt_5_Pydt_41isoformat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_40isoformat, "Return the date and time formatted according to ISO format `<'str'>`.\n\n        :param sep `<'str'>`: The separator between date and time components. Defaults to `'T'`.\n        :returns `<'str'>`: The ISO formatted string.\n\n            - The default format is `'YYYY-MM-DDTHH:MM:SS[.f]'` with an optional\n              fractional part when `microseconds != 0`.\n            - If timezone-aware, the UTC offset is appened to the end: `'YYYY-MM-DDTHH:MM:SS[.f]+HHMM'`\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_41isoformat = {"isoformat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_41isoformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_40isoformat};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_41isoformat(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_sep = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoformat (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sep,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 598, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "isoformat", 0) < (0)) __PYX_ERR(0, 598, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_n_u_T));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 598, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_n_u_T));
    }
    __pyx_v_sep = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isoformat", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 598, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sep), (&PyUnicode_Type), 0, "sep", 2))) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_40isoformat(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_sep);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_40isoformat(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_sep) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoformat", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.sep = __pyx_v_sep;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->isoformat(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __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("cytimes.pydt._Pydt.isoformat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":618
 *         return utils.dt_isoformat(self, sep, True)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timedict(self) -> dict[str, int]:
 *         """Return `local` time dictionary compatible with `time.localtime()` `<'dict'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_43timedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_timedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct tm __pyx_v__tm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct tm __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timedict", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_43timedict)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 618, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":636
 *             }
 *         """
 *         _tm = utils.dt_to_tm(self, False)             # <<<<<<<<<<<<<<
 *         return {
 *             "tm_year": _tm.tm_year,
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = 0;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
  __pyx_v__tm = __pyx_t_6;

  /* "cytimes/pydt.py":637
 *         """
 *         _tm = utils.dt_to_tm(self, False)
 *         return {             # <<<<<<<<<<<<<<
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "cytimes/pydt.py":638
 *         _tm = utils.dt_to_tm(self, False)
 *         return {
 *             "tm_year": _tm.tm_year,             # <<<<<<<<<<<<<<
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_year, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":639
 *         return {
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,             # <<<<<<<<<<<<<<
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_mon, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":640
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,             # <<<<<<<<<<<<<<
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_mday, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":641
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,             # <<<<<<<<<<<<<<
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_hour, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":642
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,             # <<<<<<<<<<<<<<
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_min, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":643
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,             # <<<<<<<<<<<<<<
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_sec, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":644
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,             # <<<<<<<<<<<<<<
 *             "tm_yday": _tm.tm_yday,
 *             "tm_isdst": _tm.tm_isdst,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_wday, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":645
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,             # <<<<<<<<<<<<<<
 *             "tm_isdst": _tm.tm_isdst,
 *         }
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_yday, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":646
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,
 *             "tm_isdst": _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *         }
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_isdst, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":618
 *         return utils.dt_isoformat(self, sep, True)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timedict(self) -> dict[str, int]:
 *         """Return `local` time dictionary compatible with `time.localtime()` `<'dict'>`.
*/

  /* 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("cytimes.pydt._Pydt.timedict", __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_7cytimes_4pydt_5_Pydt_43timedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_42timedict, "Return `local` time dictionary compatible with `time.localtime()` `<'dict'>`.\n\n        ## Example\n        >>> dt.timedict()\n        >>> {\n                'tm_year': 2024,\n                'tm_mon': 10,\n                'tm_mday': 11,\n                'tm_hour': 8,\n                'tm_min': 14,\n                'tm_sec': 11,\n                'tm_wday': 4,\n                'tm_yday': 285,\n                'tm_isdst': 1\n            }\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_43timedict = {"timedict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_43timedict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_42timedict};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_43timedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timedict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("timedict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("timedict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_42timedict(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_42timedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("timedict", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_timedict(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __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("cytimes.pydt._Pydt.timedict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":649
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimedict(self) -> dict[str, int]:
 *         """Return `UTC` time dictionary compatible with `time.gmtime()` `<'dict'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_45utctimedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utctimedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct tm __pyx_v__tm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct tm __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utctimedict", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_utctimedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_45utctimedict)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 649, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":667
 *             }
 *         """
 *         _tm = utils.dt_to_tm(self, True)             # <<<<<<<<<<<<<<
 *         return {
 *             "tm_year": _tm.tm_year,
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = 1;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error)
  __pyx_v__tm = __pyx_t_6;

  /* "cytimes/pydt.py":668
 *         """
 *         _tm = utils.dt_to_tm(self, True)
 *         return {             # <<<<<<<<<<<<<<
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,
*/
  __Pyx_XDECREF(__pyx_r);

  /* "cytimes/pydt.py":669
 *         _tm = utils.dt_to_tm(self, True)
 *         return {
 *             "tm_year": _tm.tm_year,             # <<<<<<<<<<<<<<
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_year, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":670
 *         return {
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,             # <<<<<<<<<<<<<<
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_mon, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":671
 *             "tm_year": _tm.tm_year,
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,             # <<<<<<<<<<<<<<
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_mday, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":672
 *             "tm_mon": _tm.tm_mon,
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,             # <<<<<<<<<<<<<<
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_hour, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":673
 *             "tm_mday": _tm.tm_mday,
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,             # <<<<<<<<<<<<<<
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_min, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":674
 *             "tm_hour": _tm.tm_hour,
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,             # <<<<<<<<<<<<<<
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_sec, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":675
 *             "tm_min": _tm.tm_min,
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,             # <<<<<<<<<<<<<<
 *             "tm_yday": _tm.tm_yday,
 *             "tm_isdst": _tm.tm_isdst,
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_wday, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":676
 *             "tm_sec": _tm.tm_sec,
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,             # <<<<<<<<<<<<<<
 *             "tm_isdst": _tm.tm_isdst,
 *         }
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_yday, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":677
 *             "tm_wday": _tm.tm_wday,
 *             "tm_yday": _tm.tm_yday,
 *             "tm_isdst": _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *         }
 * 
*/
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tm_isdst, __pyx_t_2) < (0)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":649
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimedict(self) -> dict[str, int]:
 *         """Return `UTC` time dictionary compatible with `time.gmtime()` `<'dict'>`.
*/

  /* 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("cytimes.pydt._Pydt.utctimedict", __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_7cytimes_4pydt_5_Pydt_45utctimedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_44utctimedict, "Return `UTC` time dictionary compatible with `time.gmtime()` `<'dict'>`.\n\n        ## Example\n        >>> dt.utctimedict()\n        >>> {\n                'tm_year': 2024,\n                'tm_mon': 10,\n                'tm_mday': 11,\n                'tm_hour': 6,\n                'tm_min': 15,\n                'tm_sec': 6,\n                'tm_wday': 4,\n                'tm_yday': 285,\n                'tm_isdst': 0\n            }\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_45utctimedict = {"utctimedict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_45utctimedict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_44utctimedict};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_45utctimedict(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utctimedict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("utctimedict", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("utctimedict", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_44utctimedict(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_44utctimedict(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("utctimedict", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_utctimedict(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __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("cytimes.pydt._Pydt.utctimedict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":680
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetuple(self) -> object:
 *         """Return `local` time tuple compatible with `time.localtime()` `<'struct_time'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_47timetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_timetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct tm __pyx_v__tm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct tm __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timetuple", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timetuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_47timetuple)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __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_typedict_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
  }

  /* "cytimes/pydt.py":698
 *             )
 *         """
 *         _tm = utils.dt_to_tm(self, False)             # <<<<<<<<<<<<<<
 *         return struct_time(
 *             (
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = 0;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_v__tm = __pyx_t_6;

  /* "cytimes/pydt.py":699
 *         """
 *         _tm = utils.dt_to_tm(self, False)
 *         return struct_time(             # <<<<<<<<<<<<<<
 *             (
 *                 _tm.tm_year,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_struct_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/pydt.py":701
 *         return struct_time(
 *             (
 *                 _tm.tm_year,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
*/
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cytimes/pydt.py":702
 *             (
 *                 _tm.tm_year,
 *                 _tm.tm_mon,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pydt.py":703
 *                 _tm.tm_year,
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_hour,
 *                 _tm.tm_min,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pydt.py":704
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,             # <<<<<<<<<<<<<<
 *                 _tm.tm_min,
 *                 _tm.tm_sec,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pydt.py":705
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,
 *                 _tm.tm_min,             # <<<<<<<<<<<<<<
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pydt.py":706
 *                 _tm.tm_hour,
 *                 _tm.tm_min,
 *                 _tm.tm_sec,             # <<<<<<<<<<<<<<
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pydt.py":707
 *                 _tm.tm_min,
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_yday,
 *                 _tm.tm_isdst,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pydt.py":708
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_isdst,
 *             )
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pydt.py":709
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,
 *                 _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *             )
 *         )
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pydt.py":701
 *         return struct_time(
 *             (
 *                 _tm.tm_year,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
*/
  __pyx_t_16 = PyTuple_New(9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_9) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_10) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_11) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_12) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_13) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_14);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_14) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_15) != (0)) __PYX_ERR(0, 701, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __pyx_t_15 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_16};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":680
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetuple(self) -> object:
 *         """Return `local` time tuple compatible with `time.localtime()` `<'struct_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_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.timetuple", __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_7cytimes_4pydt_5_Pydt_47timetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_46timetuple, "Return `local` time tuple compatible with `time.localtime()` `<'struct_time'>`.\n\n        ## Example\n        >>> dt.timetuple()\n        >>> time.struct_time(\n                tm_year=2025,\n                tm_mon=11,\n                tm_mday=6,\n                tm_hour=16,\n                tm_min=48,\n                tm_sec=57,\n                tm_wday=3,\n                tm_yday=310,\n                tm_isdst=0\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_47timetuple = {"timetuple", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_47timetuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_46timetuple};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_47timetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timetuple (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("timetuple", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("timetuple", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_46timetuple(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_46timetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("timetuple", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_timetuple(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __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("cytimes.pydt._Pydt.timetuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":713
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimetuple(self) -> object:
 *         """Return `UTC` time tuple compatible with `time.gmtime()` `<'struct_time'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_49utctimetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utctimetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct tm __pyx_v__tm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct tm __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utctimetuple", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_utctimetuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_49utctimetuple)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __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_typedict_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
  }

  /* "cytimes/pydt.py":731
 *             )
 *         """
 *         _tm = utils.dt_to_tm(self, True)             # <<<<<<<<<<<<<<
 *         return struct_time(
 *             (
*/
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.utc = 1;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_v__tm = __pyx_t_6;

  /* "cytimes/pydt.py":732
 *         """
 *         _tm = utils.dt_to_tm(self, True)
 *         return struct_time(             # <<<<<<<<<<<<<<
 *             (
 *                 _tm.tm_year,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_struct_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/pydt.py":734
 *         return struct_time(
 *             (
 *                 _tm.tm_year,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
*/
  __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cytimes/pydt.py":735
 *             (
 *                 _tm.tm_year,
 *                 _tm.tm_mon,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,
*/
  __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "cytimes/pydt.py":736
 *                 _tm.tm_year,
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_hour,
 *                 _tm.tm_min,
*/
  __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "cytimes/pydt.py":737
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,             # <<<<<<<<<<<<<<
 *                 _tm.tm_min,
 *                 _tm.tm_sec,
*/
  __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "cytimes/pydt.py":738
 *                 _tm.tm_mday,
 *                 _tm.tm_hour,
 *                 _tm.tm_min,             # <<<<<<<<<<<<<<
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,
*/
  __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "cytimes/pydt.py":739
 *                 _tm.tm_hour,
 *                 _tm.tm_min,
 *                 _tm.tm_sec,             # <<<<<<<<<<<<<<
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,
*/
  __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);

  /* "cytimes/pydt.py":740
 *                 _tm.tm_min,
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_yday,
 *                 _tm.tm_isdst,
*/
  __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "cytimes/pydt.py":741
 *                 _tm.tm_sec,
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,             # <<<<<<<<<<<<<<
 *                 _tm.tm_isdst,
 *             )
*/
  __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);

  /* "cytimes/pydt.py":742
 *                 _tm.tm_wday,
 *                 _tm.tm_yday,
 *                 _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *             )
 *         )
*/
  __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);

  /* "cytimes/pydt.py":734
 *         return struct_time(
 *             (
 *                 _tm.tm_year,             # <<<<<<<<<<<<<<
 *                 _tm.tm_mon,
 *                 _tm.tm_mday,
*/
  __pyx_t_16 = PyTuple_New(9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_9) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_10) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_11) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_12) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_13) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_14);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_14) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_15) != (0)) __PYX_ERR(0, 734, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __pyx_t_15 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_16};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":713
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimetuple(self) -> object:
 *         """Return `UTC` time tuple compatible with `time.gmtime()` `<'struct_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_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utctimetuple", __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_7cytimes_4pydt_5_Pydt_49utctimetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_48utctimetuple, "Return `UTC` time tuple compatible with `time.gmtime()` `<'struct_time'>`.\n\n        ## Example\n        >>> dt.utctimetuple()\n        >>> time.struct_time(\n                tm_year=2025,\n                tm_mon=11,\n                tm_mday=6,\n                tm_hour=8,\n                tm_min=50,\n                tm_sec=9,\n                tm_wday=3,\n                tm_yday=310,\n                tm_isdst=0\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_49utctimetuple = {"utctimetuple", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_49utctimetuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_48utctimetuple};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_49utctimetuple(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utctimetuple (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("utctimetuple", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("utctimetuple", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_48utctimetuple(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_48utctimetuple(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("utctimetuple", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_utctimetuple(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __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("cytimes.pydt._Pydt.utctimetuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":746
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def toordinal(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_51toordinal(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_toordinal(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toordinal", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_toordinal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_51toordinal)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":754
 *         - '0001-01-01' is day 1.
 *         """
 *         return utils.dt_to_ord(self, False)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.utc = 0;
  __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 754, __pyx_L1_error)
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "cytimes/pydt.py":746
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def toordinal(self) -> cython.int:
*/

  /* 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("cytimes.pydt._Pydt.toordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_51toordinal(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_50toordinal, "Return proleptic Gregorian ordinal for the year, month and day `<'int'>`.\n\n        - Only the year, month and day values contribute to the result.\n        - '0001-01-01' is day 1.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_51toordinal = {"toordinal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_51toordinal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_50toordinal};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_51toordinal(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toordinal (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("toordinal", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("toordinal", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_50toordinal(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_50toordinal(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("toordinal", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_toordinal(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 746, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.toordinal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_53toseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_7cytimes_4pydt_5_Pydt_toseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds *__pyx_optional_args) {

  /* "cytimes/pydt.py":757
 * 
 *     @cython.ccall
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:             # <<<<<<<<<<<<<<
 *         """Return total seconds since epoch `<'float'>`.
 * 
*/
  int __pyx_v_utc = ((int)0);
  double __pyx_r;
  __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;
  size_t __pyx_t_6;
  double __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toseconds", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_toseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_53toseconds)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_utc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":779
 *           follows the attached timezone.
 *         """
 *         return utils.dt_to_sec(self, utc)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.utc = __pyx_v_utc;
  __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(__pyx_t_7 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error)
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/

  /* 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("cytimes.pydt._Pydt.toseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_53toseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_52toseconds, "Return total seconds since epoch `<'float'>`.\n\n        Computes the offset from `1970-01-01 00:00:00` to this datetime.\n        Fractional seconds reflect microsecond precision.\n\n        :param utc `<'bool'>`: Whether to subtract the UTC offset. Defaults to `False`.\n\n            - When `True` and the datetime is `timezone-aware`, subtract the UTC\n              offset first (i.e., normalize to UTC) before computing the epoch\n              difference.\n            - For `naive` datetime this flag is ignored.\n\n        :returns `<'float'>`: Seconds since epoch, where fractional part represents the microseconds.\n\n        ## Notes\n        - Unlike `timestamp()`, this method never assumes local time for\n          naive datetimes. Naive values are interpreted `as-is` without\n          any local-time conversion.\n        - For aware datetimes, offset handling (including DST folds/gaps)\n          follows the attached timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_53toseconds = {"toseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_53toseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_52toseconds};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_53toseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_utc;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("toseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_utc,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 756, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 756, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "toseconds", 0) < (0)) __PYX_ERR(0, 756, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 756, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_utc = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_utc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":757
 * 
 *     @cython.ccall
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:             # <<<<<<<<<<<<<<
 *         """Return total seconds since epoch `<'float'>`.
 * 
*/
      __pyx_v_utc = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("toseconds", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 756, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.toseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_52toseconds(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_utc);

  /* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_52toseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_utc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("toseconds", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = __pyx_v_utc;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->toseconds(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.toseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":781
 *         return utils.dt_to_sec(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:
 *         """Return total microseconds since epoch `<'int'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_55tomicroseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pydt_5_Pydt_tomicroseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds *__pyx_optional_args) {

  /* "cytimes/pydt.py":782
 * 
 *     @cython.ccall
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:             # <<<<<<<<<<<<<<
 *         """Return total microseconds since epoch `<'int'>`.
 * 
*/
  int __pyx_v_utc = ((int)0);
  PY_LONG_LONG __pyx_r;
  __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;
  size_t __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tomicroseconds", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_utc = __pyx_optional_args->utc;
    }
  }

  /* "cytimes/pydt.py":781
 *         return utils.dt_to_sec(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:
 *         """Return total microseconds since epoch `<'int'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tomicroseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_55tomicroseconds)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_utc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_7 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":803
 *           follows the attached timezone.
 *         """
 *         return utils.dt_to_us(self, utc)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.utc = __pyx_v_utc;
  __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L1_error)
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "cytimes/pydt.py":781
 *         return utils.dt_to_sec(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:
 *         """Return total microseconds since epoch `<'int'>`.
*/

  /* 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("cytimes.pydt._Pydt.tomicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_55tomicroseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_54tomicroseconds, "Return total microseconds since epoch `<'int'>`.\n\n        Computes the offset from `1970-01-01 00:00:00` to this datetime.\n\n        :param utc `<'bool'>`: Whether to subtract the UTC offset. Defaults to `False`.\n\n            - When `True` and the datetime is `timezone-aware`, subtract the UTC\n              offset first (i.e., normalize to UTC) before computing the epoch\n              difference.\n            - For `naive` datetimes this flag is ignored.\n\n        :returns `<'int'>`: Microseconds since epoch.\n\n        ## Notes\n        - Unlike `timestamp()`, this method never assumes local time for\n          naive datetimes. Naive values are interpreted `as-is` without\n          any local-time conversion.\n        - For aware datetimes, offset handling (including DST folds/gaps)\n          follows the attached timezone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_55tomicroseconds = {"tomicroseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_55tomicroseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_54tomicroseconds};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_55tomicroseconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_utc;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tomicroseconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_utc,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 781, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 781, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tomicroseconds", 0) < (0)) __PYX_ERR(0, 781, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 781, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_utc = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_utc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":782
 * 
 *     @cython.ccall
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:             # <<<<<<<<<<<<<<
 *         """Return total microseconds since epoch `<'int'>`.
 * 
*/
      __pyx_v_utc = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tomicroseconds", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 781, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tomicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_54tomicroseconds(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_utc);

  /* "cytimes/pydt.py":781
 *         return utils.dt_to_sec(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:
 *         """Return total microseconds since epoch `<'int'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_54tomicroseconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_utc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tomicroseconds", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.utc = __pyx_v_utc;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->tomicroseconds(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tomicroseconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":805
 *         return utils.dt_to_us(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timestamp(self) -> cython.double:
 *         """Return as a POSIX timestamp `<'float'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_57timestamp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static double __pyx_f_7cytimes_4pydt_5_Pydt_timestamp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  double __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timestamp", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_57timestamp)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":808
 *     def timestamp(self) -> cython.double:
 *         """Return as a POSIX timestamp `<'float'>`."""
 *         return utils.dt_to_ts(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_ts(((PyDateTime_DateTime *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L1_error)
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":805
 *         return utils.dt_to_us(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timestamp(self) -> cython.double:
 *         """Return as a POSIX timestamp `<'float'>`."""
*/

  /* 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("cytimes.pydt._Pydt.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_57timestamp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_56timestamp, "Return as a POSIX timestamp `<'float'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_57timestamp = {"timestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_57timestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_56timestamp};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_57timestamp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timestamp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("timestamp", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("timestamp", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_56timestamp(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_56timestamp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timestamp", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_timestamp(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":810
 *         return utils.dt_to_ts(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def date(self) -> datetime.date:
 *         """Return the date part `<'datetime.date'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_59date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyDateTime_Date *__pyx_f_7cytimes_4pydt_5_Pydt_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Date *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_59date)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 810, __pyx_L1_error)
        __pyx_r = ((PyDateTime_Date *)__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_typedict_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
  }

  /* "cytimes/pydt.py":813
 *     def date(self) -> datetime.date:
 *         """Return the date part `<'datetime.date'>`."""
 *         return utils.date_fr_dt(self, None)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.dclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Date *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":810
 *         return utils.dt_to_ts(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def date(self) -> datetime.date:
 *         """Return the date part `<'datetime.date'>`."""
*/

  /* 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("cytimes.pydt._Pydt.date", __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_7cytimes_4pydt_5_Pydt_59date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_58date, "Return the date part `<'datetime.date'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_59date = {"date", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_59date, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_58date};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_59date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("date", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("date", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_58date(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_58date(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("date", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_date(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __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("cytimes.pydt._Pydt.date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":815
 *         return utils.date_fr_dt(self, None)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def time(self) -> datetime.time:
 *         """Return the time part (without timezone information) `<'datetime.time'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_61time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyDateTime_Time *__pyx_f_7cytimes_4pydt_5_Pydt_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cpython_8datetime_time_new __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_61time)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 815, __pyx_L1_error)
        __pyx_r = ((PyDateTime_Time *)__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_typedict_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
  }

  /* "cytimes/pydt.py":818
 *     def time(self) -> datetime.time:
 *         """Return the time part (without timezone information) `<'datetime.time'>`."""
 *         return datetime.time_new(             # <<<<<<<<<<<<<<
 *             self.access_hour(),
 *             self.access_minute(),
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "cytimes/pydt.py":823
 *             self.access_second(),
 *             self.access_microsecond(),
 *             None,             # <<<<<<<<<<<<<<
 *             0,
 *         )
*/
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.fold = 0;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cpython_8datetime_time_new(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0), Py_None, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":815
 *         return utils.date_fr_dt(self, None)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def time(self) -> datetime.time:
 *         """Return the time part (without timezone information) `<'datetime.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_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.time", __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_7cytimes_4pydt_5_Pydt_61time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_60time, "Return the time part (without timezone information) `<'datetime.time'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_61time = {"time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_61time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_60time};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_61time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("time", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("time", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_60time(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_60time(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("time", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_time(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __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("cytimes.pydt._Pydt.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":827
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetz(self) -> datetime.time:
 *         """Return the time part (with the same timezone information) `<'datetime.time'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_63timetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyDateTime_Time *__pyx_f_7cytimes_4pydt_5_Pydt_timetz(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Time *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("timetz", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_timetz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_63timetz)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 827, __pyx_L1_error)
        __pyx_r = ((PyDateTime_Time *)__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_typedict_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
  }

  /* "cytimes/pydt.py":830
 *     def timetz(self) -> datetime.time:
 *         """Return the time part (with the same timezone information) `<'datetime.time'>`."""
 *         return utils.time_fr_dt(self, None)             # <<<<<<<<<<<<<<
 * 
 *     # Internal -----------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.tclass = Py_None;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Time *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":827
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetz(self) -> datetime.time:
 *         """Return the time part (with the same timezone information) `<'datetime.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_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.timetz", __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_7cytimes_4pydt_5_Pydt_63timetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_62timetz, "Return the time part (with the same timezone information) `<'datetime.time'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_63timetz = {"timetz", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_63timetz, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_62timetz};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_63timetz(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("timetz (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("timetz", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("timetz", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_62timetz(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_62timetz(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("timetz", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_timetz(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __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("cytimes.pydt._Pydt.timetz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":833
 * 
 *     # Internal -----------------------------------------------------------------------------
 *     @cython.cfunc             # <<<<<<<<<<<<<<
 *     @cython.inline(True)
 *     def _cls(self) -> object:
*/

static CYTHON_INLINE PyObject *__pyx_f_7cytimes_4pydt_5_Pydt__cls(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("_cls", 0);

  /* "cytimes/pydt.py":837
 *     def _cls(self) -> object:
 *         """(internal) Access the class object of the current instance `<'type[Pydt]'>`."""
 *         if self.__cls is None:             # <<<<<<<<<<<<<<
 *             self.__cls = self.__class__
 *         return self.__cls
*/
  __pyx_t_1 = (__pyx_v_self->_Pydt__cls == Py_None);
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":838
 *         """(internal) Access the class object of the current instance `<'type[Pydt]'>`."""
 *         if self.__cls is None:
 *             self.__cls = self.__class__             # <<<<<<<<<<<<<<
 *         return self.__cls
 * 
*/
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_Pydt__cls);
    __Pyx_DECREF(__pyx_v_self->_Pydt__cls);
    __pyx_v_self->_Pydt__cls = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cytimes/pydt.py":837
 *     def _cls(self) -> object:
 *         """(internal) Access the class object of the current instance `<'type[Pydt]'>`."""
 *         if self.__cls is None:             # <<<<<<<<<<<<<<
 *             self.__cls = self.__class__
 *         return self.__cls
*/
  }

  /* "cytimes/pydt.py":839
 *         if self.__cls is None:
 *             self.__cls = self.__class__
 *         return self.__cls             # <<<<<<<<<<<<<<
 * 
 *     # Manipulator --------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_Pydt__cls);
  __pyx_r = __pyx_v_self->_Pydt__cls;
  goto __pyx_L0;

  /* "cytimes/pydt.py":833
 * 
 *     # Internal -----------------------------------------------------------------------------
 *     @cython.cfunc             # <<<<<<<<<<<<<<
 *     @cython.inline(True)
 *     def _cls(self) -> object:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt._cls", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":842
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def replace(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_65replace(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_replace(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);
  PyObject *__pyx_v_tzinfo = ((PyObject *)__pyx_mstate_global->__pyx_int_neg_1);
  int __pyx_v_fold = ((int)-1);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  size_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace __pyx_t_19;
  int __pyx_t_20;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_21;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("replace", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_tzinfo = __pyx_optional_args->tzinfo;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_fold = __pyx_optional_args->fold;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_tzinfo);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_65replace)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_fold); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 842, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_13 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[10] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_tzinfo, __pyx_t_12};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_13, (10-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 842, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":881
 *         """
 *         # Prase timezone
 *         if not isinstance(tzinfo, int):             # <<<<<<<<<<<<<<
 *             tzinfo = utils.tz_parse(tzinfo)
 * 
*/
  __pyx_t_14 = PyLong_Check(__pyx_v_tzinfo); 
  __pyx_t_15 = (!__pyx_t_14);
  if (__pyx_t_15) {

    /* "cytimes/pydt.py":882
 *         # Prase timezone
 *         if not isinstance(tzinfo, int):
 *             tzinfo = utils.tz_parse(tzinfo)             # <<<<<<<<<<<<<<
 * 
 *         # Replacement
*/
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_tzinfo, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":881
 *         """
 *         # Prase timezone
 *         if not isinstance(tzinfo, int):             # <<<<<<<<<<<<<<
 *             tzinfo = utils.tz_parse(tzinfo)
 * 
*/
  }

  /* "cytimes/pydt.py":885
 * 
 *         # Replacement
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_18);
    /*try:*/ {

      /* "cytimes/pydt.py":887
 *         try:
 *             # fmt: off
 *             return utils.dt_replace(self,             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second,
 *                 microsecond, tzinfo, fold, self._cls(),
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":889
 *             return utils.dt_replace(self,
 *                 year, month, day, hour, minute, second,
 *                 microsecond, tzinfo, fold, self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":887
 *         try:
 *             # fmt: off
 *             return utils.dt_replace(self,             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second,
 *                 microsecond, tzinfo, fold, self._cls(),
*/
      __pyx_t_19.__pyx_n = 10;
      __pyx_t_19.year = __pyx_v_year;
      __pyx_t_19.month = __pyx_v_month;
      __pyx_t_19.day = __pyx_v_day;
      __pyx_t_19.hour = __pyx_v_hour;
      __pyx_t_19.minute = __pyx_v_minute;
      __pyx_t_19.second = __pyx_v_second;
      __pyx_t_19.microsecond = __pyx_v_microsecond;
      __pyx_t_19.tzinfo = __pyx_v_tzinfo;
      __pyx_t_19.fold = __pyx_v_fold;
      __pyx_t_19.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 887, __pyx_L4_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/pydt.py":885
 * 
 *         # Replacement
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pydt.py":892
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "replace(...)", None, err)
 * 
*/
    __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_20) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 892, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":893
 *             # fmt: on
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "replace(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . year
*/
        __pyx_t_12 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 893, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_21.__pyx_n = 4;
        __pyx_t_21.cls = __pyx_t_12;
        __pyx_t_21.input_msg = __pyx_mstate_global->__pyx_kp_u_replace_2;
        __pyx_t_21.error_msg = ((PyObject*)Py_None);
        __pyx_t_21.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_21); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 893, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }

      /* "cytimes/pydt.py":892
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "replace(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L16;
        }
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
          if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_27);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __pyx_t_20 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
          goto __pyx_L6_except_error;
        }
        __pyx_L16:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/pydt.py":885
 * 
 *         # Replacement
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  }

  /* "cytimes/pydt.py":842
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def replace(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_tzinfo);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_65replace(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_64replace, "Replace the specified datetime fields with new values `<'Pydt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..9999].\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :param tzinfo `<'tzinfo/None'>`: The timeone. Defaults to `SENTINEL` (no change).\n\n            - `<'None'>`: removes tzinfo (makes datetime naive).\n            - `<'str'>`: Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>`: A subclass of `datetime.tzinfo`.\n\n        :param fold `<'int'>`: Fold value (0 or 1) for ambiguous times. Defaults to `SENTINEL` (no change).\n        :returns `<'Pydt'>`: The resulting datetime after applying the specified field replacements.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_65replace = {"replace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_65replace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_64replace};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_65replace(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  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_tzinfo = 0;
  int __pyx_v_fold;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("replace (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_tzinfo,&__pyx_mstate_global->__pyx_n_u_fold,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 842, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "replace", 0) < (0)) __PYX_ERR(0, 842, __pyx_L3_error)
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
    } else {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 842, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_neg_1));
    }
    if (values[0]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
    if (values[3]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)-1);
    }
    if (values[4]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)-1);
    }
    if (values[5]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)-1);
    }
    if (values[6]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 851, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)-1);
    }
    __pyx_v_tzinfo = values[7];
    if (values[8]) {
      __pyx_v_fold = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_fold == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L3_error)
    } else {
      __pyx_v_fold = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("replace", 0, 0, 9, __pyx_nargs); __PYX_ERR(0, 842, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_64replace(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, __pyx_v_fold);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_64replace(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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_tzinfo, int __pyx_v_fold) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("replace", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 9;
  __pyx_t_2.year = __pyx_v_year;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_2.hour = __pyx_v_hour;
  __pyx_t_2.minute = __pyx_v_minute;
  __pyx_t_2.second = __pyx_v_second;
  __pyx_t_2.microsecond = __pyx_v_microsecond;
  __pyx_t_2.tzinfo = __pyx_v_tzinfo;
  __pyx_t_2.fold = __pyx_v_fold;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->replace(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __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("cytimes.pydt._Pydt.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_67to_curr_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year *__pyx_optional_args) {

  /* "cytimes/pydt.py":899
 *     def to_curr_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
  PyObject *__pyx_v_month = ((PyObject *)Py_None);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_mm;
  int __pyx_v_yy;
  int __pyx_v_dd;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_17;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }

  /* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_curr_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_67to_curr_year)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_month, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 896, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":920
 *         """
 *         # Parse month
 *         mm: cython.int = _parse_month(month, None, True)             # <<<<<<<<<<<<<<
 *         if mm == -1 or mm == self.access_month():
 *             return self.to_curr_month(day)  # exit: same month
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 1;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 920, __pyx_L1_error)
  __pyx_v_mm = __pyx_t_7;

  /* "cytimes/pydt.py":921
 *         # Parse month
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1 or mm == self.access_month():             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()
*/
  __pyx_t_10 = (__pyx_v_mm == -1L);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_mm == ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  __pyx_t_9 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":922
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1 or mm == self.access_month():
 *             return self.to_curr_month(day)  # exit: same month             # <<<<<<<<<<<<<<
 *         yy: cython.int = self.access_year()
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":921
 *         # Parse month
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1 or mm == self.access_month():             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()
*/
  }

  /* "cytimes/pydt.py":923
 *         if mm == -1 or mm == self.access_month():
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 * 
 *         # Clamp to max days
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":926
 * 
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day             # <<<<<<<<<<<<<<
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))
*/
  __pyx_t_9 = (__pyx_v_day < 1);
  if (__pyx_t_9) {
    __pyx_t_7 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  } else {
    __pyx_t_7 = __pyx_v_day;
  }
  __pyx_v_dd = __pyx_t_7;

  /* "cytimes/pydt.py":927
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  __pyx_t_9 = (__pyx_v_dd > 28);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":928
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_7 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_12 = __pyx_v_dd;
    __pyx_t_9 = (__pyx_t_7 < __pyx_t_12);
    if (__pyx_t_9) {
      __pyx_t_13 = __pyx_t_7;
    } else {
      __pyx_t_13 = __pyx_t_12;
    }
    __pyx_v_dd = __pyx_t_13;

    /* "cytimes/pydt.py":927
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/pydt.py":931
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_16);
    /*try:*/ {

      /* "cytimes/pydt.py":932
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":940
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":942
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":932
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_17.__pyx_n = 10;
      __pyx_t_17.year = __pyx_v_yy;
      __pyx_t_17.month = __pyx_v_mm;
      __pyx_t_17.day = __pyx_v_dd;
      __pyx_t_17.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_17.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_17.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_17.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_17.tzinfo = __pyx_t_1;
      __pyx_t_17.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_17.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 932, __pyx_L7_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L11_try_return;

      /* "cytimes/pydt.py":931
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __pyx_L7_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":944
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 944, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":945
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_5 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_18.__pyx_n = 4;
        __pyx_t_18.cls = __pyx_t_5;
        __pyx_t_18.input_msg = __pyx_mstate_global->__pyx_kp_u_to_curr_year_2;
        __pyx_t_18.error_msg = ((PyObject*)Py_None);
        __pyx_t_18.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_18); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 945, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cytimes/pydt.py":944
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L19;
        }
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
          if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_20);
          __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_t_13 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_19;
          goto __pyx_L9_except_error;
        }
        __pyx_L19:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L8_exception_handled;
    }
    goto __pyx_L9_except_error;

    /* "cytimes/pydt.py":931
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
    goto __pyx_L1_error;
    __pyx_L11_try_return:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
    goto __pyx_L0;
    __pyx_L8_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  }

  /* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_67to_curr_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_66to_curr_year, "Adjust the date to the specified month and day in the current year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current year.\n\n        ## Example\n        >>> dt.to_curr_year(month=\"Feb\", day=31)    # The last day of February in the current year\n        >>> dt.to_curr_year(month=11)               # The same day of November in the current year\n        >>> dt.to_curr_year(day=1)                  # The 1st day of the current month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_67to_curr_year = {"to_curr_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_67to_curr_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_66to_curr_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_67to_curr_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 896, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 896, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 896, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_year", 0) < (0)) __PYX_ERR(0, 896, __pyx_L3_error)

      /* "cytimes/pydt.py":899
 *     def to_curr_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 896, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 896, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_month = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_year", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 896, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_66to_curr_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_66to_curr_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_curr_year(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __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("cytimes.pydt._Pydt.to_curr_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":947
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_year(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_69to_prev_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year *__pyx_optional_args) {

  /* "cytimes/pydt.py":950
 *     def to_prev_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
  PyObject *__pyx_v_month = ((PyObject *)Py_None);
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }

  /* "cytimes/pydt.py":947
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_year(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_prev_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_69to_prev_year)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_month, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 947, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":970
 *         >>> dt.to_prev_year(day=1)                  # The 1st day of the current month in the previous year
 *         """
 *         return self.to_year(-1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.month = __pyx_v_month;
  __pyx_t_7.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_year(__pyx_v_self, -1, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":947
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_year(
 *         self,
*/

  /* 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("cytimes.pydt._Pydt.to_prev_year", __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_7cytimes_4pydt_5_Pydt_69to_prev_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_68to_prev_year, "Adjust the date to the specified month and day in the previous year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous year.\n\n        ## Example\n        >>> dt.to_prev_year(month=\"Feb\", day=31)    # The last day of February in the previous year\n        >>> dt.to_prev_year(month=11)               # The same day of November in the previous year\n        >>> dt.to_prev_year(day=1)                  # The 1st day of the current month in the previous year\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_69to_prev_year = {"to_prev_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_69to_prev_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_68to_prev_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_69to_prev_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 947, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_year", 0) < (0)) __PYX_ERR(0, 947, __pyx_L3_error)

      /* "cytimes/pydt.py":950
 *     def to_prev_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_month = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_year", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 947, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_prev_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_68to_prev_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* "cytimes/pydt.py":947
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_year(
 *         self,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_68to_prev_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_prev_year(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __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("cytimes.pydt._Pydt.to_prev_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":972
 *         return self.to_year(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_year(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_71to_next_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year *__pyx_optional_args) {

  /* "cytimes/pydt.py":975
 *     def to_next_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
  PyObject *__pyx_v_month = ((PyObject *)Py_None);
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }

  /* "cytimes/pydt.py":972
 *         return self.to_year(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_year(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_next_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_71to_next_year)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_month, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 972, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":995
 *         >>> dt.to_next_year(day=1)                  # The 1st day of the current month in the next year
 *         """
 *         return self.to_year(1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.month = __pyx_v_month;
  __pyx_t_7.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_year(__pyx_v_self, 1, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":972
 *         return self.to_year(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_year(
 *         self,
*/

  /* 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("cytimes.pydt._Pydt.to_next_year", __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_7cytimes_4pydt_5_Pydt_71to_next_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_70to_next_year, "Adjust the date to the specified month and day in the next year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next year.\n\n        ## Example\n        >>> dt.to_next_year(month=\"Feb\", day=31)    # The last day of February in the next year\n        >>> dt.to_next_year(month=11)               # The same day of November in the next year\n        >>> dt.to_next_year(day=1)                  # The 1st day of the current month in the next year\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_71to_next_year = {"to_next_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_71to_next_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_70to_next_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_71to_next_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 972, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 972, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 972, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_year", 0) < (0)) __PYX_ERR(0, 972, __pyx_L3_error)

      /* "cytimes/pydt.py":975
 *     def to_next_year(
 *         self,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 972, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 972, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_month = values[0];
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 976, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_year", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 972, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_next_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_70to_next_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* "cytimes/pydt.py":972
 *         return self.to_year(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_year(
 *         self,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_70to_next_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_next_year(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __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("cytimes.pydt._Pydt.to_next_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":997
 *         return self.to_year(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_year(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_73to_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year *__pyx_optional_args) {

  /* "cytimes/pydt.py":1001
 *         self,
 *         offset: cython.int,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
  PyObject *__pyx_v_month = ((PyObject *)Py_None);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_17;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_year", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }

  /* "cytimes/pydt.py":997
 *         return self.to_year(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_year(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_73to_year)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_5, __pyx_v_month, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 997, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1025
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_year(month, day)  # exit
 * 
*/
  __pyx_t_8 = (__pyx_v_offset == 0);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1026
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_year(month, day)  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Compute new year & month & day
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 2;
    __pyx_t_9.month = __pyx_v_month;
    __pyx_t_9.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_year(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1025
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_year(month, day)  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1029
 * 
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year() + offset             # <<<<<<<<<<<<<<
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:
*/
  __pyx_v_yy = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0) + __pyx_v_offset);

  /* "cytimes/pydt.py":1030
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year() + offset
 *         mm: cython.int = _parse_month(month, None, True)             # <<<<<<<<<<<<<<
 *         if mm == -1:
 *             mm = self.access_month()
*/
  __pyx_t_11.__pyx_n = 2;
  __pyx_t_11.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_11.raise_error = 1;
  __pyx_t_10 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_11); if (unlikely(__pyx_t_10 == ((int)-2))) __PYX_ERR(0, 1030, __pyx_L1_error)
  __pyx_v_mm = __pyx_t_10;

  /* "cytimes/pydt.py":1031
 *         yy: cython.int = self.access_year() + offset
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             mm = self.access_month()
 *         dd: cython.int = self.access_day() if day < 1 else day
*/
  __pyx_t_8 = (__pyx_v_mm == -1L);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1032
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:
 *             mm = self.access_month()             # <<<<<<<<<<<<<<
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
*/
    __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

    /* "cytimes/pydt.py":1031
 *         yy: cython.int = self.access_year() + offset
 *         mm: cython.int = _parse_month(month, None, True)
 *         if mm == -1:             # <<<<<<<<<<<<<<
 *             mm = self.access_month()
 *         dd: cython.int = self.access_day() if day < 1 else day
*/
  }

  /* "cytimes/pydt.py":1033
 *         if mm == -1:
 *             mm = self.access_month()
 *         dd: cython.int = self.access_day() if day < 1 else day             # <<<<<<<<<<<<<<
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))
*/
  __pyx_t_8 = (__pyx_v_day < 1);
  if (__pyx_t_8) {
    __pyx_t_10 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  } else {
    __pyx_t_10 = __pyx_v_day;
  }
  __pyx_v_dd = __pyx_t_10;

  /* "cytimes/pydt.py":1034
 *             mm = self.access_month()
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  __pyx_t_8 = (__pyx_v_dd > 28);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1035
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_10 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_12 = __pyx_v_dd;
    __pyx_t_8 = (__pyx_t_10 < __pyx_t_12);
    if (__pyx_t_8) {
      __pyx_t_13 = __pyx_t_10;
    } else {
      __pyx_t_13 = __pyx_t_12;
    }
    __pyx_v_dd = __pyx_t_13;

    /* "cytimes/pydt.py":1034
 *             mm = self.access_month()
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/pydt.py":1038
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_16);
    /*try:*/ {

      /* "cytimes/pydt.py":1039
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1047
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1049
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":1039
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_17.__pyx_n = 10;
      __pyx_t_17.year = __pyx_v_yy;
      __pyx_t_17.month = __pyx_v_mm;
      __pyx_t_17.day = __pyx_v_dd;
      __pyx_t_17.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_17.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_17.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_17.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_17.tzinfo = __pyx_t_1;
      __pyx_t_17.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_17.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1039, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1039, __pyx_L6_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;

      /* "cytimes/pydt.py":1038
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __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_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;

    /* "cytimes/pydt.py":1051
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_year(...)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1051, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":1052
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_year(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . quarter
*/
        __pyx_t_6 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1052, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_18.__pyx_n = 4;
        __pyx_t_18.cls = __pyx_t_6;
        __pyx_t_18.input_msg = __pyx_mstate_global->__pyx_kp_u_to_year_2;
        __pyx_t_18.error_msg = ((PyObject*)Py_None);
        __pyx_t_18.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_18); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "cytimes/pydt.py":1051
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_year(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L18;
        }
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
          if ( unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_20);
          __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_t_13 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_19;
          goto __pyx_L8_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cytimes/pydt.py":1038
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  }

  /* "cytimes/pydt.py":997
 *         return self.to_year(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_year(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_73to_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_72to_year, "Adjust the date to the specified month and day in the year (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The year offset (+/-).\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>` Month number (1=Jan...12=Dec).\n            - `<'str'>` Month name (case-insensitive), e.g., 'Jan', 'februar', '\344\270\211\346\234\210'.\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_year(-2, \"Feb\", 31)  # The last day of February, two years ago\n        >>> dt.to_year(2, 11)          # The same day of November, two years later\n        >>> dt.to_year(2, day=1)       # The 1st day of the current month, two years later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_73to_year = {"to_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_73to_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_72to_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_73to_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_offset;
  PyObject *__pyx_v_month = 0;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 997, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_year", 0) < (0)) __PYX_ERR(0, 997, __pyx_L3_error)

      /* "cytimes/pydt.py":1001
 *         self,
 *         offset: cython.int,
 *         month: int | str | None = None,             # <<<<<<<<<<<<<<
 *         day: cython.int = -1,
 *     ) -> _Pydt:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_year", 0, 1, 3, i); __PYX_ERR(0, 997, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 997, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 997, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_offset = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L3_error)
    __pyx_v_month = values[1];
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1002, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_year", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 997, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_72to_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_offset, __pyx_v_month, __pyx_v_day);

  /* "cytimes/pydt.py":997
 *         return self.to_year(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_year(
 *         self,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_72to_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_year(__pyx_v_self, __pyx_v_offset, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __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("cytimes.pydt._Pydt.to_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1055
 * 
 *     # . quarter
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_quarter(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_75to_curr_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter *__pyx_optional_args) {
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_curr_mm;
  int __pyx_v_mm;
  int __pyx_v_yy;
  int __pyx_v_dd;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  long __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_18;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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_curr_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_curr_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_75to_curr_quarter)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1055, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1075
 *         """
 *         # Fast-path: no adjustment
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit
 * 
*/
  __pyx_t_8 = (__pyx_v_month < 1);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1076
 *         # Fast-path: no adjustment
 *         if month < 1:
 *             return self.to_curr_month(day)  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Compute new month
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1075
 *         """
 *         # Fast-path: no adjustment
 *         if month < 1:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1079
 * 
 *         # Compute new month
 *         curr_mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *         mm: cython.int = utils.quarter_of_month(curr_mm) * 3 + (min(month, 3) - 3)
 *         if mm == curr_mm:
*/
  __pyx_v_curr_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1080
 *         # Compute new month
 *         curr_mm: cython.int = self.access_month()
 *         mm: cython.int = utils.quarter_of_month(curr_mm) * 3 + (min(month, 3) - 3)             # <<<<<<<<<<<<<<
 *         if mm == curr_mm:
 *             return self.to_curr_month(day)  # exit: same month
*/
  __pyx_t_10 = 3;
  __pyx_t_11 = __pyx_v_month;
  __pyx_t_8 = (__pyx_t_10 < __pyx_t_11);
  if (__pyx_t_8) {
    __pyx_t_12 = __pyx_t_10;
  } else {
    __pyx_t_12 = __pyx_t_11;
  }
  __pyx_v_mm = ((__pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_curr_mm) * 3) + (__pyx_t_12 - 3));

  /* "cytimes/pydt.py":1081
 *         curr_mm: cython.int = self.access_month()
 *         mm: cython.int = utils.quarter_of_month(curr_mm) * 3 + (min(month, 3) - 3)
 *         if mm == curr_mm:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()
*/
  __pyx_t_8 = (__pyx_v_mm == __pyx_v_curr_mm);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1082
 *         mm: cython.int = utils.quarter_of_month(curr_mm) * 3 + (min(month, 3) - 3)
 *         if mm == curr_mm:
 *             return self.to_curr_month(day)  # exit: same month             # <<<<<<<<<<<<<<
 *         yy: cython.int = self.access_year()
 * 
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1081
 *         curr_mm: cython.int = self.access_month()
 *         mm: cython.int = utils.quarter_of_month(curr_mm) * 3 + (min(month, 3) - 3)
 *         if mm == curr_mm:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()
*/
  }

  /* "cytimes/pydt.py":1083
 *         if mm == curr_mm:
 *             return self.to_curr_month(day)  # exit: same month
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 * 
 *         # Clamp to max days
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1086
 * 
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day             # <<<<<<<<<<<<<<
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))
*/
  __pyx_t_8 = (__pyx_v_day < 1);
  if (__pyx_t_8) {
    __pyx_t_11 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  } else {
    __pyx_t_11 = __pyx_v_day;
  }
  __pyx_v_dd = __pyx_t_11;

  /* "cytimes/pydt.py":1087
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  __pyx_t_8 = (__pyx_v_dd > 28);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1088
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_11 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_13 = __pyx_v_dd;
    __pyx_t_8 = (__pyx_t_11 < __pyx_t_13);
    if (__pyx_t_8) {
      __pyx_t_14 = __pyx_t_11;
    } else {
      __pyx_t_14 = __pyx_t_13;
    }
    __pyx_v_dd = __pyx_t_14;

    /* "cytimes/pydt.py":1087
 *         # Clamp to max days
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/pydt.py":1091
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    /*try:*/ {

      /* "cytimes/pydt.py":1092
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1100
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1102
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":1092
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_18.__pyx_n = 10;
      __pyx_t_18.year = __pyx_v_yy;
      __pyx_t_18.month = __pyx_v_mm;
      __pyx_t_18.day = __pyx_v_dd;
      __pyx_t_18.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_18.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_18.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_18.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_18.tzinfo = __pyx_t_1;
      __pyx_t_18.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_18.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_18)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1092, __pyx_L6_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;

      /* "cytimes/pydt.py":1091
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __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_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;

    /* "cytimes/pydt.py":1104
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)
 * 
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1104, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":1105
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_6 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1105, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_19.__pyx_n = 4;
        __pyx_t_19.cls = __pyx_t_6;
        __pyx_t_19.input_msg = __pyx_mstate_global->__pyx_kp_u_to_curr_quarter_2;
        __pyx_t_19.error_msg = ((PyObject*)Py_None);
        __pyx_t_19.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_19); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "cytimes/pydt.py":1104
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L18;
        }
        __pyx_L17_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_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __pyx_t_14 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __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_14; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_20;
          goto __pyx_L8_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cytimes/pydt.py":1091
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
  }

  /* "cytimes/pydt.py":1055
 * 
 *     # . quarter
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_quarter(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_75to_curr_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_74to_curr_quarter, "Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current quarter.\n\n        ## Example\n        >>> dt.to_curr_quarter(month=1, day=31) # The last day of the 1st quarter month in the current quarter\n        >>> dt.to_curr_quarter(month=2)         # The same day of the 2nd quarter month in the current quarter\n        >>> dt.to_curr_quarter(day=1)           # The 1st day of the current month-of-quarter in the current quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_75to_curr_quarter = {"to_curr_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_75to_curr_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_74to_curr_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_75to_curr_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1055, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_quarter", 0) < (0)) __PYX_ERR(0, 1055, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1055, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1058, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1059, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_quarter", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1055, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_74to_curr_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_74to_curr_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_curr_quarter(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __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("cytimes.pydt._Pydt.to_curr_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1107
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_quarter(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_77to_prev_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter *__pyx_optional_args) {
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_prev_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_77to_prev_quarter)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1107, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1126
 *         >>> dt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter
 *         """
 *         return self.to_quarter(-1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.month = __pyx_v_month;
  __pyx_t_8.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_quarter(__pyx_v_self, -1, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1107
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_quarter(
 *         self,
*/

  /* 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("cytimes.pydt._Pydt.to_prev_quarter", __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_7cytimes_4pydt_5_Pydt_77to_prev_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_76to_prev_quarter, "Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous quarter.\n\n        ## Example\n        >>> dt.to_prev_quarter(month=1, day=31) # The last day of the 1st quarter month in the previous quarter\n        >>> dt.to_prev_quarter(month=2)         # The same day of the 2nd quarter month in the previous quarter\n        >>> dt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_77to_prev_quarter = {"to_prev_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_77to_prev_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_76to_prev_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_77to_prev_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1107, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_quarter", 0) < (0)) __PYX_ERR(0, 1107, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1107, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_quarter", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1107, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_prev_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_76to_prev_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_76to_prev_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_prev_quarter(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __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("cytimes.pydt._Pydt.to_prev_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1128
 *         return self.to_quarter(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_quarter(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_79to_next_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter *__pyx_optional_args) {
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_next_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_79to_next_quarter)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1128, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1147
 *         >>> dt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter
 *         """
 *         return self.to_quarter(1, month, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.month = __pyx_v_month;
  __pyx_t_8.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_quarter(__pyx_v_self, 1, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1128
 *         return self.to_quarter(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_quarter(
 *         self,
*/

  /* 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("cytimes.pydt._Pydt.to_next_quarter", __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_7cytimes_4pydt_5_Pydt_79to_next_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_78to_next_quarter, "Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next quarter.\n\n        ## Example\n        >>> dt.to_next_quarter(month=1, day=31) # The last day of the 1st quarter month in the next quarter\n        >>> dt.to_next_quarter(month=2)         # The same day of the 2nd quarter month in the next quarter\n        >>> dt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_79to_next_quarter = {"to_next_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_79to_next_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_78to_next_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_79to_next_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1128, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_quarter", 0) < (0)) __PYX_ERR(0, 1128, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1128, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1132, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_quarter", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1128, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_next_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_78to_next_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_78to_next_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_next_quarter(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __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("cytimes.pydt._Pydt.to_next_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1149
 *         return self.to_quarter(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_quarter(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_81to_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter *__pyx_optional_args) {
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_m0;
  int __pyx_v_dd;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter __pyx_t_10;
  long __pyx_t_11;
  int __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_19;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_20;
  char const *__pyx_t_21;
  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;
  PyObject *__pyx_t_27 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_quarter", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_month = __pyx_optional_args->month;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_day = __pyx_optional_args->day;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_81to_quarter)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1149, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1171
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_quarter(month, day)  # exit
 * 
*/
  __pyx_t_9 = (__pyx_v_offset == 0);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":1172
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_quarter(month, day)  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Compute new year & month & day
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.month = __pyx_v_month;
    __pyx_t_10.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_quarter(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1171
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_quarter(month, day)  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1175
 * 
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 *         mm: cython.int = self.access_month()
 *         if month >= 1:
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1176
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *         if month >= 1:
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)
*/
  __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1177
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         if month >= 1:             # <<<<<<<<<<<<<<
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)
 *         m0: cython.int = mm + offset * 3
*/
  __pyx_t_9 = (__pyx_v_month >= 1);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":1178
 *         mm: cython.int = self.access_month()
 *         if month >= 1:
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)             # <<<<<<<<<<<<<<
 *         m0: cython.int = mm + offset * 3
 *         yy = yy + (m0 - 1) // 12
*/
    __pyx_t_11 = 3;
    __pyx_t_12 = __pyx_v_month;
    __pyx_t_9 = (__pyx_t_11 < __pyx_t_12);
    if (__pyx_t_9) {
      __pyx_t_13 = __pyx_t_11;
    } else {
      __pyx_t_13 = __pyx_t_12;
    }
    __pyx_v_mm = ((__pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_mm) * 3) + (__pyx_t_13 - 3));

    /* "cytimes/pydt.py":1177
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         if month >= 1:             # <<<<<<<<<<<<<<
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)
 *         m0: cython.int = mm + offset * 3
*/
  }

  /* "cytimes/pydt.py":1179
 *         if month >= 1:
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)
 *         m0: cython.int = mm + offset * 3             # <<<<<<<<<<<<<<
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1
*/
  __pyx_v_m0 = (__pyx_v_mm + (__pyx_v_offset * 3));

  /* "cytimes/pydt.py":1180
 *             mm = utils.quarter_of_month(mm) * 3 + (min(month, 3) - 3)
 *         m0: cython.int = mm + offset * 3
 *         yy = yy + (m0 - 1) // 12             # <<<<<<<<<<<<<<
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
*/
  __pyx_v_yy = (__pyx_v_yy + __Pyx_div_long((__pyx_v_m0 - 1), 12, 1));

  /* "cytimes/pydt.py":1181
 *         m0: cython.int = mm + offset * 3
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1             # <<<<<<<<<<<<<<
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
*/
  __pyx_v_mm = (__Pyx_mod_long((__pyx_v_m0 - 1), 12, 1) + 1);

  /* "cytimes/pydt.py":1182
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day             # <<<<<<<<<<<<<<
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))
*/
  __pyx_t_9 = (__pyx_v_day < 1);
  if (__pyx_t_9) {
    __pyx_t_12 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  } else {
    __pyx_t_12 = __pyx_v_day;
  }
  __pyx_v_dd = __pyx_t_12;

  /* "cytimes/pydt.py":1183
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  __pyx_t_9 = (__pyx_v_dd > 28);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":1184
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_12 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_14 = __pyx_v_dd;
    __pyx_t_9 = (__pyx_t_12 < __pyx_t_14);
    if (__pyx_t_9) {
      __pyx_t_15 = __pyx_t_12;
    } else {
      __pyx_t_15 = __pyx_t_14;
    }
    __pyx_v_dd = __pyx_t_15;

    /* "cytimes/pydt.py":1183
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/pydt.py":1187
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_18);
    /*try:*/ {

      /* "cytimes/pydt.py":1188
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1196
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1198
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":1188
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_19.__pyx_n = 10;
      __pyx_t_19.year = __pyx_v_yy;
      __pyx_t_19.month = __pyx_v_mm;
      __pyx_t_19.day = __pyx_v_dd;
      __pyx_t_19.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_19.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_19.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_19.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_19.tzinfo = __pyx_t_1;
      __pyx_t_19.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_19.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_19)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1188, __pyx_L6_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;

      /* "cytimes/pydt.py":1187
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __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_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;

    /* "cytimes/pydt.py":1200
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_quarter(...)", None, err)
 * 
*/
    __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_15) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1200, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":1201
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_quarter(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . month
*/
        __pyx_t_7 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_20.__pyx_n = 4;
        __pyx_t_20.cls = __pyx_t_7;
        __pyx_t_20.input_msg = __pyx_mstate_global->__pyx_kp_u_to_quarter_2;
        __pyx_t_20.error_msg = ((PyObject*)Py_None);
        __pyx_t_20.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_20); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }

      /* "cytimes/pydt.py":1200
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_quarter(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L18;
        }
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
          if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          __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_XGOTREF(__pyx_t_27);
          __pyx_t_15 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_21 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0;
          __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_21;
          goto __pyx_L8_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cytimes/pydt.py":1187
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  }

  /* "cytimes/pydt.py":1149
 *         return self.to_quarter(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_quarter(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_81to_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_80to_quarter, "Adjust the date to the specified month-of-quarter and day in the quarter (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The quarter offset (+/-).\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_quarter(-2, 1, 31)  # The last day of the 1st quarter month, two quarters ago\n        >>> dt.to_quarter(2, 2)       # The same day of the 2nd quarter month, two quarters later\n        >>> dt.to_quarter(2, day=1)   # The 1st day of the current month-of-quarter, two quarters later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_81to_quarter = {"to_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_81to_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_80to_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_81to_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_offset;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1149, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_quarter", 0) < (0)) __PYX_ERR(0, 1149, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_quarter", 0, 1, 3, i); __PYX_ERR(0, 1149, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1149, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1149, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_offset = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_quarter", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_80to_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_offset, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_80to_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_quarter(__pyx_v_self, __pyx_v_offset, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __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("cytimes.pydt._Pydt.to_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1204
 * 
 *     # . month
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the current month `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_83to_curr_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month *__pyx_optional_args) {
  int __pyx_v_day = ((int)-1);
  int __pyx_v_yy;
  int __pyx_v_mm;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_14;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_day = __pyx_optional_args->day;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_curr_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_83to_curr_month)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1204, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1217
 *         """
 *         # Fast-path: no adjustment
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_7 = (__pyx_v_day < 1);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":1218
 *         # Fast-path: no adjustment
 *         if day < 1:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Clamp to max days
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1217
 *         """
 *         # Fast-path: no adjustment
 *         if day < 1:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1221
 * 
 *         # Clamp to max days
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 *         mm: cython.int = self.access_month()
 *         if day > 28:
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1222
 *         # Clamp to max days
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *         if day > 28:
 *             day = min(day, utils.days_in_month(yy, mm))
*/
  __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1223
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         if day > 28:             # <<<<<<<<<<<<<<
 *             day = min(day, utils.days_in_month(yy, mm))
 *         if day == self.access_day():
*/
  __pyx_t_7 = (__pyx_v_day > 28);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":1224
 *         mm: cython.int = self.access_month()
 *         if day > 28:
 *             day = min(day, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 *         if day == self.access_day():
 *             return self  # exit: same day
*/
    __pyx_t_8 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_9 = __pyx_v_day;
    __pyx_t_7 = (__pyx_t_8 < __pyx_t_9);
    if (__pyx_t_7) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_day = __pyx_t_10;

    /* "cytimes/pydt.py":1223
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         if day > 28:             # <<<<<<<<<<<<<<
 *             day = min(day, utils.days_in_month(yy, mm))
 *         if day == self.access_day():
*/
  }

  /* "cytimes/pydt.py":1225
 *         if day > 28:
 *             day = min(day, utils.days_in_month(yy, mm))
 *         if day == self.access_day():             # <<<<<<<<<<<<<<
 *             return self  # exit: same day
 * 
*/
  __pyx_t_7 = (__pyx_v_day == ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":1226
 *             day = min(day, utils.days_in_month(yy, mm))
 *         if day == self.access_day():
 *             return self  # exit: same day             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1225
 *         if day > 28:
 *             day = min(day, utils.days_in_month(yy, mm))
 *         if day == self.access_day():             # <<<<<<<<<<<<<<
 *             return self  # exit: same day
 * 
*/
  }

  /* "cytimes/pydt.py":1229
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    /*try:*/ {

      /* "cytimes/pydt.py":1230
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1238
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1240
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":1230
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_14.__pyx_n = 10;
      __pyx_t_14.year = __pyx_v_yy;
      __pyx_t_14.month = __pyx_v_mm;
      __pyx_t_14.day = __pyx_v_day;
      __pyx_t_14.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_14.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_14.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_14.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_14.tzinfo = __pyx_t_1;
      __pyx_t_14.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_14.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1230, __pyx_L6_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;

      /* "cytimes/pydt.py":1229
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __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_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":1242
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)
 * 
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1242, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":1243
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_5 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1243, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15.__pyx_n = 4;
        __pyx_t_15.cls = __pyx_t_5;
        __pyx_t_15.input_msg = __pyx_mstate_global->__pyx_kp_u_to_curr_month_2;
        __pyx_t_15.error_msg = ((PyObject*)Py_None);
        __pyx_t_15.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cytimes/pydt.py":1242
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L18;
        }
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_10 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_16;
          goto __pyx_L8_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cytimes/pydt.py":1229
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
  }

  /* "cytimes/pydt.py":1204
 * 
 *     # . month
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the current month `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_83to_curr_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_82to_curr_month, "Adjust the date to the specified day of the current month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current month.\n\n        ## Example\n        >>> dt.to_curr_month(31)  # The last day of the current month\n        >>> dt.to_curr_month(1)   # The 1st day of the current month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_83to_curr_month = {"to_curr_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_83to_curr_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_82to_curr_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_83to_curr_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1204, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1204, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_month", 0) < (0)) __PYX_ERR(0, 1204, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1204, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_month", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1204, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_82to_curr_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_82to_curr_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_curr_month(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __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("cytimes.pydt._Pydt.to_curr_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1245
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the previous month `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_85to_prev_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month *__pyx_optional_args) {
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_day = __pyx_optional_args->day;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_prev_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_85to_prev_month)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1245, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1257
 *         >>> dt.to_prev_month(1)   # The 1st day of the previous month
 *         """
 *         return self.to_month(-1, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_month(__pyx_v_self, -1, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1245
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the previous month `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_prev_month", __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_7cytimes_4pydt_5_Pydt_85to_prev_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_84to_prev_month, "Adjust the date to the specified day of the previous month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous month.\n\n        ## Example\n        >>> dt.to_prev_month(31)  # The last day of the previous month\n        >>> dt.to_prev_month(1)   # The 1st day of the previous month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_85to_prev_month = {"to_prev_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_85to_prev_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_84to_prev_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_85to_prev_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1245, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1245, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_month", 0) < (0)) __PYX_ERR(0, 1245, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1245, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1246, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_month", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1245, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_prev_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_84to_prev_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_84to_prev_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_prev_month(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __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("cytimes.pydt._Pydt.to_prev_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1259
 *         return self.to_month(-1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the next month `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_87to_next_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month *__pyx_optional_args) {
  int __pyx_v_day = ((int)-1);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_day = __pyx_optional_args->day;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_next_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_87to_next_month)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1259, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1271
 *         >>> dt.to_next_month(1)   # The 1st day of the next month
 *         """
 *         return self.to_month(1, day)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_month(__pyx_v_self, 1, 0, &__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1259
 *         return self.to_month(-1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the next month `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_next_month", __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_7cytimes_4pydt_5_Pydt_87to_next_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_86to_next_month, "Adjust the date to the specified day of the next month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next month.\n\n        ## Example\n        >>> dt.to_next_month(31)  # The last day of the next month\n        >>> dt.to_next_month(1)   # The 1st day of the next month\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_87to_next_month = {"to_next_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_87to_next_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_86to_next_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_87to_next_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1259, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1259, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_month", 0) < (0)) __PYX_ERR(0, 1259, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1259, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_month", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1259, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_next_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_86to_next_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_86to_next_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_next_month(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __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("cytimes.pydt._Pydt.to_next_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1273
 *         return self.to_month(1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_89to_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month *__pyx_optional_args) {
  int __pyx_v_day = ((int)-1);
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_m0;
  int __pyx_v_dd;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_16;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_month", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_day = __pyx_optional_args->day;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_89to_month)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1273, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1287
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit
 * 
*/
  __pyx_t_8 = (__pyx_v_offset == 0);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1288
 *         # Fast-path: no offset
 *         if offset == 0:
 *             return self.to_curr_month(day)  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Compute new year & month & day
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.day = __pyx_v_day;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1287
 *         """
 *         # Fast-path: no offset
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self.to_curr_month(day)  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1291
 * 
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 *         mm: cython.int = self.access_month()
 *         m0: cython.int = mm + offset
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1292
 *         # Compute new year & month & day
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *         m0: cython.int = mm + offset
 *         yy = yy + (m0 - 1) // 12
*/
  __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

  /* "cytimes/pydt.py":1293
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         m0: cython.int = mm + offset             # <<<<<<<<<<<<<<
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1
*/
  __pyx_v_m0 = (__pyx_v_mm + __pyx_v_offset);

  /* "cytimes/pydt.py":1294
 *         mm: cython.int = self.access_month()
 *         m0: cython.int = mm + offset
 *         yy = yy + (m0 - 1) // 12             # <<<<<<<<<<<<<<
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
*/
  __pyx_v_yy = (__pyx_v_yy + __Pyx_div_long((__pyx_v_m0 - 1), 12, 1));

  /* "cytimes/pydt.py":1295
 *         m0: cython.int = mm + offset
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1             # <<<<<<<<<<<<<<
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
*/
  __pyx_v_mm = (__Pyx_mod_long((__pyx_v_m0 - 1), 12, 1) + 1);

  /* "cytimes/pydt.py":1296
 *         yy = yy + (m0 - 1) // 12
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day             # <<<<<<<<<<<<<<
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))
*/
  __pyx_t_8 = (__pyx_v_day < 1);
  if (__pyx_t_8) {
    __pyx_t_10 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  } else {
    __pyx_t_10 = __pyx_v_day;
  }
  __pyx_v_dd = __pyx_t_10;

  /* "cytimes/pydt.py":1297
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  __pyx_t_8 = (__pyx_v_dd > 28);
  if (__pyx_t_8) {

    /* "cytimes/pydt.py":1298
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:
 *             dd = min(dd, utils.days_in_month(yy, mm))             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_t_10 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_yy, __pyx_v_mm);
    __pyx_t_11 = __pyx_v_dd;
    __pyx_t_8 = (__pyx_t_10 < __pyx_t_11);
    if (__pyx_t_8) {
      __pyx_t_12 = __pyx_t_10;
    } else {
      __pyx_t_12 = __pyx_t_11;
    }
    __pyx_v_dd = __pyx_t_12;

    /* "cytimes/pydt.py":1297
 *         mm = ((m0 - 1) % 12) + 1
 *         dd: cython.int = self.access_day() if day < 1 else day
 *         if dd > 28:             # <<<<<<<<<<<<<<
 *             dd = min(dd, utils.days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/pydt.py":1301
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "cytimes/pydt.py":1302
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1310
 *                 self.access_second(),
 *                 self.access_microsecond(),
 *                 self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *                 self.access_fold(),
 *                 self._cls(),
*/
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1312
 *                 self.access_tzinfo(),
 *                 self.access_fold(),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":1302
 *         # New instance
 *         try:
 *             return utils.dt_new(             # <<<<<<<<<<<<<<
 *                 yy,
 *                 mm,
*/
      __pyx_t_16.__pyx_n = 10;
      __pyx_t_16.year = __pyx_v_yy;
      __pyx_t_16.month = __pyx_v_mm;
      __pyx_t_16.day = __pyx_v_dd;
      __pyx_t_16.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
      __pyx_t_16.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
      __pyx_t_16.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
      __pyx_t_16.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
      __pyx_t_16.tzinfo = __pyx_t_1;
      __pyx_t_16.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
      __pyx_t_16.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1302, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1302, __pyx_L5_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L9_try_return;

      /* "cytimes/pydt.py":1301
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    }
    __pyx_L5_error:;
    __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;
    __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;

    /* "cytimes/pydt.py":1314
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_month(...)", None, err)
 * 
*/
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1314, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":1315
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_month(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . weekday
*/
        __pyx_t_6 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1315, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17.__pyx_n = 4;
        __pyx_t_17.cls = __pyx_t_6;
        __pyx_t_17.input_msg = __pyx_mstate_global->__pyx_kp_u_to_month_2;
        __pyx_t_17.error_msg = ((PyObject*)Py_None);
        __pyx_t_17.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_17); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1315, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "cytimes/pydt.py":1314
 *                 self._cls(),
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_month(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L17;
        }
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_12 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_18;
          goto __pyx_L7_except_error;
        }
        __pyx_L17:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;

    /* "cytimes/pydt.py":1301
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_new(
 *                 yy,
*/
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  }

  /* "cytimes/pydt.py":1273
 *         return self.to_month(1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_89to_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_88to_month, "Adjust the date to the specified day of the month (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The month offset (+/-).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_month(-2, 31)  # The last day of the month, two months ago\n        >>> dt.to_month(2, 1)    # The 1st day of the month, two months later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_89to_month = {"to_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_89to_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_88to_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_89to_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_offset;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1273, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_month", 0) < (0)) __PYX_ERR(0, 1273, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_month", 0, 1, 2, i); __PYX_ERR(0, 1273, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1273, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1273, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_offset = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_month", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1273, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_88to_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_offset, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_88to_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_month(__pyx_v_self, __pyx_v_offset, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __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("cytimes.pydt._Pydt.to_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1318
 * 
 *     # . weekday
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_monday(self) -> _Pydt:
 *         """Adjust the date to the `Monday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_91to_monday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_monday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_monday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_monday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_91to_monday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1318, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1321
 *     def to_monday(self) -> _Pydt:
 *         """Adjust the date to the `Monday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(0)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1318
 * 
 *     # . weekday
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_monday(self) -> _Pydt:
 *         """Adjust the date to the `Monday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_monday", __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_7cytimes_4pydt_5_Pydt_91to_monday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_90to_monday, "Adjust the date to the `Monday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_91to_monday = {"to_monday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_91to_monday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_90to_monday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_91to_monday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_monday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_monday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_monday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_90to_monday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_90to_monday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_monday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_monday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __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("cytimes.pydt._Pydt.to_monday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1323
 *         return self._to_curr_weekday(0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tuesday(self) -> _Pydt:
 *         """Adjust the date to the `Tuesday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_93to_tuesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_tuesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_tuesday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_tuesday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_93to_tuesday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1323, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1326
 *     def to_tuesday(self) -> _Pydt:
 *         """Adjust the date to the `Tuesday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(1)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1323
 *         return self._to_curr_weekday(0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tuesday(self) -> _Pydt:
 *         """Adjust the date to the `Tuesday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_tuesday", __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_7cytimes_4pydt_5_Pydt_93to_tuesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_92to_tuesday, "Adjust the date to the `Tuesday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_93to_tuesday = {"to_tuesday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_93to_tuesday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_92to_tuesday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_93to_tuesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_tuesday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tuesday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tuesday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_92to_tuesday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_92to_tuesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_tuesday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_tuesday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __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("cytimes.pydt._Pydt.to_tuesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1328
 *         return self._to_curr_weekday(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_wednesday(self) -> _Pydt:
 *         """Adjust the date to the `Wednesday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_95to_wednesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_wednesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_wednesday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_wednesday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_95to_wednesday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1328, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1331
 *     def to_wednesday(self) -> _Pydt:
 *         """Adjust the date to the `Wednesday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(2)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1328
 *         return self._to_curr_weekday(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_wednesday(self) -> _Pydt:
 *         """Adjust the date to the `Wednesday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_wednesday", __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_7cytimes_4pydt_5_Pydt_95to_wednesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_94to_wednesday, "Adjust the date to the `Wednesday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_95to_wednesday = {"to_wednesday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_95to_wednesday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_94to_wednesday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_95to_wednesday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_wednesday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_wednesday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_wednesday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_94to_wednesday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_94to_wednesday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_wednesday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_wednesday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __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("cytimes.pydt._Pydt.to_wednesday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1333
 *         return self._to_curr_weekday(2)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_thursday(self) -> _Pydt:
 *         """Adjust the date to the `Thursday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_97to_thursday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_thursday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_thursday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_thursday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_97to_thursday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1333, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1336
 *     def to_thursday(self) -> _Pydt:
 *         """Adjust the date to the `Thursday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(3)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1333
 *         return self._to_curr_weekday(2)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_thursday(self) -> _Pydt:
 *         """Adjust the date to the `Thursday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_thursday", __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_7cytimes_4pydt_5_Pydt_97to_thursday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_96to_thursday, "Adjust the date to the `Thursday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_97to_thursday = {"to_thursday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_97to_thursday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_96to_thursday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_97to_thursday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_thursday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_thursday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_thursday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_96to_thursday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_96to_thursday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_thursday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_thursday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __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("cytimes.pydt._Pydt.to_thursday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1338
 *         return self._to_curr_weekday(3)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_friday(self) -> _Pydt:
 *         """Adjust the date to the `Friday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_99to_friday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_friday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_friday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_friday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_99to_friday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1338, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1341
 *     def to_friday(self) -> _Pydt:
 *         """Adjust the date to the `Friday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(4)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1338
 *         return self._to_curr_weekday(3)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_friday(self) -> _Pydt:
 *         """Adjust the date to the `Friday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_friday", __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_7cytimes_4pydt_5_Pydt_99to_friday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_98to_friday, "Adjust the date to the `Friday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_99to_friday = {"to_friday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_99to_friday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_98to_friday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_99to_friday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_friday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_friday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_friday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_98to_friday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_98to_friday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_friday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_friday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __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("cytimes.pydt._Pydt.to_friday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1343
 *         return self._to_curr_weekday(4)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_saturday(self) -> _Pydt:
 *         """Adjust the date to the `Saturday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_101to_saturday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_saturday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_saturday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_saturday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_101to_saturday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1343, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1346
 *     def to_saturday(self) -> _Pydt:
 *         """Adjust the date to the `Saturday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(5)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1343
 *         return self._to_curr_weekday(4)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_saturday(self) -> _Pydt:
 *         """Adjust the date to the `Saturday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_saturday", __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_7cytimes_4pydt_5_Pydt_101to_saturday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_100to_saturday, "Adjust the date to the `Saturday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_101to_saturday = {"to_saturday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_101to_saturday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_100to_saturday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_101to_saturday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_saturday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_saturday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_saturday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_100to_saturday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_100to_saturday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_saturday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_saturday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __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("cytimes.pydt._Pydt.to_saturday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1348
 *         return self._to_curr_weekday(5)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_sunday(self) -> _Pydt:
 *         """Adjust the date to the `Sunday` of the current week `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_103to_sunday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_sunday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_sunday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_sunday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_103to_sunday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1348, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1351
 *     def to_sunday(self) -> _Pydt:
 *         """Adjust the date to the `Sunday` of the current week `<'Pydt'>`."""
 *         return self._to_curr_weekday(6)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1348
 *         return self._to_curr_weekday(5)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_sunday(self) -> _Pydt:
 *         """Adjust the date to the `Sunday` of the current week `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_sunday", __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_7cytimes_4pydt_5_Pydt_103to_sunday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_102to_sunday, "Adjust the date to the `Sunday` of the current week `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_103to_sunday = {"to_sunday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_103to_sunday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_102to_sunday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_103to_sunday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_sunday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_sunday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_sunday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_102to_sunday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_102to_sunday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_sunday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_sunday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __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("cytimes.pydt._Pydt.to_sunday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1353
 *         return self._to_curr_weekday(6)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_105to_curr_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday *__pyx_optional_args) {

  /* "cytimes/pydt.py":1354
 * 
 *     @cython.ccall
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
 * 
*/
  PyObject *__pyx_v_weekday = ((PyObject *)Py_None);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_weekday = __pyx_optional_args->weekday;
    }
  }

  /* "cytimes/pydt.py":1353
 *         return self._to_curr_weekday(6)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_curr_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_105to_curr_weekday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_weekday};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1353, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1369
 *         >>> dt.to_curr_weekday("Tue")  # The Tuesday of the current week
 *         """
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_7.raise_error = 1;
  __pyx_t_6 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_7); if (unlikely(__pyx_t_6 == ((int)-2))) __PYX_ERR(0, 1369, __pyx_L1_error)
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, __pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1353
 *         return self._to_curr_weekday(6)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_curr_weekday", __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_7cytimes_4pydt_5_Pydt_105to_curr_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_104to_curr_weekday, "Adjust the date to the specific weekday of the current week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the current week.\n\n        ## Example\n        >>> dt.to_curr_weekday(0)      # The Monday of the current week\n        >>> dt.to_curr_weekday(\"Tue\")  # The Tuesday of the current week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_105to_curr_weekday = {"to_curr_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_105to_curr_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_104to_curr_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_105to_curr_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_curr_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1353, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1353, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_curr_weekday", 0) < (0)) __PYX_ERR(0, 1353, __pyx_L3_error)

      /* "cytimes/pydt.py":1354
 * 
 *     @cython.ccall
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1353, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_weekday = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_curr_weekday", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1353, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_104to_curr_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_weekday);

  /* "cytimes/pydt.py":1353
 *         return self._to_curr_weekday(6)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_104to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_curr_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_curr_weekday(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __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("cytimes.pydt._Pydt.to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1371
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_107to_prev_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday *__pyx_optional_args) {

  /* "cytimes/pydt.py":1372
 * 
 *     @cython.ccall
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
 * 
*/
  PyObject *__pyx_v_weekday = ((PyObject *)Py_None);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_weekday = __pyx_optional_args->weekday;
    }
  }

  /* "cytimes/pydt.py":1371
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_prev_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_107to_prev_weekday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_weekday};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1371, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1387
 *         >>> dt.to_prev_weekday("Tue")  # The Tuesday of the previous week
 *         """
 *         return self.to_weekday(-1, weekday)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_weekday(__pyx_v_self, -1, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1371
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_prev_weekday", __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_7cytimes_4pydt_5_Pydt_107to_prev_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_106to_prev_weekday, "Adjust the date to the specific weekday of the previous week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the previous week.\n\n        ## Example\n        >>> dt.to_prev_weekday(0)      # The Monday of the previous week\n        >>> dt.to_prev_weekday(\"Tue\")  # The Tuesday of the previous week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_107to_prev_weekday = {"to_prev_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_107to_prev_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_106to_prev_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_107to_prev_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_prev_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1371, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1371, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_prev_weekday", 0) < (0)) __PYX_ERR(0, 1371, __pyx_L3_error)

      /* "cytimes/pydt.py":1372
 * 
 *     @cython.ccall
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1371, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_weekday = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_prev_weekday", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1371, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_prev_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_106to_prev_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_weekday);

  /* "cytimes/pydt.py":1371
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_106to_prev_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_prev_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_prev_weekday(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __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("cytimes.pydt._Pydt.to_prev_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1389
 *         return self.to_weekday(-1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_109to_next_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_next_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday *__pyx_optional_args) {

  /* "cytimes/pydt.py":1390
 * 
 *     @cython.ccall
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
 * 
*/
  PyObject *__pyx_v_weekday = ((PyObject *)Py_None);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_weekday = __pyx_optional_args->weekday;
    }
  }

  /* "cytimes/pydt.py":1389
 *         return self.to_weekday(-1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_next_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_109to_next_weekday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_weekday};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1389, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1405
 *         >>> dt.to_next_weekday("Tue")  # The Tuesday of the next week
 *         """
 *         return self.to_weekday(1, weekday)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_weekday(__pyx_v_self, 1, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1389
 *         return self.to_weekday(-1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_next_weekday", __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_7cytimes_4pydt_5_Pydt_109to_next_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_108to_next_weekday, "Adjust the date to the specific weekday of the next week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the next week.\n\n        ## Example\n        >>> dt.to_next_weekday(0)      # The Monday of the next week\n        >>> dt.to_next_weekday(\"Tue\")  # The Tuesday of the next week\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_109to_next_weekday = {"to_next_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_109to_next_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_108to_next_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_109to_next_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_next_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1389, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1389, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_next_weekday", 0) < (0)) __PYX_ERR(0, 1389, __pyx_L3_error)

      /* "cytimes/pydt.py":1390
 * 
 *     @cython.ccall
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1389, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_weekday = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_next_weekday", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1389, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_next_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_108to_next_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_weekday);

  /* "cytimes/pydt.py":1389
 *         return self.to_weekday(-1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_108to_next_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_next_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_next_weekday(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __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("cytimes.pydt._Pydt.to_next_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1407
 *         return self.to_weekday(1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_111to_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday *__pyx_optional_args) {

  /* "cytimes/pydt.py":1408
 * 
 *     @cython.ccall
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
 * 
*/
  PyObject *__pyx_v_weekday = ((PyObject *)Py_None);
  int __pyx_v_wkd;
  int __pyx_v_days;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_weekday", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_weekday = __pyx_optional_args->weekday;
    }
  }

  /* "cytimes/pydt.py":1407
 *         return self.to_weekday(1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_111to_weekday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_v_weekday};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1407, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1426
 *         """
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)             # <<<<<<<<<<<<<<
 *         if offset == 0:
 *             return self._to_curr_weekday(wkd)  # exit
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 1;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 1426, __pyx_L1_error)
  __pyx_v_wkd = __pyx_t_7;

  /* "cytimes/pydt.py":1427
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self._to_curr_weekday(wkd)  # exit
 * 
*/
  __pyx_t_9 = (__pyx_v_offset == 0);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":1428
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:
 *             return self._to_curr_weekday(wkd)  # exit             # <<<<<<<<<<<<<<
 * 
 *         # Compute new weekday
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, __pyx_v_wkd)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1427
 *         # Fast-path: no offset
 *         wkd: cython.int = _parse_weekday(weekday, None, True)
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self._to_curr_weekday(wkd)  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1431
 * 
 *         # Compute new weekday
 *         days: cython.int = offset * 7             # <<<<<<<<<<<<<<
 *         if wkd != -1:
 *             days += wkd - self.access_weekday()
*/
  __pyx_v_days = (__pyx_v_offset * 7);

  /* "cytimes/pydt.py":1432
 *         # Compute new weekday
 *         days: cython.int = offset * 7
 *         if wkd != -1:             # <<<<<<<<<<<<<<
 *             days += wkd - self.access_weekday()
 * 
*/
  __pyx_t_9 = (__pyx_v_wkd != -1L);
  if (__pyx_t_9) {

    /* "cytimes/pydt.py":1433
 *         days: cython.int = offset * 7
 *         if wkd != -1:
 *             days += wkd - self.access_weekday()             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __pyx_v_days = (__pyx_v_days + (__pyx_v_wkd - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0)));

    /* "cytimes/pydt.py":1432
 *         # Compute new weekday
 *         days: cython.int = offset * 7
 *         if wkd != -1:             # <<<<<<<<<<<<<<
 *             days += wkd - self.access_weekday()
 * 
*/
  }

  /* "cytimes/pydt.py":1436
 * 
 *         # New instance
 *         return self.to_day(days)             # <<<<<<<<<<<<<<
 * 
 *     @cython.cfunc
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_day(__pyx_v_self, __pyx_v_days, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1407
 *         return self.to_weekday(1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.to_weekday", __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_7cytimes_4pydt_5_Pydt_111to_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_110to_weekday, "Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The week offset (+/-).\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_weekday(-2, 0)     # The Monday of the week, two weeks ago\n        >>> dt.to_weekday(2, \"Tue\")  # The Tuesday of the week, two weeks later\n        >>> dt.to_weekday(2)         # The same weekday of the week, two weeks later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_111to_weekday = {"to_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_111to_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_110to_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_111to_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_offset;
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1407, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1407, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1407, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_weekday", 0) < (0)) __PYX_ERR(0, 1407, __pyx_L3_error)

      /* "cytimes/pydt.py":1408
 * 
 *     @cython.ccall
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
 * 
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_weekday", 0, 1, 2, i); __PYX_ERR(0, 1407, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1407, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1407, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_offset = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1408, __pyx_L3_error)
    __pyx_v_weekday = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_weekday", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1407, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_110to_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_offset, __pyx_v_weekday);

  /* "cytimes/pydt.py":1407
 *         return self.to_weekday(1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_110to_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, PyObject *__pyx_v_weekday) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.weekday = __pyx_v_weekday;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_weekday(__pyx_v_self, __pyx_v_offset, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __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("cytimes.pydt._Pydt.to_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1438
 *         return self.to_day(days)
 * 
 *     @cython.cfunc             # <<<<<<<<<<<<<<
 *     @cython.inline(True)
 *     def _to_curr_weekday(self, weekday: cython.int) -> _Pydt:
*/

static CYTHON_INLINE struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_weekday) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_curr_weekday", 0);

  /* "cytimes/pydt.py":1448
 *         """
 *         # Fast-path: no adjustment
 *         if weekday < 0:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_1 = (__pyx_v_weekday < 0);
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":1449
 *         # Fast-path: no adjustment
 *         if weekday < 0:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1448
 *         """
 *         # Fast-path: no adjustment
 *         if weekday < 0:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1452
 * 
 *         # New instance
 *         return self.to_day(min(weekday, 6) - self.access_weekday())             # <<<<<<<<<<<<<<
 * 
 *     # . day
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_2 = 6;
  __pyx_t_3 = __pyx_v_weekday;
  __pyx_t_1 = (__pyx_t_2 < __pyx_t_3);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_day(__pyx_v_self, (__pyx_t_4 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0)), 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1438
 *         return self.to_day(days)
 * 
 *     @cython.cfunc             # <<<<<<<<<<<<<<
 *     @cython.inline(True)
 *     def _to_curr_weekday(self, weekday: cython.int) -> _Pydt:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.pydt._Pydt._to_curr_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1455
 * 
 *     # . day
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_yesterday(self) -> _Pydt:
 *         """Adjust the date to `Yesterday` `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_113to_yesterday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_yesterday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_yesterday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_yesterday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_113to_yesterday)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1455, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1458
 *     def to_yesterday(self) -> _Pydt:
 *         """Adjust the date to `Yesterday` `<'Pydt'>`."""
 *         return self.to_day(-1)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_day(__pyx_v_self, -1, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1455
 * 
 *     # . day
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_yesterday(self) -> _Pydt:
 *         """Adjust the date to `Yesterday` `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_yesterday", __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_7cytimes_4pydt_5_Pydt_113to_yesterday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_112to_yesterday, "Adjust the date to `Yesterday` `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_113to_yesterday = {"to_yesterday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_113to_yesterday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_112to_yesterday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_113to_yesterday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_yesterday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_yesterday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_yesterday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_112to_yesterday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_112to_yesterday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_yesterday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_yesterday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __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("cytimes.pydt._Pydt.to_yesterday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1460
 *         return self.to_day(-1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tomorrow(self) -> _Pydt:
 *         """Adjust the date to `Tomorrow` `<'Pydt'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_115to_tomorrow(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_tomorrow(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_tomorrow", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_tomorrow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_115to_tomorrow)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1460, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1463
 *     def to_tomorrow(self) -> _Pydt:
 *         """Adjust the date to `Tomorrow` `<'Pydt'>`."""
 *         return self.to_day(1)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_day(__pyx_v_self, 1, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1460
 *         return self.to_day(-1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tomorrow(self) -> _Pydt:
 *         """Adjust the date to `Tomorrow` `<'Pydt'>`."""
*/

  /* 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("cytimes.pydt._Pydt.to_tomorrow", __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_7cytimes_4pydt_5_Pydt_115to_tomorrow(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_114to_tomorrow, "Adjust the date to `Tomorrow` `<'Pydt'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_115to_tomorrow = {"to_tomorrow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_115to_tomorrow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_114to_tomorrow};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_115to_tomorrow(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_tomorrow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_tomorrow", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_tomorrow", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_114to_tomorrow(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_114to_tomorrow(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("to_tomorrow", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_tomorrow(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __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("cytimes.pydt._Pydt.to_tomorrow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1465
 *         return self.to_day(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_day(self, offset: cython.int) -> _Pydt:
 *         """Adjust the date to day (+/-) offset `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_117to_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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("to_day", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_117to_day)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1465, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1477
 *         """
 *         # Fast-path: no adjustment
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  __pyx_t_7 = (__pyx_v_offset == 0);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":1478
 *         # Fast-path: no adjustment
 *         if offset == 0:
 *             return self  # exit             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1477
 *         """
 *         # Fast-path: no adjustment
 *         if offset == 0:             # <<<<<<<<<<<<<<
 *             return self  # exit
 * 
*/
  }

  /* "cytimes/pydt.py":1481
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":1482
 *         # New instance
 *         try:
 *             return utils.dt_add(self, offset, 0, 0, self._cls())             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_day(...)", None, err)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11.__pyx_n = 4;
      __pyx_t_11.days = __pyx_v_offset;
      __pyx_t_11.seconds = 0;
      __pyx_t_11.microseconds = 0;
      __pyx_t_11.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1482, __pyx_L4_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/pydt.py":1481
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:
*/
    }
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":1483
 *         try:
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_day(...)", None, err)
 * 
*/
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1483, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":1484
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_day(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . date&time
*/
        __pyx_t_5 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1484, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13.__pyx_n = 4;
        __pyx_t_13.cls = __pyx_t_5;
        __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_to_day_2;
        __pyx_t_13.error_msg = ((PyObject*)Py_None);
        __pyx_t_13.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1484, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cytimes/pydt.py":1483
 *         try:
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_day(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L16;
        }
        __pyx_L15_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_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_12 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __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_12; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L6_except_error;
        }
        __pyx_L16:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/pydt.py":1481
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_add(self, offset, 0, 0, self._cls())
 *         except Exception as err:
*/
    __pyx_L6_except_error:;
    __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_L8_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_L5_exception_handled:;
    __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);
  }

  /* "cytimes/pydt.py":1465
 *         return self.to_day(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_day(self, offset: cython.int) -> _Pydt:
 *         """Adjust the date to day (+/-) offset `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_117to_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_116to_day, "Adjust the date to day (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The day offset (+/-).\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_day(-10)  # 10 days ago\n        >>> dt.to_day(10)   # 10 days later\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_117to_day = {"to_day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_117to_day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_116to_day};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_117to_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_offset;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_offset,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1465, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1465, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_day", 0) < (0)) __PYX_ERR(0, 1465, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_day", 1, 1, 1, i); __PYX_ERR(0, 1465, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1465, __pyx_L3_error)
    }
    __pyx_v_offset = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_day", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1465, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_116to_day(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_offset);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_116to_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_offset) {
  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_day", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_day(__pyx_v_self, __pyx_v_offset, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __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("cytimes.pydt._Pydt.to_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1487
 * 
 *     # . date&time
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def normalize(self) -> _Pydt:
 *         """Set the time fields to midnight (00:00:00) `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_119normalize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_normalize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalize", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_normalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_119normalize)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1487, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1494
 *         - The timezone is unaffected.
 *         """
 *         return self.to_time(0, 0, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_6.__pyx_n = 4;
  __pyx_t_6.hour = 0;
  __pyx_t_6.minute = 0;
  __pyx_t_6.second = 0;
  __pyx_t_6.microsecond = 0;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1487
 * 
 *     # . date&time
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def normalize(self) -> _Pydt:
 *         """Set the time fields to midnight (00:00:00) `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.normalize", __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_7cytimes_4pydt_5_Pydt_119normalize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_118normalize, "Set the time fields to midnight (00:00:00) `<'Pydt'>`.\n\n        - This method is useful in cases, when the time does not matter.\n        - The timezone is unaffected.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_119normalize = {"normalize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_119normalize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_118normalize};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_119normalize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("normalize", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("normalize", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_118normalize(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_118normalize(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("normalize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_normalize(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __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("cytimes.pydt._Pydt.normalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1496
 *         return self.to_time(0, 0, 0, 0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_datetime(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_121to_datetime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_datetime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace __pyx_t_16;
  int __pyx_t_17;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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_datetime", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_hour = __pyx_optional_args->hour;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_minute = __pyx_optional_args->minute;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_second = __pyx_optional_args->second;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_microsecond = __pyx_optional_args->microsecond;
                }
              }
            }
          }
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_121to_datetime)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_12 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (8-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1496, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1537
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "cytimes/pydt.py":1539
 *         try:
 *             # fmt: off
 *             return utils.dt_replace(self,             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second,
 *                 microsecond, -1, -1, self._cls(),
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1541
 *             return utils.dt_replace(self,
 *                 year, month, day, hour, minute, second,
 *                 microsecond, -1, -1, self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1539
 *         try:
 *             # fmt: off
 *             return utils.dt_replace(self,             # <<<<<<<<<<<<<<
 *                 year, month, day, hour, minute, second,
 *                 microsecond, -1, -1, self._cls(),
*/
      __pyx_t_16.__pyx_n = 10;
      __pyx_t_16.year = __pyx_v_year;
      __pyx_t_16.month = __pyx_v_month;
      __pyx_t_16.day = __pyx_v_day;
      __pyx_t_16.hour = __pyx_v_hour;
      __pyx_t_16.minute = __pyx_v_minute;
      __pyx_t_16.second = __pyx_v_second;
      __pyx_t_16.microsecond = __pyx_v_microsecond;
      __pyx_t_16.tzinfo = __pyx_mstate_global->__pyx_int_neg_1;
      __pyx_t_16.fold = -1;
      __pyx_t_16.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1539, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1539, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":1537
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pydt.py":1544
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
*/
    __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_17) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1544, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":1545
 *             # fmt: on
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_11 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1545, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_18.__pyx_n = 4;
        __pyx_t_18.cls = __pyx_t_11;
        __pyx_t_18.input_msg = __pyx_mstate_global->__pyx_kp_u_to_datetime_2;
        __pyx_t_18.error_msg = ((PyObject*)Py_None);
        __pyx_t_18.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_18); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }

      /* "cytimes/pydt.py":1544
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_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_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __pyx_t_17 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __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_17; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":1537
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_replace(self,
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  }

  /* "cytimes/pydt.py":1496
 *         return self.to_time(0, 0, 0, 0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_datetime(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_121to_datetime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_120to_datetime, "Adjust the date and time fields with new values,\n        without affecting the timezone `<'Pydt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..9999].\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :returns `<'Pydt'>`: The resulting datetime with new specified field values.\n\n        ## Equivalent\n        >>> dt.replace(\n                year=year,\n                month=month,\n                day=day,\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_121to_datetime = {"to_datetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_121to_datetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_120to_datetime};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_121to_datetime(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  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;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_datetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1496, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_datetime", 0) < (0)) __PYX_ERR(0, 1496, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1496, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1499, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1500, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
    if (values[3]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1502, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)-1);
    }
    if (values[4]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)-1);
    }
    if (values[5]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1504, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)-1);
    }
    if (values[6]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_datetime", 0, 0, 7, __pyx_nargs); __PYX_ERR(0, 1496, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_120to_datetime(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_120to_datetime(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 7;
  __pyx_t_2.year = __pyx_v_year;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_2.hour = __pyx_v_hour;
  __pyx_t_2.minute = __pyx_v_minute;
  __pyx_t_2.second = __pyx_v_second;
  __pyx_t_2.microsecond = __pyx_v_microsecond;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_datetime(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __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("cytimes.pydt._Pydt.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1547
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_date(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_123to_date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date *__pyx_optional_args) {
  int __pyx_v_year = ((int)-1);
  int __pyx_v_month = ((int)-1);
  int __pyx_v_day = ((int)-1);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace __pyx_t_12;
  int __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_date", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_year = __pyx_optional_args->year;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_month = __pyx_optional_args->month;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_day = __pyx_optional_args->day;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_123to_date)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1547, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1567
 *         >>> dt.replace(year=year, month=month, day=day)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":1568
 *         """
 *         try:
 *             return utils.dt_replace(             # <<<<<<<<<<<<<<
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
 *             )
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1569
 *         try:
 *             return utils.dt_replace(
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1568
 *         """
 *         try:
 *             return utils.dt_replace(             # <<<<<<<<<<<<<<
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
 *             )
*/
      __pyx_t_12.__pyx_n = 10;
      __pyx_t_12.year = __pyx_v_year;
      __pyx_t_12.month = __pyx_v_month;
      __pyx_t_12.day = __pyx_v_day;
      __pyx_t_12.hour = -1;
      __pyx_t_12.minute = -1;
      __pyx_t_12.second = -1;
      __pyx_t_12.microsecond = -1;
      __pyx_t_12.tzinfo = __pyx_mstate_global->__pyx_int_neg_1;
      __pyx_t_12.fold = -1;
      __pyx_t_12.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1568, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":1567
 *         >>> dt.replace(year=year, month=month, day=day)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
*/
    }
    __pyx_L3_error:;
    __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;
    __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;

    /* "cytimes/pydt.py":1571
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1571, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":1572
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_7 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1572, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_t_7;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_to_date_2;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1572, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }

      /* "cytimes/pydt.py":1571
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":1567
 *         >>> dt.replace(year=year, month=month, day=day)
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, year, month, day, -1, -1, -1, -1, -1, -1, self._cls()
*/
    __pyx_L5_except_error:;
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  }

  /* "cytimes/pydt.py":1547
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_date(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_123to_date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_122to_date, "Adjust the date with new values, without affecting other fields `<'Pydt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..9999].\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :returns `<'Pydt'>`: The resulting datetime with new specified date field values.\n\n        ## Equivalent\n        >>> dt.replace(year=year, month=month, day=day)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_123to_date = {"to_date", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_123to_date, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_122to_date};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_123to_date(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_date (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1547, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_date", 0) < (0)) __PYX_ERR(0, 1547, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1547, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1550, __pyx_L3_error)
    } else {
      __pyx_v_year = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_month = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L3_error)
    } else {
      __pyx_v_month = ((int)-1);
    }
    if (values[2]) {
      __pyx_v_day = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L3_error)
    } else {
      __pyx_v_day = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_date", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1547, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_122to_date(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_122to_date(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_date", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.year = __pyx_v_year;
  __pyx_t_2.month = __pyx_v_month;
  __pyx_t_2.day = __pyx_v_day;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_date(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __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("cytimes.pydt._Pydt.to_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1574
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_time(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_125to_time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time *__pyx_optional_args) {
  int __pyx_v_hour = ((int)-1);
  int __pyx_v_minute = ((int)-1);
  int __pyx_v_second = ((int)-1);
  int __pyx_v_microsecond = ((int)-1);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace __pyx_t_13;
  int __pyx_t_14;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_time", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_hour = __pyx_optional_args->hour;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_minute = __pyx_optional_args->minute;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_second = __pyx_optional_args->second;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_microsecond = __pyx_optional_args->microsecond;
          }
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_125to_time)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_second); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_9 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_9, (5-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1574, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1602
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":1603
 *         """
 *         try:
 *             return utils.dt_replace(             # <<<<<<<<<<<<<<
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
 *             )
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1604
 *         try:
 *             return utils.dt_replace(
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()             # <<<<<<<<<<<<<<
 *             )
 *         except Exception as err:
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":1603
 *         """
 *         try:
 *             return utils.dt_replace(             # <<<<<<<<<<<<<<
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
 *             )
*/
      __pyx_t_13.__pyx_n = 10;
      __pyx_t_13.year = -1;
      __pyx_t_13.month = -1;
      __pyx_t_13.day = -1;
      __pyx_t_13.hour = __pyx_v_hour;
      __pyx_t_13.minute = __pyx_v_minute;
      __pyx_t_13.second = __pyx_v_second;
      __pyx_t_13.microsecond = __pyx_v_microsecond;
      __pyx_t_13.tzinfo = __pyx_mstate_global->__pyx_int_neg_1;
      __pyx_t_13.fold = -1;
      __pyx_t_13.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1603, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":1602
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
*/
    }
    __pyx_L3_error:;
    __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;
    __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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/pydt.py":1606
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)
 * 
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1606, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":1607
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_8 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1607, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_15.__pyx_n = 4;
        __pyx_t_15.cls = __pyx_t_8;
        __pyx_t_15.input_msg = __pyx_mstate_global->__pyx_kp_u_to_time_2;
        __pyx_t_15.error_msg = ((PyObject*)Py_None);
        __pyx_t_15.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "cytimes/pydt.py":1606
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_14 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":1602
 *             )
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace(
 *                 self, -1, -1, -1, hour, minute, second, microsecond, -1, -1, self._cls()
*/
    __pyx_L5_except_error:;
    __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_L7_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_L4_exception_handled:;
    __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);
  }

  /* "cytimes/pydt.py":1574
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_time(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_125to_time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_124to_time, "Adjust the time fields with new values, without affecting other fields `<'Pydt'>`.\n\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :returns `<'Pydt'>`: The resulting datetime with new specified time field values.\n\n        ## Equivalent\n        >>> dt.replace(\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_125to_time = {"to_time", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_125to_time, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_124to_time};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_125to_time(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_hour;
  int __pyx_v_minute;
  int __pyx_v_second;
  int __pyx_v_microsecond;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_time (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1574, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_time", 0) < (0)) __PYX_ERR(0, 1574, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1574, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_hour = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L3_error)
    } else {
      __pyx_v_hour = ((int)-1);
    }
    if (values[1]) {
      __pyx_v_minute = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L3_error)
    } else {
      __pyx_v_minute = ((int)-1);
    }
    if (values[2]) {
      __pyx_v_second = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L3_error)
    } else {
      __pyx_v_second = ((int)-1);
    }
    if (values[3]) {
      __pyx_v_microsecond = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1580, __pyx_L3_error)
    } else {
      __pyx_v_microsecond = ((int)-1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_time", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 1574, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_124to_time(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_124to_time(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_time", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.hour = __pyx_v_hour;
  __pyx_t_2.minute = __pyx_v_minute;
  __pyx_t_2.second = __pyx_v_second;
  __pyx_t_2.microsecond = __pyx_v_microsecond;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->to_time(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __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("cytimes.pydt._Pydt.to_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1609
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_first_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the first day of the specified datetime unit,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_127to_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter __pyx_t_9;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date __pyx_t_10;
  int __pyx_t_11;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_first_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_first_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_127to_first_of)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1609, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1626
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1628
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "to_first_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":1627
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "to_first_of(unit)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_first_of_unit;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":1626
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":1634
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":1635
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1636
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . weekday
 *             if ch0 == "W":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1638
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self._to_curr_weekday(0)
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1639
 *             # . weekday
 *             if ch0 == "W":
 *                 return self._to_curr_weekday(0)             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1638
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self._to_curr_weekday(0)
 *             # . month
*/
    }

    /* "cytimes/pydt.py":1641
 *                 return self._to_curr_weekday(0)
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(1)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1642
 *             # . month
 *             if ch0 == "M":
 *                 return self.to_curr_month(1)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.day = 1;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1641
 *                 return self._to_curr_weekday(0)
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(1)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":1644
 *                 return self.to_curr_month(1)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_quarter(1, 1)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1645
 *             # . quarter
 *             if ch0 == "Q":
 *                 return self.to_curr_quarter(1, 1)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.month = 1;
      __pyx_t_9.day = 1;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_quarter(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1644
 *                 return self.to_curr_month(1)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_quarter(1, 1)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":1647
 *                 return self.to_curr_quarter(1, 1)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_date(-1, 1, 1)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1648
 *             # . year
 *             if ch0 == "Y":
 *                 return self.to_date(-1, 1, 1)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 3;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = 1;
      __pyx_t_10.day = 1;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_date(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1647
 *                 return self.to_curr_quarter(1, 1)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_date(-1, 1, 1)
 * 
*/
    }

    /* "cytimes/pydt.py":1635
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  }

  /* "cytimes/pydt.py":1651
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.to_date(-1, val, 1)
*/
  __pyx_t_12.__pyx_n = 2;
  __pyx_t_12.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_12.raise_error = 0;
  __pyx_t_11 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-2))) __PYX_ERR(0, 1651, __pyx_L1_error)
  __pyx_v_val = __pyx_t_11;

  /* "cytimes/pydt.py":1652
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_date(-1, val, 1)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1653
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.to_date(-1, val, 1)             # <<<<<<<<<<<<<<
 * 
 *         # Unsupported unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.year = -1;
    __pyx_t_10.month = __pyx_v_val;
    __pyx_t_10.day = 1;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_date(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1652
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_date(-1, val, 1)
 * 
*/
  }

  /* "cytimes/pydt.py":1657
 *         # Unsupported unit
 *         errors.raise_argument_error(
 *             self._cls(),             # <<<<<<<<<<<<<<
 *             "to_first_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":1659
 *             self._cls(),
 *             "to_first_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2, __pyx_v_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":1656
 * 
 *         # Unsupported unit
 *         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *             self._cls(),
 *             "to_first_of(unit)",
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.cls = __pyx_t_1;
  __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_first_of_unit;
  __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
  __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1609
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_first_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the first day of the specified datetime unit,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.to_first_of", __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_7cytimes_4pydt_5_Pydt_127to_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_126to_first_of, "Adjust the date fields to the first day of the specified datetime unit,\n        without affecting the time fields `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 First day of the year: `YYYY-01-01`\n            - `'Q'` \342\206\222 First day of the quarter: `YYYY-MM-01`\n            - `'M'` \342\206\222 First day of the month: `YYYY-MM-01`\n            - `'W'` \342\206\222 First day (Monday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 First day of the specifed month: `YYYY-MM-01`\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_127to_first_of = {"to_first_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_127to_first_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_126to_first_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_127to_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_first_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1609, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1609, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_first_of", 0) < (0)) __PYX_ERR(0, 1609, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_first_of", 1, 1, 1, i); __PYX_ERR(0, 1609, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1609, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_first_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1609, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1610, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_126to_first_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_126to_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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_first_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_first_of(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __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("cytimes.pydt._Pydt.to_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1662
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_last_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the last day of the specified datetime unit,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_129to_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter __pyx_t_9;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date __pyx_t_10;
  int __pyx_t_11;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_last_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_last_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_129to_last_of)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1662, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1679
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1681
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "to_last_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.",
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":1680
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "to_last_of(unit)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_last_of_unit;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1680, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":1679
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":1687
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":1688
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1689
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . weekday
 *             if ch0 == "W":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1691
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self._to_curr_weekday(6)
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1692
 *             # . weekday
 *             if ch0 == "W":
 *                 return self._to_curr_weekday(6)             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday(__pyx_v_self, 6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1691
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self._to_curr_weekday(6)
 *             # . month
*/
    }

    /* "cytimes/pydt.py":1694
 *                 return self._to_curr_weekday(6)
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(31)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1695
 *             # . month
 *             if ch0 == "M":
 *                 return self.to_curr_month(31)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.day = 31;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_month(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1694
 *                 return self._to_curr_weekday(6)
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_month(31)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":1697
 *                 return self.to_curr_month(31)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_quarter(3, 31)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1698
 *             # . quarter
 *             if ch0 == "Q":
 *                 return self.to_curr_quarter(3, 31)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.month = 3;
      __pyx_t_9.day = 31;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_curr_quarter(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1697
 *                 return self.to_curr_month(31)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return self.to_curr_quarter(3, 31)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":1700
 *                 return self.to_curr_quarter(3, 31)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_date(-1, 12, 31)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1701
 *             # . year
 *             if ch0 == "Y":
 *                 return self.to_date(-1, 12, 31)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 3;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = 12;
      __pyx_t_10.day = 31;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_date(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1700
 *                 return self.to_curr_quarter(3, 31)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_date(-1, 12, 31)
 * 
*/
    }

    /* "cytimes/pydt.py":1688
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  }

  /* "cytimes/pydt.py":1704
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.to_date(-1, val, 31)
*/
  __pyx_t_12.__pyx_n = 2;
  __pyx_t_12.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_12.raise_error = 0;
  __pyx_t_11 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-2))) __PYX_ERR(0, 1704, __pyx_L1_error)
  __pyx_v_val = __pyx_t_11;

  /* "cytimes/pydt.py":1705
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_date(-1, val, 31)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1706
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.to_date(-1, val, 31)             # <<<<<<<<<<<<<<
 * 
 *         # Unsupported unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.year = -1;
    __pyx_t_10.month = __pyx_v_val;
    __pyx_t_10.day = 31;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_date(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1705
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_date(-1, val, 31)
 * 
*/
  }

  /* "cytimes/pydt.py":1710
 *         # Unsupported unit
 *         errors.raise_argument_error(
 *             self._cls(),             # <<<<<<<<<<<<<<
 *             "to_last_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":1712
 *             self._cls(),
 *             "to_last_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_or_Month_name_g_2, __pyx_v_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":1709
 * 
 *         # Unsupported unit
 *         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *             self._cls(),
 *             "to_last_of(unit)",
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.cls = __pyx_t_1;
  __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_last_of_unit;
  __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
  __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1662
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_last_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the last day of the specified datetime unit,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.to_last_of", __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_7cytimes_4pydt_5_Pydt_129to_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_128to_last_of, "Adjust the date fields to the last day of the specified datetime unit,\n        without affecting the time fields `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 Last day of the year: `YYYY-12-31`\n            - `'Q'` \342\206\222 Last day of the quarter: `YYYY-MM-(30..31)`\n            - `'M'` \342\206\222 Last day of the month: `YYYY-MM-(28..31)`\n            - `'W'` \342\206\222 Last day (Sunday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 Last day of the specifed month: `YYYY-MM-(28..31)`\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_129to_last_of = {"to_last_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_129to_last_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_128to_last_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_129to_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_last_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1662, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1662, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_last_of", 0) < (0)) __PYX_ERR(0, 1662, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_last_of", 1, 1, 1, i); __PYX_ERR(0, 1662, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1662, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_last_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1662, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1663, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_128to_last_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_128to_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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_last_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_last_of(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __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("cytimes.pydt._Pydt.to_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1715
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_start_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_131to_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_mm;
  int __pyx_v_val;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add __pyx_t_9;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_start_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_start_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_131to_start_of)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1715, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1739
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1741
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "to_start_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":1740
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "to_start_of(unit)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_start_of_unit;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":1739
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":1748
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":1749
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1750
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . second
 *             if ch0 == "s":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1752
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, 0)
 *             # . minute
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x73);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1753
 *             # . second
 *             if ch0 == "s":
 *                 return self.to_time(-1, -1, -1, 0)             # <<<<<<<<<<<<<<
 *             # . minute
 *             if ch0 == "m":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = -1;
      __pyx_t_8.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1752
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, 0)
 *             # . minute
*/
    }

    /* "cytimes/pydt.py":1755
 *                 return self.to_time(-1, -1, -1, 0)
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, 0, 0)
 *             # . hour
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1756
 *             # . minute
 *             if ch0 == "m":
 *                 return self.to_time(-1, -1, 0, 0)             # <<<<<<<<<<<<<<
 *             # . hour
 *             if ch0 == "h":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = 0;
      __pyx_t_8.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1755
 *                 return self.to_time(-1, -1, -1, 0)
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, 0, 0)
 *             # . hour
*/
    }

    /* "cytimes/pydt.py":1758
 *                 return self.to_time(-1, -1, 0, 0)
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, 0, 0, 0)
 *             # . day
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1759
 *             # . hour
 *             if ch0 == "h":
 *                 return self.to_time(-1, 0, 0, 0)             # <<<<<<<<<<<<<<
 *             # . day
 *             if ch0 == "D":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = 0;
      __pyx_t_8.second = 0;
      __pyx_t_8.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1758
 *                 return self.to_time(-1, -1, 0, 0)
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, 0, 0, 0)
 *             # . day
*/
    }

    /* "cytimes/pydt.py":1761
 *                 return self.to_time(-1, 0, 0, 0)
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return self.to_time(0, 0, 0, 0)
 *             # . week
*/
    __pyx_t_6 = (__pyx_v_ch0 == 68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1762
 *             # . day
 *             if ch0 == "D":
 *                 return self.to_time(0, 0, 0, 0)             # <<<<<<<<<<<<<<
 *             # . week
 *             if ch0 == "W":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = 0;
      __pyx_t_8.minute = 0;
      __pyx_t_8.second = 0;
      __pyx_t_8.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1761
 *                 return self.to_time(-1, 0, 0, 0)
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return self.to_time(0, 0, 0, 0)
 *             # . week
*/
    }

    /* "cytimes/pydt.py":1764
 *                 return self.to_time(0, 0, 0, 0)
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 # fmt: off
 *                 return self.add(
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1766
 *             if ch0 == "W":
 *                 # fmt: off
 *                 return self.add(             # <<<<<<<<<<<<<<
 *                     0, 0, 0, 0,
 *                     -self.access_weekday(),
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1773
 *                     -self.access_second(),
 *                     0,
 *                     -self.access_microsecond(),             # <<<<<<<<<<<<<<
 *                 )
 *                 # fmt: on
*/
      __pyx_t_9.__pyx_n = 10;
      __pyx_t_9.years = 0;
      __pyx_t_9.quarters = 0;
      __pyx_t_9.months = 0;
      __pyx_t_9.weeks = 0;
      __pyx_t_9.days = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0));
      __pyx_t_9.hours = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0));
      __pyx_t_9.minutes = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0));
      __pyx_t_9.seconds = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0));
      __pyx_t_9.milliseconds = 0;
      __pyx_t_9.microseconds = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0));
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1764
 *                 return self.to_time(0, 0, 0, 0)
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 # fmt: off
 *                 return self.add(
*/
    }

    /* "cytimes/pydt.py":1777
 *                 # fmt: on
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, -1, 1, 0, 0, 0, 0)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1778
 *             # . month
 *             if ch0 == "M":
 *                 return self.to_datetime(-1, -1, 1, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = -1;
      __pyx_t_10.day = 1;
      __pyx_t_10.hour = 0;
      __pyx_t_10.minute = 0;
      __pyx_t_10.second = 0;
      __pyx_t_10.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1777
 *                 # fmt: on
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, -1, 1, 0, 0, 0, 0)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":1780
 *                 return self.to_datetime(-1, -1, 1, 0, 0, 0, 0)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3 - 2
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1781
 *             # . quarter
 *             if ch0 == "Q":
 *                 mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *                 mm = utils.quarter_of_month(mm) * 3 - 2
 *                 return self.to_datetime(-1, mm, 1, 0, 0, 0, 0)
*/
      __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

      /* "cytimes/pydt.py":1782
 *             if ch0 == "Q":
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3 - 2             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, mm, 1, 0, 0, 0, 0)
 *             # . year
*/
      __pyx_v_mm = ((__pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_mm) * 3) - 2);

      /* "cytimes/pydt.py":1783
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3 - 2
 *                 return self.to_datetime(-1, mm, 1, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = __pyx_v_mm;
      __pyx_t_10.day = 1;
      __pyx_t_10.hour = 0;
      __pyx_t_10.minute = 0;
      __pyx_t_10.second = 0;
      __pyx_t_10.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1780
 *                 return self.to_datetime(-1, -1, 1, 0, 0, 0, 0)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3 - 2
*/
    }

    /* "cytimes/pydt.py":1785
 *                 return self.to_datetime(-1, mm, 1, 0, 0, 0, 0)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, 1, 1, 0, 0, 0, 0)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1786
 *             # . year
 *             if ch0 == "Y":
 *                 return self.to_datetime(-1, 1, 1, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'ms', 'us', 'ns'
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = 1;
      __pyx_t_10.day = 1;
      __pyx_t_10.hour = 0;
      __pyx_t_10.minute = 0;
      __pyx_t_10.second = 0;
      __pyx_t_10.microsecond = 0;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1785
 *                 return self.to_datetime(-1, mm, 1, 0, 0, 0, 0)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, 1, 1, 0, 0, 0, 0)
 * 
*/
    }

    /* "cytimes/pydt.py":1749
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":1789
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
  __pyx_t_11 = (__pyx_v_unit_len == 2);
  if (__pyx_t_11) {
  } else {
    __pyx_t_6 = __pyx_t_11;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_11 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_6 = __pyx_t_11;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1790
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . millisecond
 *             if ch0 == "m":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1792
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000)
 *             # . microsecond / nanosecond
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1793
 *             # . millisecond
 *             if ch0 == "m":
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000)             # <<<<<<<<<<<<<<
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = -1;
      __pyx_t_8.microsecond = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_millisecond(__pyx_v_self, 0) * 0x3E8);
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1792
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000)
 *             # . microsecond / nanosecond
*/
    }

    /* "cytimes/pydt.py":1795
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000)
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return self
 * 
*/
    switch (__pyx_v_ch0) {
      case 0x75:
      case 0x6E:

      /* "cytimes/pydt.py":1796
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
 *                 return self             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1795
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000)
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return self
 * 
*/
      break;
      default: break;
    }

    /* "cytimes/pydt.py":1789
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":1799
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.to_time(-1, -1, 0, 0)
 * 
*/
  __pyx_t_11 = (__pyx_v_unit_len == 3);
  if (__pyx_t_11) {
  } else {
    __pyx_t_6 = __pyx_t_11;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1799, __pyx_L1_error)
  __pyx_t_6 = __pyx_t_11;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1800
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":
 *             return self.to_time(-1, -1, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 4;
    __pyx_t_8.hour = -1;
    __pyx_t_8.minute = -1;
    __pyx_t_8.second = 0;
    __pyx_t_8.microsecond = 0;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1799
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.to_time(-1, -1, 0, 0)
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/pydt.py":1803
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.to_datetime(-1, val, 1, 0, 0, 0, 0)
*/
  __pyx_t_13.__pyx_n = 2;
  __pyx_t_13.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_13.raise_error = 0;
  __pyx_t_12 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_13); if (unlikely(__pyx_t_12 == ((int)-2))) __PYX_ERR(0, 1803, __pyx_L1_error)
  __pyx_v_val = __pyx_t_12;

  /* "cytimes/pydt.py":1804
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(-1, val, 1, 0, 0, 0, 0)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1805
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.to_datetime(-1, val, 1, 0, 0, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *         # Weekday name
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 7;
    __pyx_t_10.year = -1;
    __pyx_t_10.month = __pyx_v_val;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 0;
    __pyx_t_10.minute = 0;
    __pyx_t_10.second = 0;
    __pyx_t_10.microsecond = 0;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1804
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(-1, val, 1, 0, 0, 0, 0)
 * 
*/
  }

  /* "cytimes/pydt.py":1808
 * 
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             # fmt: off
*/
  __pyx_t_14.__pyx_n = 2;
  __pyx_t_14.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_14.raise_error = 0;
  __pyx_t_12 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_14); if (unlikely(__pyx_t_12 == ((int)-2))) __PYX_ERR(0, 1808, __pyx_L1_error)
  __pyx_v_val = __pyx_t_12;

  /* "cytimes/pydt.py":1809
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return self.add(
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1811
 *         if val != -1:
 *             # fmt: off
 *             return self.add(             # <<<<<<<<<<<<<<
 *                 0, 0, 0, 0,
 *                 val - self.access_weekday(),
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "cytimes/pydt.py":1818
 *                 -self.access_second(),
 *                 0,
 *                 -self.access_microsecond(),             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
    __pyx_t_9.__pyx_n = 10;
    __pyx_t_9.years = 0;
    __pyx_t_9.quarters = 0;
    __pyx_t_9.months = 0;
    __pyx_t_9.weeks = 0;
    __pyx_t_9.days = (__pyx_v_val - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0));
    __pyx_t_9.hours = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0));
    __pyx_t_9.minutes = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0));
    __pyx_t_9.seconds = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0));
    __pyx_t_9.milliseconds = 0;
    __pyx_t_9.microseconds = (-((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0));
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1809
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return self.add(
*/
  }

  /* "cytimes/pydt.py":1824
 *         # Invalid
 *         errors.raise_argument_error(
 *             self._cls(),             # <<<<<<<<<<<<<<
 *             "to_start_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":1827
 *             "to_start_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
 *             "or Month/Weekday name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o_2, __pyx_v_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":1823
 * 
 *         # Invalid
 *         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *             self._cls(),
 *             "to_start_of(unit)",
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.cls = __pyx_t_1;
  __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_start_of_unit;
  __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
  __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1715
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_start_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.to_start_of", __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_7cytimes_4pydt_5_Pydt_131to_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_130to_start_of, "Adjust the date & time fields to the start of the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 Start of year: `YYYY-01-01 00:00:00`\n            - `'Q'`  \342\206\222 Start of quarter: `YYYY-MM-01 00:00:00`\n            - `'M'`  \342\206\222 Start of month: `YYYY-MM-01 00:00:00`\n            - `'W'`  \342\206\222 Start of week (Monday): `YYYY-MM-DD 00:00:00`\n            - `'D'`  \342\206\222 Start of day: `YYYY-MM-DD 00:00:00`\n            - `'h'`  \342\206\222 Start of hour: `YYYY-MM-DD hh:00:00`\n            - `'m'`  \342\206\222 Start of minute: `YYYY-MM-DD hh:mm:00`\n            - `'s'`  \342\206\222 Start of second: `YYYY-MM-DD hh:mm:ss.000000`\n            - `'ms'` \342\206\222 Start of millisecond: `YYYY-MM-DD hh:mm:ss.uuu000`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 Start of the specifed month: `YYYY-MM-01 00:00:00`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 Start of the specifed weekday: `YYYY-MM-DD 00:00:00`\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_131to_start_of = {"to_start_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_131to_start_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_130to_start_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_131to_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_start_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1715, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1715, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_start_of", 0) < (0)) __PYX_ERR(0, 1715, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_start_of", 1, 1, 1, i); __PYX_ERR(0, 1715, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1715, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_start_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1715, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1716, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_130to_start_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_130to_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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_start_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_start_of(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __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("cytimes.pydt._Pydt.to_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1830
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_end_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_133to_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_to_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_mm;
  int __pyx_v_val;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time __pyx_t_8;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add __pyx_t_9;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_end_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_end_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_133to_end_of)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 1830, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":1854
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1856
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "to_end_of(unit)",
 *                 "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":1855
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "to_end_of(unit)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_end_of_unit;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":1854
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":1863
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":1864
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1865
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . second
 *             if ch0 == "s":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1867
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, 999999)
 *             # . minute
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x73);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1868
 *             # . second
 *             if ch0 == "s":
 *                 return self.to_time(-1, -1, -1, 999999)             # <<<<<<<<<<<<<<
 *             # . minute
 *             if ch0 == "m":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = -1;
      __pyx_t_8.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1867
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, 999999)
 *             # . minute
*/
    }

    /* "cytimes/pydt.py":1870
 *                 return self.to_time(-1, -1, -1, 999999)
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, 59, 999999)
 *             # . hour
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1871
 *             # . minute
 *             if ch0 == "m":
 *                 return self.to_time(-1, -1, 59, 999999)             # <<<<<<<<<<<<<<
 *             # . hour
 *             if ch0 == "h":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = 59;
      __pyx_t_8.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1870
 *                 return self.to_time(-1, -1, -1, 999999)
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, 59, 999999)
 *             # . hour
*/
    }

    /* "cytimes/pydt.py":1873
 *                 return self.to_time(-1, -1, 59, 999999)
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, 59, 59, 999999)
 *             # . day
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1874
 *             # . hour
 *             if ch0 == "h":
 *                 return self.to_time(-1, 59, 59, 999999)             # <<<<<<<<<<<<<<
 *             # . day
 *             if ch0 == "D":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = 59;
      __pyx_t_8.second = 59;
      __pyx_t_8.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1874, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1873
 *                 return self.to_time(-1, -1, 59, 999999)
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, 59, 59, 999999)
 *             # . day
*/
    }

    /* "cytimes/pydt.py":1876
 *                 return self.to_time(-1, 59, 59, 999999)
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return self.to_time(23, 59, 59, 999999)
 *             # . week
*/
    __pyx_t_6 = (__pyx_v_ch0 == 68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1877
 *             # . day
 *             if ch0 == "D":
 *                 return self.to_time(23, 59, 59, 999999)             # <<<<<<<<<<<<<<
 *             # . week
 *             if ch0 == "W":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = 23;
      __pyx_t_8.minute = 59;
      __pyx_t_8.second = 59;
      __pyx_t_8.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1876
 *                 return self.to_time(-1, 59, 59, 999999)
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return self.to_time(23, 59, 59, 999999)
 *             # . week
*/
    }

    /* "cytimes/pydt.py":1879
 *                 return self.to_time(23, 59, 59, 999999)
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 # fmt: off
 *                 return self.add(
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1881
 *             if ch0 == "W":
 *                 # fmt: off
 *                 return self.add(             # <<<<<<<<<<<<<<
 *                     0, 0, 0, 0,
 *                     6 - self.access_weekday(),
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":1888
 *                     59 - self.access_second(),
 *                     0,
 *                     999999 - self.access_microsecond(),             # <<<<<<<<<<<<<<
 *                 )
 *                 # fmt: on
*/
      __pyx_t_9.__pyx_n = 10;
      __pyx_t_9.years = 0;
      __pyx_t_9.quarters = 0;
      __pyx_t_9.months = 0;
      __pyx_t_9.weeks = 0;
      __pyx_t_9.days = (6 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0));
      __pyx_t_9.hours = (23 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0));
      __pyx_t_9.minutes = (59 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0));
      __pyx_t_9.seconds = (59 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0));
      __pyx_t_9.milliseconds = 0;
      __pyx_t_9.microseconds = (0xF423F - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0));
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1879
 *                 return self.to_time(23, 59, 59, 999999)
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 # fmt: off
 *                 return self.add(
*/
    }

    /* "cytimes/pydt.py":1892
 *                 # fmt: on
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, -1, 31, 23, 59, 59, 999999)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1893
 *             # . month
 *             if ch0 == "M":
 *                 return self.to_datetime(-1, -1, 31, 23, 59, 59, 999999)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = -1;
      __pyx_t_10.day = 31;
      __pyx_t_10.hour = 23;
      __pyx_t_10.minute = 59;
      __pyx_t_10.second = 59;
      __pyx_t_10.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1892
 *                 # fmt: on
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, -1, 31, 23, 59, 59, 999999)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":1895
 *                 return self.to_datetime(-1, -1, 31, 23, 59, 59, 999999)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1896
 *             # . quarter
 *             if ch0 == "Q":
 *                 mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *                 mm = utils.quarter_of_month(mm) * 3
 *                 return self.to_datetime(-1, mm, 31, 23, 59, 59, 999999)
*/
      __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

      /* "cytimes/pydt.py":1897
 *             if ch0 == "Q":
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, mm, 31, 23, 59, 59, 999999)
 *             # . year
*/
      __pyx_v_mm = (__pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_mm) * 3);

      /* "cytimes/pydt.py":1898
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3
 *                 return self.to_datetime(-1, mm, 31, 23, 59, 59, 999999)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = __pyx_v_mm;
      __pyx_t_10.day = 31;
      __pyx_t_10.hour = 23;
      __pyx_t_10.minute = 59;
      __pyx_t_10.second = 59;
      __pyx_t_10.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1895
 *                 return self.to_datetime(-1, -1, 31, 23, 59, 59, 999999)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 mm: cython.int = self.access_month()
 *                 mm = utils.quarter_of_month(mm) * 3
*/
    }

    /* "cytimes/pydt.py":1900
 *                 return self.to_datetime(-1, mm, 31, 23, 59, 59, 999999)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, 12, 31, 23, 59, 59, 999999)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1901
 *             # . year
 *             if ch0 == "Y":
 *                 return self.to_datetime(-1, 12, 31, 23, 59, 59, 999999)             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'ms', 'us', 'ns'
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_10.__pyx_n = 7;
      __pyx_t_10.year = -1;
      __pyx_t_10.month = 12;
      __pyx_t_10.day = 31;
      __pyx_t_10.hour = 23;
      __pyx_t_10.minute = 59;
      __pyx_t_10.second = 59;
      __pyx_t_10.microsecond = 0xF423F;
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1900
 *                 return self.to_datetime(-1, mm, 31, 23, 59, 59, 999999)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return self.to_datetime(-1, 12, 31, 23, 59, 59, 999999)
 * 
*/
    }

    /* "cytimes/pydt.py":1864
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":1904
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
  __pyx_t_11 = (__pyx_v_unit_len == 2);
  if (__pyx_t_11) {
  } else {
    __pyx_t_6 = __pyx_t_11;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_11 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_6 = __pyx_t_11;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1905
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . millisecond
 *             if ch0 == "m":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1907
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000 + 999)
 *             # . microsecond / nanosecond
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1908
 *             # . millisecond
 *             if ch0 == "m":
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000 + 999)             # <<<<<<<<<<<<<<
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_8.__pyx_n = 4;
      __pyx_t_8.hour = -1;
      __pyx_t_8.minute = -1;
      __pyx_t_8.second = -1;
      __pyx_t_8.microsecond = ((((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_millisecond(__pyx_v_self, 0) * 0x3E8) + 0x3E7);
      __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1907
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000 + 999)
 *             # . microsecond / nanosecond
*/
    }

    /* "cytimes/pydt.py":1910
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000 + 999)
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return self
 * 
*/
    switch (__pyx_v_ch0) {
      case 0x75:
      case 0x6E:

      /* "cytimes/pydt.py":1911
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
 *                 return self             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'min' for pandas compatibility
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pydt.py":1910
 *                 return self.to_time(-1, -1, -1, self.access_millisecond() * 1000 + 999)
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return self
 * 
*/
      break;
      default: break;
    }

    /* "cytimes/pydt.py":1904
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":1914
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.to_time(-1, -1, 59, 999999)
 * 
*/
  __pyx_t_11 = (__pyx_v_unit_len == 3);
  if (__pyx_t_11) {
  } else {
    __pyx_t_6 = __pyx_t_11;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1914, __pyx_L1_error)
  __pyx_t_6 = __pyx_t_11;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1915
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":
 *             return self.to_time(-1, -1, 59, 999999)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_8.__pyx_n = 4;
    __pyx_t_8.hour = -1;
    __pyx_t_8.minute = -1;
    __pyx_t_8.second = 59;
    __pyx_t_8.microsecond = 0xF423F;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_time(__pyx_v_self, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1914
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.to_time(-1, -1, 59, 999999)
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/pydt.py":1918
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.to_datetime(-1, val, 31, 23, 59, 59, 999999)
*/
  __pyx_t_13.__pyx_n = 2;
  __pyx_t_13.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_13.raise_error = 0;
  __pyx_t_12 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_13); if (unlikely(__pyx_t_12 == ((int)-2))) __PYX_ERR(0, 1918, __pyx_L1_error)
  __pyx_v_val = __pyx_t_12;

  /* "cytimes/pydt.py":1919
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(-1, val, 31, 23, 59, 59, 999999)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1920
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.to_datetime(-1, val, 31, 23, 59, 59, 999999)             # <<<<<<<<<<<<<<
 * 
 *         # Weekday name
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_10.__pyx_n = 7;
    __pyx_t_10.year = -1;
    __pyx_t_10.month = __pyx_v_val;
    __pyx_t_10.day = 31;
    __pyx_t_10.hour = 23;
    __pyx_t_10.minute = 59;
    __pyx_t_10.second = 59;
    __pyx_t_10.microsecond = 0xF423F;
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->to_datetime(__pyx_v_self, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1919
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.to_datetime(-1, val, 31, 23, 59, 59, 999999)
 * 
*/
  }

  /* "cytimes/pydt.py":1923
 * 
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             # fmt: off
*/
  __pyx_t_14.__pyx_n = 2;
  __pyx_t_14.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_14.raise_error = 0;
  __pyx_t_12 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_14); if (unlikely(__pyx_t_12 == ((int)-2))) __PYX_ERR(0, 1923, __pyx_L1_error)
  __pyx_v_val = __pyx_t_12;

  /* "cytimes/pydt.py":1924
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return self.add(
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1926
 *         if val != -1:
 *             # fmt: off
 *             return self.add(             # <<<<<<<<<<<<<<
 *                 0, 0, 0, 0,
 *                 val - self.access_weekday(),
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "cytimes/pydt.py":1933
 *                 59 - self.access_second(),
 *                 0,
 *                 999999 - self.access_microsecond(),             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
    __pyx_t_9.__pyx_n = 10;
    __pyx_t_9.years = 0;
    __pyx_t_9.quarters = 0;
    __pyx_t_9.months = 0;
    __pyx_t_9.weeks = 0;
    __pyx_t_9.days = (__pyx_v_val - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0));
    __pyx_t_9.hours = (23 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0));
    __pyx_t_9.minutes = (59 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0));
    __pyx_t_9.seconds = (59 - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0));
    __pyx_t_9.milliseconds = 0;
    __pyx_t_9.microseconds = (0xF423F - ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0));
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1924
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return self.add(
*/
  }

  /* "cytimes/pydt.py":1939
 *         # Invalid
 *         errors.raise_argument_error(
 *             self._cls(),             # <<<<<<<<<<<<<<
 *             "to_end_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":1942
 *             "to_end_of(unit)",
 *             "Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' "
 *             "or Month/Weekday name; got '%s'." % unit,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_Y_Q_M_W_D_h_m_s_ms_us_o_2, __pyx_v_unit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":1938
 * 
 *         # Invalid
 *         errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *             self._cls(),
 *             "to_end_of(unit)",
*/
  __pyx_t_7.__pyx_n = 3;
  __pyx_t_7.cls = __pyx_t_1;
  __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_to_end_of_unit;
  __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
  __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1830
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_end_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.to_end_of", __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_7cytimes_4pydt_5_Pydt_133to_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_132to_end_of, "Adjust the date & time fields to the end of the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 End of year: `YYYY-12-31 23:59:59.999999`\n            - `'Q'`  \342\206\222 End of quarter: `YYYY-MM-(30..31) 23:59:59.999999`\n            - `'M'`  \342\206\222 End of month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `'W'`  \342\206\222 End of week (Sunday): `YYYY-MM-DD 23:59:59.999999`\n            - `'D'`  \342\206\222 End of day: `YYYY-MM-DD 23:59:59.999999`\n            - `'h'`  \342\206\222 End of hour: `YYYY-MM-DD hh:59:59.999999`\n            - `'m'`  \342\206\222 End of minute: `YYYY-MM-DD hh:mm:59.999999`\n            - `'s'`  \342\206\222 End of second: `YYYY-MM-DD hh:mm:ss.999999`\n            - `'ms'` \342\206\222 End of millisecond: `YYYY-MM-DD hh:mm:ss.uuu999`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 End of the specifed month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 End of the specifed weekday: `YYYY-MM-DD 23:59:59.999999`\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_133to_end_of = {"to_end_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_133to_end_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_132to_end_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_133to_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_end_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1830, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1830, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_end_of", 0) < (0)) __PYX_ERR(0, 1830, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_end_of", 1, 1, 1, i); __PYX_ERR(0, 1830, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1830, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_end_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1830, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.to_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1831, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_132to_end_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_132to_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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_end_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_to_end_of(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __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("cytimes.pydt._Pydt.to_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1945
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_first_of(self, unit: str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_135is_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_first_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_first_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_135is_first_of)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1945, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":1963
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1964
 *         # Guard
 *         if unit is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1963
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":1967
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":1968
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1969
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . weekday
 *             if ch0 == "W":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":1971
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 0
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1972
 *             # . weekday
 *             if ch0 == "W":
 *                 return self.access_weekday() == 0             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == 0);
      goto __pyx_L0;

      /* "cytimes/pydt.py":1971
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 0
 *             # . month
*/
    }

    /* "cytimes/pydt.py":1974
 *                 return self.access_weekday() == 0
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1975
 *             # . month
 *             if ch0 == "M":
 *                 return utils.dt_is_first_dom(self)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_dom(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":1974
 *                 return self.access_weekday() == 0
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":1977
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doq(self)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1978
 *             # . quarter
 *             if ch0 == "Q":
 *                 return utils.dt_is_first_doq(self)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_doq(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":1977
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doq(self)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":1980
 *                 return utils.dt_is_first_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doy(self)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":1981
 *             # . year
 *             if ch0 == "Y":
 *                 return utils.dt_is_first_doy(self)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_doy(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":1980
 *                 return utils.dt_is_first_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doy(self)
 * 
*/
    }

    /* "cytimes/pydt.py":1968
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  }

  /* "cytimes/pydt.py":1984
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 0;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 1984, __pyx_L1_error)
  __pyx_v_val = __pyx_t_7;

  /* "cytimes/pydt.py":1985
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":1986
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_first_dom(self)             # <<<<<<<<<<<<<<
 * 
 *         # Invalid
*/
    __pyx_t_9 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0) == __pyx_v_val);
    if (__pyx_t_9) {
    } else {
      __pyx_t_6 = __pyx_t_9;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_9 = __pyx_f_7cytimes_5utils_dt_is_first_dom(((PyDateTime_DateTime *)__pyx_v_self));
    __pyx_t_6 = __pyx_t_9;
    __pyx_L10_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":1985
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
 * 
*/
  }

  /* "cytimes/pydt.py":1989
 * 
 *         # Invalid
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1945
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_first_of(self, unit: str) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_135is_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_134is_first_of, "Check whether the date fields are on the first day of the specified datetime unit `<'bool'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 First day of the year: `YYYY-01-01`\n            - `'Q'` \342\206\222 First day of the quarter: `YYYY-MM-01`\n            - `'M'` \342\206\222 First day of the month: `YYYY-MM-01`\n            - `'W'` \342\206\222 First day (Monday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 First day of the specifed month: `YYYY-MM-01`\n\n        :return `<'bool'>`: True if the instance is on the first day\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_135is_first_of = {"is_first_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_135is_first_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_134is_first_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_135is_first_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_first_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1945, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1945, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_first_of", 0) < (0)) __PYX_ERR(0, 1945, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_first_of", 1, 1, 1, i); __PYX_ERR(0, 1945, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1945, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_first_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1945, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1947, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_134is_first_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_134is_first_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("is_first_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_first_of(__pyx_v_self, __pyx_v_unit, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1945, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_first_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":1991
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_last_of(self, unit: str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_137is_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_last_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_last_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_137is_last_of)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1991, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2009
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2010
 *         # Guard
 *         if unit is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2009
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":2013
 * 
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":2014
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2015
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . weekday
 *             if ch0 == "W":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":2017
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 6
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2018
 *             # . weekday
 *             if ch0 == "W":
 *                 return self.access_weekday() == 6             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == 6);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2017
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 6
 *             # . month
*/
    }

    /* "cytimes/pydt.py":2020
 *                 return self.access_weekday() == 6
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2021
 *             # . month
 *             if ch0 == "M":
 *                 return utils.dt_is_last_dom(self)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_dom(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2020
 *                 return self.access_weekday() == 6
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":2023
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doq(self)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2024
 *             # . quarter
 *             if ch0 == "Q":
 *                 return utils.dt_is_last_doq(self)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_doq(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2023
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doq(self)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":2026
 *                 return utils.dt_is_last_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doy(self)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2027
 *             # . year
 *             if ch0 == "Y":
 *                 return utils.dt_is_last_doy(self)             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_doy(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2026
 *                 return utils.dt_is_last_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doy(self)
 * 
*/
    }

    /* "cytimes/pydt.py":2014
 *         # Unit: 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . weekday
*/
  }

  /* "cytimes/pydt.py":2030
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 0;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 2030, __pyx_L1_error)
  __pyx_v_val = __pyx_t_7;

  /* "cytimes/pydt.py":2031
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2032
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_last_dom(self)             # <<<<<<<<<<<<<<
 * 
 *         # Invalid
*/
    __pyx_t_9 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0) == __pyx_v_val);
    if (__pyx_t_9) {
    } else {
      __pyx_t_6 = __pyx_t_9;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_9 = __pyx_f_7cytimes_5utils_dt_is_last_dom(((PyDateTime_DateTime *)__pyx_v_self));
    __pyx_t_6 = __pyx_t_9;
    __pyx_L10_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2031
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
 * 
*/
  }

  /* "cytimes/pydt.py":2035
 * 
 *         # Invalid
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":1991
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_last_of(self, unit: str) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_137is_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_136is_last_of, "Check whether the date fields are on the last day of the specified datetime unit `<'bool'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'` \342\206\222 Last day of the year: `YYYY-12-31`\n            - `'Q'` \342\206\222 Last day of the quarter: `YYYY-MM-(30..31)`\n            - `'M'` \342\206\222 Last day of the month: `YYYY-MM-(28..31)`\n            - `'W'` \342\206\222 Last day (Sunday) of the week: `YYYY-MM-DD`\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                    \342\206\222 Last day of the specifed month: `YYYY-MM-(28..31)`\n\n        :return `<'bool'>`: True if the instance is on the last day\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_137is_last_of = {"is_last_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_137is_last_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_136is_last_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_137is_last_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_last_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1991, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1991, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_last_of", 0) < (0)) __PYX_ERR(0, 1991, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_last_of", 1, 1, 1, i); __PYX_ERR(0, 1991, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1991, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_last_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1991, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 1993, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_136is_last_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_136is_last_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("is_last_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_last_of(__pyx_v_self, __pyx_v_unit, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1991, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_last_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2037
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_start_of(self, unit: str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_139is_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_start_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_start_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_139is_start_of)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2037, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2063
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2064
 *         # Guard
 *         if unit is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2063
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":2067
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":2068
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2069
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . second
 *             if ch0 == "s":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":2071
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() == 0
 *             # . minute
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x73);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2072
 *             # . second
 *             if ch0 == "s":
 *                 return self.access_microsecond() == 0             # <<<<<<<<<<<<<<
 *             # . minute
 *             if ch0 == "m":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2071
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() == 0
 *             # . minute
*/
    }

    /* "cytimes/pydt.py":2074
 *                 return self.access_microsecond() == 0
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_second() == 0 and self.access_microsecond() == 0
 *             # . hour
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2075
 *             # . minute
 *             if ch0 == "m":
 *                 return self.access_second() == 0 and self.access_microsecond() == 0             # <<<<<<<<<<<<<<
 *             # . hour
 *             if ch0 == "h":
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 0);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0);
      __pyx_t_6 = __pyx_t_7;
      __pyx_L7_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2074
 *                 return self.access_microsecond() == 0
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_second() == 0 and self.access_microsecond() == 0
 *             # . hour
*/
    }

    /* "cytimes/pydt.py":2077
 *                 return self.access_second() == 0 and self.access_microsecond() == 0
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_minute() == 0
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2079
 *             if ch0 == "h":
 *                 return (
 *                     self.access_minute() == 0             # <<<<<<<<<<<<<<
 *                     and self.access_second() == 0
 *                     and self.access_microsecond() == 0
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0) == 0);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L10_bool_binop_done;
      }

      /* "cytimes/pydt.py":2080
 *                 return (
 *                     self.access_minute() == 0
 *                     and self.access_second() == 0             # <<<<<<<<<<<<<<
 *                     and self.access_microsecond() == 0
 *                 )
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 0);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L10_bool_binop_done;
      }

      /* "cytimes/pydt.py":2081
 *                     self.access_minute() == 0
 *                     and self.access_second() == 0
 *                     and self.access_microsecond() == 0             # <<<<<<<<<<<<<<
 *                 )
 *             # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0);
      __pyx_t_6 = __pyx_t_7;
      __pyx_L10_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2077
 *                 return self.access_second() == 0 and self.access_microsecond() == 0
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_minute() == 0
*/
    }

    /* "cytimes/pydt.py":2084
 *                 )
 *             # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_start_of_time(self):             # <<<<<<<<<<<<<<
 *                 return False
 *             # . day
*/
    __pyx_t_6 = (!__pyx_f_7cytimes_5utils_dt_is_start_of_time(((PyDateTime_DateTime *)__pyx_v_self)));
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2085
 *             # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_start_of_time(self):
 *                 return False             # <<<<<<<<<<<<<<
 *             # . day
 *             if ch0 == "D":
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2084
 *                 )
 *             # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_start_of_time(self):             # <<<<<<<<<<<<<<
 *                 return False
 *             # . day
*/
    }

    /* "cytimes/pydt.py":2087
 *                 return False
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return True
 *             # . week
*/
    __pyx_t_6 = (__pyx_v_ch0 == 68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2088
 *             # . day
 *             if ch0 == "D":
 *                 return True             # <<<<<<<<<<<<<<
 *             # . week
 *             if ch0 == "W":
*/
      __pyx_r = 1;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2087
 *                 return False
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return True
 *             # . week
*/
    }

    /* "cytimes/pydt.py":2090
 *                 return True
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 0
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2091
 *             # . week
 *             if ch0 == "W":
 *                 return self.access_weekday() == 0             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == 0);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2090
 *                 return True
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 0
 *             # . month
*/
    }

    /* "cytimes/pydt.py":2093
 *                 return self.access_weekday() == 0
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2094
 *             # . month
 *             if ch0 == "M":
 *                 return utils.dt_is_first_dom(self)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_dom(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2093
 *                 return self.access_weekday() == 0
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":2096
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doq(self)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2097
 *             # . quarter
 *             if ch0 == "Q":
 *                 return utils.dt_is_first_doq(self)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_doq(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2096
 *                 return utils.dt_is_first_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doq(self)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":2099
 *                 return utils.dt_is_first_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doy(self)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2100
 *             # . year
 *             if ch0 == "Y":
 *                 return utils.dt_is_first_doy(self)             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'ms', 'us', 'ns'
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_first_doy(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2099
 *                 return utils.dt_is_first_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_first_doy(self)
 * 
*/
    }

    /* "cytimes/pydt.py":2068
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":2103
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
  __pyx_t_7 = (__pyx_v_unit_len == 2);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_7 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2104
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . millisecond
 *             if ch0 == "m":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":2106
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() % 1000 == 0
 *             # . microsecond / nanosecond
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2107
 *             # . millisecond
 *             if ch0 == "m":
 *                 return self.access_microsecond() % 1000 == 0             # <<<<<<<<<<<<<<
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
*/
      __pyx_r = (__Pyx_mod_long(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0), 0x3E8, 1) == 0);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2106
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() % 1000 == 0
 *             # . microsecond / nanosecond
*/
    }

    /* "cytimes/pydt.py":2109
 *                 return self.access_microsecond() % 1000 == 0
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
    switch (__pyx_v_ch0) {
      case 0x75:
      case 0x6E:

      /* "cytimes/pydt.py":2110
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'min' for pandas compatibility
*/
      __pyx_r = 1;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2109
 *                 return self.access_microsecond() % 1000 == 0
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
      break;
      default: break;
    }

    /* "cytimes/pydt.py":2103
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":2113
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.access_second() == 0 and self.access_microsecond() == 0
 * 
*/
  __pyx_t_7 = (__pyx_v_unit_len == 3);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L22_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2113, __pyx_L1_error)
  __pyx_t_6 = __pyx_t_7;
  __pyx_L22_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2114
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":
 *             return self.access_second() == 0 and self.access_microsecond() == 0             # <<<<<<<<<<<<<<
 * 
 *         # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
*/
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L24_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2113
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.access_second() == 0 and self.access_microsecond() == 0
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/pydt.py":2117
 * 
 *         # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_start_of_time(self):             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (!__pyx_f_7cytimes_5utils_dt_is_start_of_time(((PyDateTime_DateTime *)__pyx_v_self)));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2118
 *         # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_start_of_time(self):
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2117
 * 
 *         # Start of time - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_start_of_time(self):             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":2121
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
*/
  __pyx_t_9.__pyx_n = 2;
  __pyx_t_9.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_9.raise_error = 0;
  __pyx_t_8 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 2121, __pyx_L1_error)
  __pyx_v_val = __pyx_t_8;

  /* "cytimes/pydt.py":2122
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2123
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_first_dom(self)             # <<<<<<<<<<<<<<
 * 
 *         # Weekday name
*/
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0) == __pyx_v_val);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L28_bool_binop_done;
    }
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_is_first_dom(((PyDateTime_DateTime *)__pyx_v_self));
    __pyx_t_6 = __pyx_t_7;
    __pyx_L28_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2122
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_first_dom(self)
 * 
*/
  }

  /* "cytimes/pydt.py":2126
 * 
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_weekday() == val
*/
  __pyx_t_10.__pyx_n = 2;
  __pyx_t_10.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_10.raise_error = 0;
  __pyx_t_8 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 2126, __pyx_L1_error)
  __pyx_v_val = __pyx_t_8;

  /* "cytimes/pydt.py":2127
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_weekday() == val
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2128
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:
 *             return self.access_weekday() == val             # <<<<<<<<<<<<<<
 * 
 *         # Invalid
*/
    __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == __pyx_v_val);
    goto __pyx_L0;

    /* "cytimes/pydt.py":2127
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_weekday() == val
 * 
*/
  }

  /* "cytimes/pydt.py":2131
 * 
 *         # Invalid
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2037
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_start_of(self, unit: str) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_139is_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_138is_start_of, "Check whether date & time fileds are the start of the specified datetime unit `<'bool'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 Start of year: `YYYY-01-01 00:00:00`\n            - `'Q'`  \342\206\222 Start of quarter: `YYYY-MM-01 00:00:00`\n            - `'M'`  \342\206\222 Start of month: `YYYY-MM-01 00:00:00`\n            - `'W'`  \342\206\222 Start of week (Monday): `YYYY-MM-DD 00:00:00`\n            - `'D'`  \342\206\222 Start of day: `YYYY-MM-DD 00:00:00`\n            - `'h'`  \342\206\222 Start of hour: `YYYY-MM-DD hh:00:00`\n            - `'m'`  \342\206\222 Start of minute: `YYYY-MM-DD hh:mm:00`\n            - `'s'`  \342\206\222 Start of second: `YYYY-MM-DD hh:mm:ss.000000`\n            - `'ms'` \342\206\222 Start of millisecond: `YYYY-MM-DD hh:mm:ss.uuu000`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 Start of the specifed month: `YYYY-MM-01 00:00:00`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 Start of the specifed weekday: `YYYY-MM-DD 00:00:00`\n\n        :return `<'bool'>`: True if the instance is at the start\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_139is_start_of = {"is_start_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_139is_start_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_138is_start_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_139is_start_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_start_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2037, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2037, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_start_of", 0) < (0)) __PYX_ERR(0, 2037, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_start_of", 1, 1, 1, i); __PYX_ERR(0, 2037, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2037, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_start_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2037, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 2039, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_138is_start_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_138is_start_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("is_start_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_start_of(__pyx_v_self, __pyx_v_unit, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2037, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_start_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2133
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_end_of(self, unit: str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_141is_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_unit_len;
  Py_UCS4 __pyx_v_ch0;
  int __pyx_v_val;
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_end_of", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_end_of); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_141is_end_of)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2133, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2158
 *             of the specified datetime unit; Otherwise False.
 *         """
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2159
 *         """
 *         if unit is None:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2158
 *             of the specified datetime unit; Otherwise False.
 *         """
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":2162
 * 
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":2163
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
  __pyx_t_6 = (__pyx_v_unit_len == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2164
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . second
 *             if ch0 == "s":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":2166
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() == 999_999
 *             # . minute
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x73);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2167
 *             # . second
 *             if ch0 == "s":
 *                 return self.access_microsecond() == 999_999             # <<<<<<<<<<<<<<
 *             # . minute
 *             if ch0 == "m":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0xF423F);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2166
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
 *             if ch0 == "s":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() == 999_999
 *             # . minute
*/
    }

    /* "cytimes/pydt.py":2169
 *                 return self.access_microsecond() == 999_999
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_second() == 59 and self.access_microsecond() == 999_999
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2171
 *             if ch0 == "m":
 *                 return (
 *                     self.access_second() == 59 and self.access_microsecond() == 999_999             # <<<<<<<<<<<<<<
 *                 )
 *             # . hour
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 59);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0xF423F);
      __pyx_t_6 = __pyx_t_7;
      __pyx_L7_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2169
 *                 return self.access_microsecond() == 999_999
 *             # . minute
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_second() == 59 and self.access_microsecond() == 999_999
*/
    }

    /* "cytimes/pydt.py":2174
 *                 )
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_minute() == 59
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2176
 *             if ch0 == "h":
 *                 return (
 *                     self.access_minute() == 59             # <<<<<<<<<<<<<<
 *                     and self.access_second() == 59
 *                     and self.access_microsecond() == 999_999
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0) == 59);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L10_bool_binop_done;
      }

      /* "cytimes/pydt.py":2177
 *                 return (
 *                     self.access_minute() == 59
 *                     and self.access_second() == 59             # <<<<<<<<<<<<<<
 *                     and self.access_microsecond() == 999_999
 *                 )
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 59);
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L10_bool_binop_done;
      }

      /* "cytimes/pydt.py":2178
 *                     self.access_minute() == 59
 *                     and self.access_second() == 59
 *                     and self.access_microsecond() == 999_999             # <<<<<<<<<<<<<<
 *                 )
 *             # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
*/
      __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0xF423F);
      __pyx_t_6 = __pyx_t_7;
      __pyx_L10_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2174
 *                 )
 *             # . hour
 *             if ch0 == "h":             # <<<<<<<<<<<<<<
 *                 return (
 *                     self.access_minute() == 59
*/
    }

    /* "cytimes/pydt.py":2181
 *                 )
 *             # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_end_of_time(self):             # <<<<<<<<<<<<<<
 *                 return False
 *             # . day
*/
    __pyx_t_6 = (!__pyx_f_7cytimes_5utils_dt_is_end_of_time(((PyDateTime_DateTime *)__pyx_v_self)));
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2182
 *             # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_end_of_time(self):
 *                 return False             # <<<<<<<<<<<<<<
 *             # . day
 *             if ch0 == "D":
*/
      __pyx_r = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2181
 *                 )
 *             # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *             if not utils.dt_is_end_of_time(self):             # <<<<<<<<<<<<<<
 *                 return False
 *             # . day
*/
    }

    /* "cytimes/pydt.py":2184
 *                 return False
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return True
 *             # . week
*/
    __pyx_t_6 = (__pyx_v_ch0 == 68);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2185
 *             # . day
 *             if ch0 == "D":
 *                 return True             # <<<<<<<<<<<<<<
 *             # . week
 *             if ch0 == "W":
*/
      __pyx_r = 1;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2184
 *                 return False
 *             # . day
 *             if ch0 == "D":             # <<<<<<<<<<<<<<
 *                 return True
 *             # . week
*/
    }

    /* "cytimes/pydt.py":2187
 *                 return True
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 6
 *             # . month
*/
    __pyx_t_6 = (__pyx_v_ch0 == 87);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2188
 *             # . week
 *             if ch0 == "W":
 *                 return self.access_weekday() == 6             # <<<<<<<<<<<<<<
 *             # . month
 *             if ch0 == "M":
*/
      __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == 6);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2187
 *                 return True
 *             # . week
 *             if ch0 == "W":             # <<<<<<<<<<<<<<
 *                 return self.access_weekday() == 6
 *             # . month
*/
    }

    /* "cytimes/pydt.py":2190
 *                 return self.access_weekday() == 6
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
*/
    __pyx_t_6 = (__pyx_v_ch0 == 77);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2191
 *             # . month
 *             if ch0 == "M":
 *                 return utils.dt_is_last_dom(self)             # <<<<<<<<<<<<<<
 *             # . quarter
 *             if ch0 == "Q":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_dom(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2190
 *                 return self.access_weekday() == 6
 *             # . month
 *             if ch0 == "M":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
*/
    }

    /* "cytimes/pydt.py":2193
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doq(self)
 *             # . year
*/
    __pyx_t_6 = (__pyx_v_ch0 == 81);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2194
 *             # . quarter
 *             if ch0 == "Q":
 *                 return utils.dt_is_last_doq(self)             # <<<<<<<<<<<<<<
 *             # . year
 *             if ch0 == "Y":
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_doq(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2193
 *                 return utils.dt_is_last_dom(self)
 *             # . quarter
 *             if ch0 == "Q":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doq(self)
 *             # . year
*/
    }

    /* "cytimes/pydt.py":2196
 *                 return utils.dt_is_last_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doy(self)
 * 
*/
    __pyx_t_6 = (__pyx_v_ch0 == 89);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2197
 *             # . year
 *             if ch0 == "Y":
 *                 return utils.dt_is_last_doy(self)             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'ms', 'us', 'ns'
*/
      __pyx_r = __pyx_f_7cytimes_5utils_dt_is_last_doy(((PyDateTime_DateTime *)__pyx_v_self));
      goto __pyx_L0;

      /* "cytimes/pydt.py":2196
 *                 return utils.dt_is_last_doq(self)
 *             # . year
 *             if ch0 == "Y":             # <<<<<<<<<<<<<<
 *                 return utils.dt_is_last_doy(self)
 * 
*/
    }

    /* "cytimes/pydt.py":2163
 *         # Unit: 's', 'm', 'h', 'D', 'W', 'M', 'Q', 'Y'
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 1:             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . second
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":2200
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
  __pyx_t_7 = (__pyx_v_unit_len == 2);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_7 = (PyUnicode_READ_CHAR(__pyx_v_unit, 1) == 0x73);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L19_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2201
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)             # <<<<<<<<<<<<<<
 *             # . millisecond
 *             if ch0 == "m":
*/
    __pyx_v_ch0 = PyUnicode_READ_CHAR(__pyx_v_unit, 0);

    /* "cytimes/pydt.py":2203
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() % 1000 == 999
 *             # . microsecond / nanosecond
*/
    __pyx_t_6 = (__pyx_v_ch0 == 0x6D);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2204
 *             # . millisecond
 *             if ch0 == "m":
 *                 return self.access_microsecond() % 1000 == 999             # <<<<<<<<<<<<<<
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
*/
      __pyx_r = (__Pyx_mod_long(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0), 0x3E8, 1) == 0x3E7);
      goto __pyx_L0;

      /* "cytimes/pydt.py":2203
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
 *             if ch0 == "m":             # <<<<<<<<<<<<<<
 *                 return self.access_microsecond() % 1000 == 999
 *             # . microsecond / nanosecond
*/
    }

    /* "cytimes/pydt.py":2206
 *                 return self.access_microsecond() % 1000 == 999
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
    switch (__pyx_v_ch0) {
      case 0x75:
      case 0x6E:

      /* "cytimes/pydt.py":2207
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         # Unit: 'min' for pandas compatibility
*/
      __pyx_r = 1;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2206
 *                 return self.access_microsecond() % 1000 == 999
 *             # . microsecond / nanosecond
 *             if ch0 in ("u", "n"):             # <<<<<<<<<<<<<<
 *                 return True
 * 
*/
      break;
      default: break;
    }

    /* "cytimes/pydt.py":2200
 * 
 *         # Unit: 'ms', 'us', 'ns'
 *         elif unit_len == 2 and str_read(unit, 1) == "s":             # <<<<<<<<<<<<<<
 *             ch0: cython.Py_UCS4 = str_read(unit, 0)
 *             # . millisecond
*/
    goto __pyx_L4;
  }

  /* "cytimes/pydt.py":2210
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.access_second() == 59 and self.access_microsecond() == 999_999
 * 
*/
  __pyx_t_7 = (__pyx_v_unit_len == 3);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L22_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_mstate_global->__pyx_n_u_min, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2210, __pyx_L1_error)
  __pyx_t_6 = __pyx_t_7;
  __pyx_L22_bool_binop_done:;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2211
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":
 *             return self.access_second() == 59 and self.access_microsecond() == 999_999             # <<<<<<<<<<<<<<
 * 
 *         # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
*/
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0) == 59);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0) == 0xF423F);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L24_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2210
 * 
 *         # Unit: 'min' for pandas compatibility
 *         elif unit_len == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *             return self.access_second() == 59 and self.access_microsecond() == 999_999
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/pydt.py":2214
 * 
 *         # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_end_of_time(self):             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  __pyx_t_6 = (!__pyx_f_7cytimes_5utils_dt_is_end_of_time(((PyDateTime_DateTime *)__pyx_v_self)));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2215
 *         # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_end_of_time(self):
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         # Month name
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2214
 * 
 *         # End of time - - - - - - - - - - - - - - - - - - - - - - - - -
 *         if not utils.dt_is_end_of_time(self):             # <<<<<<<<<<<<<<
 *             return False
 * 
*/
  }

  /* "cytimes/pydt.py":2218
 * 
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
*/
  __pyx_t_9.__pyx_n = 2;
  __pyx_t_9.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_9.raise_error = 0;
  __pyx_t_8 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_unit, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 2218, __pyx_L1_error)
  __pyx_v_val = __pyx_t_8;

  /* "cytimes/pydt.py":2219
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2220
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:
 *             return self.access_month() == val and utils.dt_is_last_dom(self)             # <<<<<<<<<<<<<<
 * 
 *         # Weekday name
*/
    __pyx_t_7 = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0) == __pyx_v_val);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L28_bool_binop_done;
    }
    __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_is_last_dom(((PyDateTime_DateTime *)__pyx_v_self));
    __pyx_t_6 = __pyx_t_7;
    __pyx_L28_bool_binop_done:;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2219
 *         # Month name
 *         val: cython.int = _parse_month(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_month() == val and utils.dt_is_last_dom(self)
 * 
*/
  }

  /* "cytimes/pydt.py":2223
 * 
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)             # <<<<<<<<<<<<<<
 *         if val != -1:
 *             return self.access_weekday() == val
*/
  __pyx_t_10.__pyx_n = 2;
  __pyx_t_10.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_10.raise_error = 0;
  __pyx_t_8 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_unit, 0, &__pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 2223, __pyx_L1_error)
  __pyx_v_val = __pyx_t_8;

  /* "cytimes/pydt.py":2224
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_weekday() == val
 * 
*/
  __pyx_t_6 = (__pyx_v_val != -1L);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2225
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:
 *             return self.access_weekday() == val             # <<<<<<<<<<<<<<
 * 
 *         # Invalid
*/
    __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == __pyx_v_val);
    goto __pyx_L0;

    /* "cytimes/pydt.py":2224
 *         # Weekday name
 *         val: cython.int = _parse_weekday(unit, None, False)
 *         if val != -1:             # <<<<<<<<<<<<<<
 *             return self.access_weekday() == val
 * 
*/
  }

  /* "cytimes/pydt.py":2228
 * 
 *         # Invalid
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     # . round / ceil / floor
*/
  __pyx_r = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2133
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_end_of(self, unit: str) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_141is_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_140is_end_of, "Check whether date & time fileds are the end of the specified datetime unit `<'bool'>`.\n\n        :param unit `<'str'>`: The datetime unit:\n\n            - `'Y'`  \342\206\222 End of year: `YYYY-12-31 23:59:59.999999`\n            - `'Q'`  \342\206\222 End of quarter: `YYYY-MM-(30..31) 23:59:59.999999`\n            - `'M'`  \342\206\222 End of month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `'W'`  \342\206\222 End of week (Sunday): `YYYY-MM-DD 23:59:59.999999`\n            - `'D'`  \342\206\222 End of day: `YYYY-MM-DD 23:59:59.999999`\n            - `'h'`  \342\206\222 End of hour: `YYYY-MM-DD hh:59:59.999999`\n            - `'m'`  \342\206\222 End of minute: `YYYY-MM-DD hh:mm:59.999999`\n            - `'s'`  \342\206\222 End of second: `YYYY-MM-DD hh:mm:ss.999999`\n            - `'ms'` \342\206\222 End of millisecond: `YYYY-MM-DD hh:mm:ss.uuu999`\n            - `'us'` \342\206\222 Return the instance `as-is`.\n            - `Month` (e.g., `'Jan'`, `'February'`, `'\344\270\211\346\234\210'`)\n                     \342\206\222 End of the specifed month: `YYYY-MM-(28..31) 23:59:59.999999`\n            - `Weekday` (e.g., `'Mon'`, `'Tuesday'`, `'\346\230\237\346\234\237\344\270\211'`)\n                     \342\206\222 End of the specifed weekday: `YYYY-MM-DD 23:59:59.999999`\n\n        :return `<'bool'>`: True if the instance is at the end\n            of the specified datetime unit; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_141is_end_of = {"is_end_of", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_141is_end_of, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_140is_end_of};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_141is_end_of(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_end_of (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2133, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2133, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_end_of", 0) < (0)) __PYX_ERR(0, 2133, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_end_of", 1, 1, 1, i); __PYX_ERR(0, 2133, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2133, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_end_of", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2133, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 2135, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_140is_end_of(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_140is_end_of(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("is_end_of", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_end_of(__pyx_v_self, __pyx_v_unit, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2133, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_end_of", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2231
 * 
 *     # . round / ceil / floor
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def round(self, unit: str) -> _Pydt:
 *         """Perform round operation to the specified datetime unit `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_143round(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_round(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  PY_LONG_LONG __pyx_v_f;
  PY_LONG_LONG __pyx_v_ori_us;
  PY_LONG_LONG __pyx_v_new_us;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  PY_LONG_LONG __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("round", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_round); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_143round)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2231, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2243
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_6 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2245
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "round(unit)",
 *                 "Supports: 'D', 'h', 'm', 's', 'ms' or 'us'; got None.",
*/
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":2244
 *         # Guard
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "round(unit)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_round_unit;
    __pyx_t_7.error_msg = __pyx_mstate_global->__pyx_kp_u_Supports_D_h_m_s_ms_or_us_got_No;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2244, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/pydt.py":2243
 *         """
 *         # Guard
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pydt.py":2251
 * 
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)             # <<<<<<<<<<<<<<
 *         if f == 1:
 *             return self  # exit: no change
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __pyx_f_7cytimes_4pydt__parse_unit_factor(__pyx_t_1, __pyx_v_unit); if (unlikely(__pyx_t_8 == ((PY_LONG_LONG)-2LL))) __PYX_ERR(0, 2251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_f = __pyx_t_8;

  /* "cytimes/pydt.py":2252
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  __pyx_t_6 = (__pyx_v_f == 1);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2253
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:
 *             return self  # exit: no change             # <<<<<<<<<<<<<<
 * 
 *         # Round to unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2252
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  }

  /* "cytimes/pydt.py":2256
 * 
 *         # Round to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)             # <<<<<<<<<<<<<<
 *         new_us: cython.longlong = utils.math_div_even(ori_us, f) * f
 *         if new_us == ori_us:
*/
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.utc = 0;
  __pyx_t_8 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_9); if (unlikely(__pyx_t_8 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2256, __pyx_L1_error)
  __pyx_v_ori_us = __pyx_t_8;

  /* "cytimes/pydt.py":2257
 *         # Round to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_even(ori_us, f) * f             # <<<<<<<<<<<<<<
 *         if new_us == ori_us:
 *             return self  # exit: same value
*/
  __pyx_t_8 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_v_ori_us, __pyx_v_f, NULL); if (unlikely(__pyx_t_8 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2257, __pyx_L1_error)
  __pyx_v_new_us = (__pyx_t_8 * __pyx_v_f);

  /* "cytimes/pydt.py":2258
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_even(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  __pyx_t_6 = (__pyx_v_new_us == __pyx_v_ori_us);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2259
 *         new_us: cython.longlong = utils.math_div_even(ori_us, f) * f
 *         if new_us == ori_us:
 *             return self  # exit: same value             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2258
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_even(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  }

  /* "cytimes/pydt.py":2262
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":2263
 *         # New instance
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2263, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13.__pyx_n = 2;
      __pyx_t_13.tzinfo = __pyx_t_1;
      __pyx_t_13.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_new_us, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2263, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2263, __pyx_L6_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;

      /* "cytimes/pydt.py":2262
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    }
    __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_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2264
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
 * 
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 2264, __pyx_L8_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":2265
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2265, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7.__pyx_n = 4;
        __pyx_t_7.cls = __pyx_t_3;
        __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_round_unit;
        __pyx_t_7.error_msg = ((PyObject*)Py_None);
        __pyx_t_7.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2265, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cytimes/pydt.py":2264
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L18;
        }
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L8_except_error;
        }
        __pyx_L18:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cytimes/pydt.py":2262
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    __pyx_L8_except_error:;
    __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_L10_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_L7_exception_handled:;
    __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);
  }

  /* "cytimes/pydt.py":2231
 * 
 *     # . round / ceil / floor
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def round(self, unit: str) -> _Pydt:
 *         """Perform round operation to the specified datetime unit `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_143round(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_142round, "Perform round operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to round to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pd.Timestamp.round()\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_143round = {"round", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_143round, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_142round};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_143round(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("round (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2231, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2231, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "round", 0) < (0)) __PYX_ERR(0, 2231, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("round", 1, 1, 1, i); __PYX_ERR(0, 2231, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2231, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("round", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2231, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 2232, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_142round(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_142round(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("round", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_round(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2231, __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("cytimes.pydt._Pydt.round", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2267
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ceil(self, unit: str) -> _Pydt:
 *         """Perform ceil operation to the specified datetime unit `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_145ceil(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_ceil(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  PY_LONG_LONG __pyx_v_f;
  PY_LONG_LONG __pyx_v_ori_us;
  PY_LONG_LONG __pyx_v_new_us;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_12;
  int __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ceil", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ceil); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_145ceil)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2267, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2279
 *         """
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)             # <<<<<<<<<<<<<<
 *         if f == 1:
 *             return self  # exit: no change
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __pyx_f_7cytimes_4pydt__parse_unit_factor(__pyx_t_1, __pyx_v_unit); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-2LL))) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_f = __pyx_t_6;

  /* "cytimes/pydt.py":2280
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  __pyx_t_7 = (__pyx_v_f == 1);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2281
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:
 *             return self  # exit: no change             # <<<<<<<<<<<<<<
 * 
 *         # Ceil to unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2280
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  }

  /* "cytimes/pydt.py":2284
 * 
 *         # Ceil to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)             # <<<<<<<<<<<<<<
 *         new_us: cython.longlong = utils.math_div_ceil(ori_us, f) * f
 *         if new_us == ori_us:
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.utc = 0;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2284, __pyx_L1_error)
  __pyx_v_ori_us = __pyx_t_6;

  /* "cytimes/pydt.py":2285
 *         # Ceil to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_ceil(ori_us, f) * f             # <<<<<<<<<<<<<<
 *         if new_us == ori_us:
 *             return self  # exit: same value
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_math_div_ceil(__pyx_v_ori_us, __pyx_v_f, NULL); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2285, __pyx_L1_error)
  __pyx_v_new_us = (__pyx_t_6 * __pyx_v_f);

  /* "cytimes/pydt.py":2286
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_ceil(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  __pyx_t_7 = (__pyx_v_new_us == __pyx_v_ori_us);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2287
 *         new_us: cython.longlong = utils.math_div_ceil(ori_us, f) * f
 *         if new_us == ori_us:
 *             return self  # exit: same value             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2286
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_ceil(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  }

  /* "cytimes/pydt.py":2290
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":2291
 *         # New instance
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.tzinfo = __pyx_t_1;
      __pyx_t_12.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_new_us, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2291, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2291, __pyx_L5_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L9_try_return;

      /* "cytimes/pydt.py":2290
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    }
    __pyx_L5_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2292
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 2292, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":2293
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_t_3;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_ceil_unit;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2293, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cytimes/pydt.py":2292
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L17;
        }
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L7_except_error;
        }
        __pyx_L17:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;

    /* "cytimes/pydt.py":2290
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  }

  /* "cytimes/pydt.py":2267
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ceil(self, unit: str) -> _Pydt:
 *         """Perform ceil operation to the specified datetime unit `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_145ceil(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_144ceil, "Perform ceil operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to ceil to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pandas.Timestamp.ceil()\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_145ceil = {"ceil", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_145ceil, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_144ceil};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_145ceil(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ceil (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2267, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2267, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ceil", 0) < (0)) __PYX_ERR(0, 2267, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ceil", 1, 1, 1, i); __PYX_ERR(0, 2267, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2267, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ceil", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2267, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 2268, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_144ceil(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_144ceil(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("ceil", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_ceil(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2267, __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("cytimes.pydt._Pydt.ceil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2295
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def floor(self, unit: str) -> _Pydt:
 *         """Perform floor operation to the specified datetime unit `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_147floor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_floor(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit, int __pyx_skip_dispatch) {
  PY_LONG_LONG __pyx_v_f;
  PY_LONG_LONG __pyx_v_ori_us;
  PY_LONG_LONG __pyx_v_new_us;
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PY_LONG_LONG __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_12;
  int __pyx_t_13;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("floor", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_floor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_147floor)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_unit};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2295, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2307
 *         """
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)             # <<<<<<<<<<<<<<
 *         if f == 1:
 *             return self  # exit: no change
*/
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __pyx_f_7cytimes_4pydt__parse_unit_factor(__pyx_t_1, __pyx_v_unit); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-2LL))) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_f = __pyx_t_6;

  /* "cytimes/pydt.py":2308
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  __pyx_t_7 = (__pyx_v_f == 1);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2309
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:
 *             return self  # exit: no change             # <<<<<<<<<<<<<<
 * 
 *         # Floor to unit
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2308
 *         # Parse unit factor
 *         f: cython.longlong = _parse_unit_factor(self._cls(), unit)
 *         if f == 1:             # <<<<<<<<<<<<<<
 *             return self  # exit: no change
 * 
*/
  }

  /* "cytimes/pydt.py":2312
 * 
 *         # Floor to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)             # <<<<<<<<<<<<<<
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.utc = 0;
  __pyx_t_6 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2312, __pyx_L1_error)
  __pyx_v_ori_us = __pyx_t_6;

  /* "cytimes/pydt.py":2313
 *         # Floor to unit
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f             # <<<<<<<<<<<<<<
 *         if new_us == ori_us:
 *             return self  # exit: same value
*/
  __pyx_t_6 = __pyx_f_7cytimes_5utils_math_div_floor(__pyx_v_ori_us, __pyx_v_f, NULL); if (unlikely(__pyx_t_6 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2313, __pyx_L1_error)
  __pyx_v_new_us = (__pyx_t_6 * __pyx_v_f);

  /* "cytimes/pydt.py":2314
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  __pyx_t_7 = (__pyx_v_new_us == __pyx_v_ori_us);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2315
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:
 *             return self  # exit: same value             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2314
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  }

  /* "cytimes/pydt.py":2318
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":2319
 *         # New instance
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "floor(unit)", None, err)
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12.__pyx_n = 2;
      __pyx_t_12.tzinfo = __pyx_t_1;
      __pyx_t_12.dtclass = __pyx_t_2;
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_new_us, &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2319, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2319, __pyx_L5_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L9_try_return;

      /* "cytimes/pydt.py":2318
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    }
    __pyx_L5_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2320
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "floor(unit)", None, err)
 * 
*/
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 2320, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":2321
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "floor(unit)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . fsp (fractional seconds precision)
*/
        __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2321, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14.__pyx_n = 4;
        __pyx_t_14.cls = __pyx_t_3;
        __pyx_t_14.input_msg = __pyx_mstate_global->__pyx_kp_u_floor_unit;
        __pyx_t_14.error_msg = ((PyObject*)Py_None);
        __pyx_t_14.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2321, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cytimes/pydt.py":2320
 *         try:
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "floor(unit)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L17;
        }
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_13 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L7_except_error;
        }
        __pyx_L17:;
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6_exception_handled;
    }
    goto __pyx_L7_except_error;

    /* "cytimes/pydt.py":2318
 * 
 *         # New instance
 *         try:             # <<<<<<<<<<<<<<
 *             return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())
 *         except Exception as err:
*/
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
  }

  /* "cytimes/pydt.py":2295
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def floor(self, unit: str) -> _Pydt:
 *         """Perform floor operation to the specified datetime unit `<'Pydt'>`.
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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("cytimes.pydt._Pydt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_147floor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_146floor, "Perform floor operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to floor to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pandas.Timestamp.floor()\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_147floor = {"floor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_147floor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_146floor};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_147floor(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_unit = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("floor (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_unit,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2295, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2295, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "floor", 0) < (0)) __PYX_ERR(0, 2295, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("floor", 1, 1, 1, i); __PYX_ERR(0, 2295, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2295, __pyx_L3_error)
    }
    __pyx_v_unit = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("floor", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2295, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 2296, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_146floor(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_unit);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_146floor(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_unit) {
  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("floor", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_floor(__pyx_v_self, __pyx_v_unit, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __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("cytimes.pydt._Pydt.floor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2324
 * 
 *     # . fsp (fractional seconds precision)
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def fsp(self, precision: cython.int) -> _Pydt:
 *         """Adjust to the specified fractional seconds precision `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_149fsp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_fsp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_precision, int __pyx_skip_dispatch) {
  PY_LONG_LONG __pyx_v_f;
  PY_LONG_LONG __pyx_v_ori_us;
  PY_LONG_LONG __pyx_v_new_us;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_8;
  PY_LONG_LONG __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fsp", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_fsp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_149fsp)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_precision); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2324, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2337
 *         """
 *         # No change
 *         if precision >= 6:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 *         if precision < 0:
*/
  __pyx_t_7 = (__pyx_v_precision >= 6);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2338
 *         # No change
 *         if precision >= 6:
 *             return self  # exit: same value             # <<<<<<<<<<<<<<
 *         if precision < 0:
 *             errors.raise_argument_error(
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2337
 *         """
 *         # No change
 *         if precision >= 6:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 *         if precision < 0:
*/
  }

  /* "cytimes/pydt.py":2339
 *         if precision >= 6:
 *             return self  # exit: same value
 *         if precision < 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_7 = (__pyx_v_precision < 0);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2341
 *         if precision < 0:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "fsp(precision)",
 *                 "Fractional seconds precision must be "
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":2344
 *                 "fsp(precision)",
 *                 "Fractional seconds precision must be "
 *                 "between 0...6, instead got %d." % precision,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Fractional_seconds_precision_mus, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pydt.py":2340
 *             return self  # exit: same value
 *         if precision < 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "fsp(precision)",
*/
    __pyx_t_8.__pyx_n = 3;
    __pyx_t_8.cls = __pyx_t_1;
    __pyx_t_8.input_msg = __pyx_mstate_global->__pyx_kp_u_fsp_precision;
    __pyx_t_8.error_msg = ((PyObject*)__pyx_t_4);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2339
 *         if precision >= 6:
 *             return self  # exit: same value
 *         if precision < 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":2348
 * 
 *         # Adjust precision
 *         f: cython.longlong = int(10 ** (6 - precision))  # fsp factor             # <<<<<<<<<<<<<<
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
*/
  __pyx_v_f = ((PY_LONG_LONG)pow(10.0, ((double)(6 - __pyx_v_precision))));

  /* "cytimes/pydt.py":2349
 *         # Adjust precision
 *         f: cython.longlong = int(10 ** (6 - precision))  # fsp factor
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)             # <<<<<<<<<<<<<<
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:
*/
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.utc = 0;
  __pyx_t_9 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_10); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2349, __pyx_L1_error)
  __pyx_v_ori_us = __pyx_t_9;

  /* "cytimes/pydt.py":2350
 *         f: cython.longlong = int(10 ** (6 - precision))  # fsp factor
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f             # <<<<<<<<<<<<<<
 *         if new_us == ori_us:
 *             return self  # exit: same value
*/
  __pyx_t_9 = __pyx_f_7cytimes_5utils_math_div_floor(__pyx_v_ori_us, __pyx_v_f, NULL); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2350, __pyx_L1_error)
  __pyx_v_new_us = (__pyx_t_9 * __pyx_v_f);

  /* "cytimes/pydt.py":2351
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  __pyx_t_7 = (__pyx_v_new_us == __pyx_v_ori_us);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2352
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:
 *             return self  # exit: same value             # <<<<<<<<<<<<<<
 * 
 *         # New instance
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2351
 *         ori_us: cython.longlong = utils.dt_to_us(self, False)
 *         new_us: cython.longlong = utils.math_div_floor(ori_us, f) * f
 *         if new_us == ori_us:             # <<<<<<<<<<<<<<
 *             return self  # exit: same value
 * 
*/
  }

  /* "cytimes/pydt.py":2355
 * 
 *         # New instance
 *         return utils.dt_fr_us(new_us, self.access_tzinfo(), self._cls())             # <<<<<<<<<<<<<<
 * 
 *     # Calendar -----------------------------------------------------------------------------
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11.__pyx_n = 2;
  __pyx_t_11.tzinfo = __pyx_t_4;
  __pyx_t_11.dtclass = __pyx_t_1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_v_new_us, &__pyx_t_11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __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;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2355, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2324
 * 
 *     # . fsp (fractional seconds precision)
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def fsp(self, precision: cython.int) -> _Pydt:
 *         """Adjust to the specified fractional seconds precision `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.fsp", __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_7cytimes_4pydt_5_Pydt_149fsp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_148fsp, "Adjust to the specified fractional seconds precision `<'Pydt'>`.\n\n        :param precision `<'int'>`: The target fractional seconds precision (0-6).\n        :returns `<'Pydt'>`: The datetime with adjusted fractional seconds precision.\n\n        ## Example\n        >>> dt = Pydt(2024, 10, 15, 0, 12, 34, 456789)\n        >>> dt.fsp(3)  # Millisecond precision\n        >>> 2024-10-15 00:12:34.456000\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_149fsp = {"fsp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_149fsp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_148fsp};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_149fsp(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_precision;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fsp (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_precision,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2324, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2324, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fsp", 0) < (0)) __PYX_ERR(0, 2324, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fsp", 1, 1, 1, i); __PYX_ERR(0, 2324, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2324, __pyx_L3_error)
    }
    __pyx_v_precision = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_precision == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2325, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fsp", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2324, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fsp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_148fsp(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_precision);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_148fsp(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_precision) {
  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("fsp", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_fsp(__pyx_v_self, __pyx_v_precision, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __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("cytimes.pydt._Pydt.fsp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2359
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isocalendar(self) -> dict[str, int]:
 *         """Return the ISO calendar `<'dict'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_151isocalendar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_isocalendar(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  __pyx_t_7cytimes_5utils_iso __pyx_v__iso;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isocalendar", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_isocalendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_151isocalendar)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 2359, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":2367
 *         >>> {'year': 2024, 'week': 40, 'weekday': 2}
 *         """
 *         _iso = utils.ymd_isocalendar(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_v__iso = __pyx_f_7cytimes_5utils_ymd_isocalendar(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));

  /* "cytimes/pydt.py":2370
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
 *         return {"year": _iso.year, "week": _iso.week, "weekday": _iso.weekday}             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__iso.year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_year, __pyx_t_2) < (0)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__iso.week); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_week, __pyx_t_2) < (0)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v__iso.weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_t_2) < (0)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2359
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isocalendar(self) -> dict[str, int]:
 *         """Return the ISO calendar `<'dict'>`.
*/

  /* 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("cytimes.pydt._Pydt.isocalendar", __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_7cytimes_4pydt_5_Pydt_151isocalendar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_150isocalendar, "Return the ISO calendar `<'dict'>`.\n\n        ## Example\n        >>> dt.isocalendar()\n        >>> {'year': 2024, 'week': 40, 'weekday': 2}\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_151isocalendar = {"isocalendar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_151isocalendar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_150isocalendar};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_151isocalendar(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isocalendar (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("isocalendar", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("isocalendar", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_150isocalendar(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_150isocalendar(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("isocalendar", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_isocalendar(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __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("cytimes.pydt._Pydt.isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2372
 *         return {"year": _iso.year, "week": _iso.week, "weekday": _iso.weekday}
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoyear(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_153isoyear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoyear(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoyear", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_isoyear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_153isoyear)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2372, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2376
 *     def isoyear(self) -> cython.int:
 *         """Return the ISO calendar year (1-10000) `<'int'>`."""
 *         return utils.ymd_isoyear(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_isoyear(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2372
 *         return {"year": _iso.year, "week": _iso.week, "weekday": _iso.weekday}
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoyear(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_153isoyear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_152isoyear, "Return the ISO calendar year (1-10000) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_153isoyear = {"isoyear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_153isoyear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_152isoyear};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_153isoyear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoyear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("isoyear", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("isoyear", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_152isoyear(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_152isoyear(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("isoyear", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_isoyear(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2372, __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("cytimes.pydt._Pydt.isoyear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2380
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweek(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_155isoweek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoweek(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoweek", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_isoweek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_155isoweek)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2380, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2384
 *     def isoweek(self) -> cython.int:
 *         """Return the ISO calendar week number (1-53) `<'int'>`."""
 *         return utils.ymd_isoweek(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_isoweek(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2380
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweek(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_155isoweek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_154isoweek, "Return the ISO calendar week number (1-53) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_155isoweek = {"isoweek", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_155isoweek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_154isoweek};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_155isoweek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoweek (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("isoweek", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("isoweek", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_154isoweek(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_154isoweek(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("isoweek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_isoweek(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2380, __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("cytimes.pydt._Pydt.isoweek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2388
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweekday(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_157isoweekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_isoweekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isoweekday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_isoweekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_157isoweekday)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2388, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2392
 *     def isoweekday(self) -> cython.int:
 *         """Return the ISO calendar weekday (1=Mon...7=Sun) `<'int'>`."""
 *         return utils.ymd_isoweekday(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_isoweekday(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2388
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweekday(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_157isoweekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_156isoweekday, "Return the ISO calendar weekday (1=Mon...7=Sun) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_157isoweekday = {"isoweekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_157isoweekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_156isoweekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_157isoweekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isoweekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("isoweekday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("isoweekday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_156isoweekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_156isoweekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("isoweekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_isoweekday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2388, __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("cytimes.pydt._Pydt.isoweekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2397
 * 
 *     # . year
 *     @property             # <<<<<<<<<<<<<<
 *     def year(self) -> int:
 *         """The year (1-9999) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4year_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4year_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_4year___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4year___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2400
 *     def year(self) -> int:
 *         """The year (1-9999) `<'int'>`."""
 *         return datetime.datetime_year(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_year(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2397
 * 
 *     # . year
 *     @property             # <<<<<<<<<<<<<<
 *     def year(self) -> int:
 *         """The year (1-9999) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.year.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2402
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_year(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_159access_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_159access_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2402, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2406
 *     def access_year(self) -> cython.int:
 *         """Return the year (1-9999) `<'int'>`."""
 *         return datetime.datetime_year(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_year(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2402
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_year(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_159access_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_158access_year, "Return the year (1-9999) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_159access_year = {"access_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_159access_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_158access_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_159access_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_158access_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_158access_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __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("cytimes.pydt._Pydt.access_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2408
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_year(self, year: cython.int) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_161is_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_skip_dispatch) {
  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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_161is_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2408, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2412
 *     def is_year(self, year: cython.int) -> cython.bint:
 *         """Check whether is the exact `year` `<'bool'>."""
 *         return self.access_year() == year             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0) == __pyx_v_year);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2408
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_year(self, year: cython.int) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_161is_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_160is_year, "Check whether is the exact `year` `<'bool'>.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_161is_year = {"is_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_161is_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_160is_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_161is_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_year;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2408, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2408, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_year", 0) < (0)) __PYX_ERR(0, 2408, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_year", 1, 1, 1, i); __PYX_ERR(0, 2408, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2408, __pyx_L3_error)
    }
    __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2410, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2408, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_160is_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_year);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_160is_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_year(__pyx_v_self, __pyx_v_year, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2408, __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("cytimes.pydt._Pydt.is_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2414
 *         return self.access_year() == year
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_leap_year(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_163is_leap_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_leap_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_leap_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_leap_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_163is_leap_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2414, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2414, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2418
 *     def is_leap_year(self) -> cython.bint:
 *         """Check whether is in a leap year `<'bool'>`."""
 *         return utils.is_leap_year(self.access_year())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_is_leap_year(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2414
 *         return self.access_year() == year
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_leap_year(self) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_163is_leap_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_162is_leap_year, "Check whether is in a leap year `<'bool'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_163is_leap_year = {"is_leap_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_163is_leap_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_162is_leap_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_163is_leap_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_leap_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_leap_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_leap_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_162is_leap_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_162is_leap_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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_leap_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_leap_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __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("cytimes.pydt._Pydt.is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2420
 *         return utils.is_leap_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_long_year(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_165is_long_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_long_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_long_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_long_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_165is_long_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2427
 *         - Long year: maximum ISO week number is 53.
 *         """
 *         return utils.is_long_year(self.access_year())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_is_long_year(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2420
 *         return utils.is_leap_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_long_year(self) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_165is_long_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_164is_long_year, "Check whether is in a long year `<'bool'>`.\n\n        - Long year: maximum ISO week number is 53.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_165is_long_year = {"is_long_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_165is_long_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_164is_long_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_165is_long_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_long_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_long_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_long_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_164is_long_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_164is_long_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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_long_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_long_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __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("cytimes.pydt._Pydt.is_long_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2429
 *         return utils.is_long_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def leap_bt_year(self, year: cython.int) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_167leap_bt_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_leap_bt_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year, int __pyx_skip_dispatch) {
  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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("leap_bt_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_leap_bt_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_167leap_bt_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2429, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2429, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2433
 *     def leap_bt_year(self, year: cython.int) -> cython.int:
 *         """Compute the total number of leap years between `year` and instance `<'int'>`."""
 *         return utils.leaps_bt_years(self.access_year(), year)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_leaps_bt_years(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), __pyx_v_year);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2429
 *         return utils.is_long_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def leap_bt_year(self, year: cython.int) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.leap_bt_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_167leap_bt_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_166leap_bt_year, "Compute the total number of leap years between `year` and instance `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_167leap_bt_year = {"leap_bt_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_167leap_bt_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_166leap_bt_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_167leap_bt_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_year;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("leap_bt_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_year,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2429, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2429, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "leap_bt_year", 0) < (0)) __PYX_ERR(0, 2429, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("leap_bt_year", 1, 1, 1, i); __PYX_ERR(0, 2429, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2429, __pyx_L3_error)
    }
    __pyx_v_year = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2431, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("leap_bt_year", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2429, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.leap_bt_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_166leap_bt_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_year);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_166leap_bt_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_year) {
  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("leap_bt_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_leap_bt_year(__pyx_v_self, __pyx_v_year, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2429, __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("cytimes.pydt._Pydt.leap_bt_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2435
 *         return utils.leaps_bt_years(self.access_year(), year)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_year(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_169days_in_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_in_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2435, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_169days_in_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2435, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2435, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2439
 *     def days_in_year(self) -> cython.int:
 *         """Return the maximum number of days (365, 366) in the year `<'int'>`."""
 *         return utils.days_in_year(self.access_year())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_in_year(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2435
 *         return utils.leaps_bt_years(self.access_year(), year)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_year(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_169days_in_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_168days_in_year, "Return the maximum number of days (365, 366) in the year `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_169days_in_year = {"days_in_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_169days_in_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_168days_in_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_169days_in_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_in_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_in_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_168days_in_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_168days_in_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_in_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_in_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2435, __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("cytimes.pydt._Pydt.days_in_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2441
 *         return utils.days_in_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_year(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_171days_bf_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_bf_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_171days_bf_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2445
 *     def days_bf_year(self) -> cython.int:
 *         """Return the number of days strictly before January 1 of year `<'int'>`."""
 *         return utils.days_bf_year(self.access_year())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_bf_year(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2441
 *         return utils.days_in_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_year(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_171days_bf_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_170days_bf_year, "Return the number of days strictly before January 1 of year `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_171days_bf_year = {"days_bf_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_171days_bf_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_170days_bf_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_171days_bf_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_bf_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_bf_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_170days_bf_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_170days_bf_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_bf_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __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("cytimes.pydt._Pydt.days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2447
 *         return utils.days_bf_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_year(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_173day_of_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_year", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_day_of_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_173day_of_year)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2447, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2451
 *     def day_of_year(self) -> cython.int:
 *         """Return the number of days since the 1st day of the year `<'int'>`."""
 *         return utils.day_of_year(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_day_of_year(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2447
 *         return utils.days_bf_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_year(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_173day_of_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_172day_of_year, "Return the number of days since the 1st day of the year `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_173day_of_year = {"day_of_year", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_173day_of_year, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_172day_of_year};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_173day_of_year(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_year (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("day_of_year", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("day_of_year", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_172day_of_year(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_172day_of_year(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("day_of_year", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_day_of_year(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __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("cytimes.pydt._Pydt.day_of_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2456
 * 
 *     # . quarter
 *     @property             # <<<<<<<<<<<<<<
 *     def quarter(self) -> int:
 *         """The quarter (1-4) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7quarter_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7quarter_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_7quarter___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_7quarter___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2459
 *     def quarter(self) -> int:
 *         """The quarter (1-4) `<'int'>`."""
 *         return self.access_quarter()             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_quarter(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2456
 * 
 *     # . quarter
 *     @property             # <<<<<<<<<<<<<<
 *     def quarter(self) -> int:
 *         """The quarter (1-4) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.quarter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2461
 *         return self.access_quarter()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_quarter(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_175access_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_quarter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_175access_quarter)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2461, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2461, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2465
 *     def access_quarter(self) -> cython.int:
 *         """Return the quarter (1-4) `<'int'>`."""
 *         return utils.quarter_of_month(self.access_month())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_quarter_of_month(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2461
 *         return self.access_quarter()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_quarter(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_175access_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_174access_quarter, "Return the quarter (1-4) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_175access_quarter = {"access_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_175access_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_174access_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_175access_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_quarter", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_quarter", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_174access_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_174access_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_quarter(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2461, __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("cytimes.pydt._Pydt.access_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2467
 *         return utils.quarter_of_month(self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_quarter(self, quarter: cython.int) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_177is_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_quarter, int __pyx_skip_dispatch) {
  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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_quarter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_177is_quarter)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_quarter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2467, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2467, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2471
 *     def is_quarter(self, quarter: cython.int) -> cython.bint:
 *         """Check whether is the exact `quarter` `<'bool'>`."""
 *         return self.access_quarter() == quarter             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_quarter(__pyx_v_self, 0) == __pyx_v_quarter);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2467
 *         return utils.quarter_of_month(self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_quarter(self, quarter: cython.int) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_177is_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_176is_quarter, "Check whether is the exact `quarter` `<'bool'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_177is_quarter = {"is_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_177is_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_176is_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_177is_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_quarter;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_quarter,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2467, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2467, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_quarter", 0) < (0)) __PYX_ERR(0, 2467, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_quarter", 1, 1, 1, i); __PYX_ERR(0, 2467, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2467, __pyx_L3_error)
    }
    __pyx_v_quarter = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_quarter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2469, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_quarter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2467, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_176is_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_quarter);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_176is_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_quarter) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_quarter(__pyx_v_self, __pyx_v_quarter, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2467, __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("cytimes.pydt._Pydt.is_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2473
 *         return self.access_quarter() == quarter
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_quarter(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_179days_in_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_quarter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_in_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_179days_in_quarter)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2473, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2477
 *     def days_in_quarter(self) -> cython.int:
 *         """Return the maximum number of days (90-92) in the quarter `<'int'>`."""
 *         return utils.days_in_quarter(self.access_year(), self.access_month())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_in_quarter(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2473
 *         return self.access_quarter() == quarter
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_quarter(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_179days_in_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_178days_in_quarter, "Return the maximum number of days (90-92) in the quarter `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_179days_in_quarter = {"days_in_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_179days_in_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_178days_in_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_179days_in_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_in_quarter", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_in_quarter", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_178days_in_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_178days_in_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_in_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_in_quarter(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __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("cytimes.pydt._Pydt.days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2479
 *         return utils.days_in_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_quarter(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_181days_bf_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_quarter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_bf_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_181days_bf_quarter)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2479, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2485
 *         of the calendar quarter `<'int'>`.
 *         """
 *         return utils.days_bf_quarter(self.access_year(), self.access_month())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_bf_quarter(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2479
 *         return utils.days_in_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_quarter(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_181days_bf_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_180days_bf_quarter, "Return the number of days strictly before the first day\n        of the calendar quarter `<'int'>`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_181days_bf_quarter = {"days_bf_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_181days_bf_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_180days_bf_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_181days_bf_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_bf_quarter", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_bf_quarter", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_180days_bf_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_180days_bf_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_bf_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_quarter(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __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("cytimes.pydt._Pydt.days_bf_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2487
 *         return utils.days_bf_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_quarter(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_183day_of_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_quarter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_day_of_quarter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_183day_of_quarter)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2487, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2487, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2491
 *     def day_of_quarter(self) -> cython.int:
 *         """Return the number of days since the 1st day of the quarter `<'int'>`."""
 *         return utils.day_of_quarter(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_day_of_quarter(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2487
 *         return utils.days_bf_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_quarter(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_183day_of_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_182day_of_quarter, "Return the number of days since the 1st day of the quarter `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_183day_of_quarter = {"day_of_quarter", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_183day_of_quarter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_182day_of_quarter};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_183day_of_quarter(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_quarter (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("day_of_quarter", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("day_of_quarter", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_182day_of_quarter(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_182day_of_quarter(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("day_of_quarter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_day_of_quarter(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __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("cytimes.pydt._Pydt.day_of_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2496
 * 
 *     # . month
 *     @property             # <<<<<<<<<<<<<<
 *     def month(self) -> int:
 *         """The month (1-12) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_5month_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_5month_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_5month___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_5month___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2499
 *     def month(self) -> int:
 *         """The month (1-12) `<'int'>`."""
 *         return datetime.datetime_month(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_month(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2496
 * 
 *     # . month
 *     @property             # <<<<<<<<<<<<<<
 *     def month(self) -> int:
 *         """The month (1-12) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2501
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_month(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_185access_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_month", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_185access_month)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2501, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2501, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2505
 *     def access_month(self) -> cython.int:
 *         """Return the month (1-12) `<'int'>`."""
 *         return datetime.datetime_month(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_month(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2501
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_month(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_185access_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_184access_month, "Return the month (1-12) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_185access_month = {"access_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_185access_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_184access_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_185access_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_month", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_month", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_184access_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_184access_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_month(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2501, __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("cytimes.pydt._Pydt.access_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2507
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_month(self, month: int | str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_187is_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_month __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_month", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_187is_month)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_month};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2507, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2520
 *             with the instance's month; Otherwise False.
 *         """
 *         return self.access_month() == _parse_month(month, None, False)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 0;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_month(__pyx_v_month, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 2520, __pyx_L1_error)
  __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0) == __pyx_t_7);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2507
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_month(self, month: int | str) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_187is_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_186is_month, "Check whether is the exact `month` `<'bool'>`.\n\n        :param month `<'int/str'>`: Month value.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n\n        :return `<'bool'>`: True if `month` is recognized and matched\n            with the instance's month; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_187is_month = {"is_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_187is_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_186is_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_187is_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_month = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_month,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2507, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2507, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_month", 0) < (0)) __PYX_ERR(0, 2507, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_month", 1, 1, 1, i); __PYX_ERR(0, 2507, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2507, __pyx_L3_error)
    }
    __pyx_v_month = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_month", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_186is_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_month);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_186is_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_month) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_month(__pyx_v_self, __pyx_v_month, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2507, __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("cytimes.pydt._Pydt.is_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2522
 *         return self.access_month() == _parse_month(month, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_month(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_189days_in_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_in_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_in_month", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_in_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_189days_in_month)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2522, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2526
 *     def days_in_month(self) -> cython.int:
 *         """Return the maximum number of days (28-31) in the month `<'int'>`."""
 *         return utils.days_in_month(self.access_year(), self.access_month())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_in_month(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2522
 *         return self.access_month() == _parse_month(month, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_month(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_189days_in_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_188days_in_month, "Return the maximum number of days (28-31) in the month `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_189days_in_month = {"days_in_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_189days_in_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_188days_in_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_189days_in_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_in_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_in_month", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_in_month", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_188days_in_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_188days_in_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_in_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_in_month(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __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("cytimes.pydt._Pydt.days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2528
 *         return utils.days_in_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_month(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_191days_bf_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_days_bf_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("days_bf_month", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_days_bf_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_191days_bf_month)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2528, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2528, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2534
 *         of the calendar month `<'int'>`.
 *         """
 *         return utils.days_bf_month(self.access_year(), self.access_month())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cytimes_5utils_days_bf_month(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2528
 *         return utils.days_in_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_month(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_191days_bf_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_190days_bf_month, "Return the number of days strictly before the first day\n        of the calendar month `<'int'>`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_191days_bf_month = {"days_bf_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_191days_bf_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_190days_bf_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_191days_bf_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("days_bf_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("days_bf_month", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("days_bf_month", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_190days_bf_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_190days_bf_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("days_bf_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_month(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2528, __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("cytimes.pydt._Pydt.days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2536
 *         return utils.days_bf_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_month(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_193day_of_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_day_of_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("day_of_month", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_day_of_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_193day_of_month)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2536, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2536, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2544
 *         >>> dt.day
 *         """
 *         return self.access_day()             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2536
 *         return utils.days_bf_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_month(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.day_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_193day_of_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_192day_of_month, "Return the number of days since the 1st day of the month `<'int'>`.\n\n        ## Equivalent\n        >>> dt.day\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_193day_of_month = {"day_of_month", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_193day_of_month, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_192day_of_month};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_193day_of_month(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("day_of_month (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("day_of_month", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("day_of_month", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_192day_of_month(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_192day_of_month(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("day_of_month", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_day_of_month(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __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("cytimes.pydt._Pydt.day_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2546
 *         return self.access_day()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def month_name(self, locale: object = None) -> str:
 *         """Return the month name with specified locale `<'str'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_195month_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_month_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name *__pyx_optional_args) {

  /* "cytimes/pydt.py":2547
 * 
 *     @cython.ccall
 *     def month_name(self, locale: object = None) -> str:             # <<<<<<<<<<<<<<
 *         """Return the month name with specified locale `<'str'>`.
 * 
*/
  PyObject *__pyx_v_locale = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("month_name", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_locale = __pyx_optional_args->locale;
    }
  }
  __Pyx_INCREF(__pyx_v_locale);

  /* "cytimes/pydt.py":2546
 *         return self.access_day()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def month_name(self, locale: object = None) -> str:
 *         """Return the month name with specified locale `<'str'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_month_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_195month_name)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_locale};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2546, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":2559
 *         :return `<'str'>`: The month name.
 *         """
 *         if locale is None:             # <<<<<<<<<<<<<<
 *             locale = "en_US"
 *         try:
*/
  __pyx_t_6 = (__pyx_v_locale == Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2560
 *         """
 *         if locale is None:
 *             locale = "en_US"             # <<<<<<<<<<<<<<
 *         try:
 *             return _format_date(self, format="MMMM", locale=locale)
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_en_US);
    __Pyx_DECREF_SET(__pyx_v_locale, __pyx_mstate_global->__pyx_n_u_en_US);

    /* "cytimes/pydt.py":2559
 *         :return `<'str'>`: The month name.
 *         """
 *         if locale is None:             # <<<<<<<<<<<<<<
 *             locale = "en_US"
 *         try:
*/
  }

  /* "cytimes/pydt.py":2561
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pydt.py":2562
 *             locale = "en_US"
 *         try:
 *             return _format_date(self, format="MMMM", locale=locale)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "month_name(locale)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_format_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2562, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_format, __pyx_mstate_global->__pyx_n_u_MMMM, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2562, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_locale, __pyx_v_locale, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2562, __pyx_L4_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2562, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 2562, __pyx_L4_error)
      __pyx_r = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/pydt.py":2561
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:
*/
    }
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2563
 *         try:
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "month_name(locale)", None, err)
 * 
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 2563, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_err = __pyx_t_4;
      /*try:*/ {

        /* "cytimes/pydt.py":2564
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "month_name(locale)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . weekday
*/
        __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2564, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11.__pyx_n = 4;
        __pyx_t_11.cls = __pyx_t_2;
        __pyx_t_11.input_msg = __pyx_mstate_global->__pyx_kp_u_month_name_locale;
        __pyx_t_11.error_msg = ((PyObject*)Py_None);
        __pyx_t_11.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2564, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "cytimes/pydt.py":2563
 *         try:
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "month_name(locale)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L16;
        }
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
          goto __pyx_L6_except_error;
        }
        __pyx_L16:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/pydt.py":2561
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="MMMM", locale=locale)
 *         except Exception as err:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  }

  /* "cytimes/pydt.py":2546
 *         return self.access_day()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def month_name(self, locale: object = None) -> str:
 *         """Return the month name with specified locale `<'str'>`.
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_locale);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_195month_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_194month_name, "Return the month name with specified locale `<'str'>`.\n\n        :param locale `<'str/None'>`: The locale to use for month name. Defaults to `None`.\n\n            - Locale determining the language in which to return the month name.\n              If `None` uses English locale (`'en_US'`).\n            - Use the command `locale -a` on Unix systems terminal to\n              find locale language code.\n\n        :return `<'str'>`: The month name.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_195month_name = {"month_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_195month_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_194month_name};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_195month_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_locale = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("month_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_locale,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2546, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2546, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "month_name", 0) < (0)) __PYX_ERR(0, 2546, __pyx_L3_error)

      /* "cytimes/pydt.py":2547
 * 
 *     @cython.ccall
 *     def month_name(self, locale: object = None) -> str:             # <<<<<<<<<<<<<<
 *         """Return the month name with specified locale `<'str'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2546, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_locale = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("month_name", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2546, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_194month_name(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_locale);

  /* "cytimes/pydt.py":2546
 *         return self.access_day()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def month_name(self, locale: object = None) -> str:
 *         """Return the month name with specified locale `<'str'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_194month_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_locale) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("month_name", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.locale = __pyx_v_locale;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->month_name(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __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("cytimes.pydt._Pydt.month_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2567
 * 
 *     # . weekday
 *     @property             # <<<<<<<<<<<<<<
 *     def weekday(self) -> int:
 *         """The weekday (0=Mon...6=Sun) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7weekday_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_7weekday_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_7weekday___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_7weekday___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2570
 *     def weekday(self) -> int:
 *         """The weekday (0=Mon...6=Sun) `<'int'>`."""
 *         return self.access_weekday()             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2567
 * 
 *     # . weekday
 *     @property             # <<<<<<<<<<<<<<
 *     def weekday(self) -> int:
 *         """The weekday (0=Mon...6=Sun) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.weekday.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2572
 *         return self.access_weekday()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_weekday(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_197access_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_weekday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_197access_weekday)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2572, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2576
 *     def access_weekday(self) -> cython.int:
 *         """Return the weekday (0=Mon...6=Sun) `<'int'>`."""
 *         return utils.ymd_weekday(             # <<<<<<<<<<<<<<
 *             self.access_year(), self.access_month(), self.access_day()
 *         )
*/
  __pyx_r = __pyx_f_7cytimes_5utils_ymd_weekday(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0), ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2572
 *         return self.access_weekday()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_weekday(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_197access_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_196access_weekday, "Return the weekday (0=Mon...6=Sun) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_197access_weekday = {"access_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_197access_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_196access_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_197access_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_weekday", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_weekday", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_196access_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_196access_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_weekday(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __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("cytimes.pydt._Pydt.access_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2580
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_weekday(self, weekday: int | str) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_199is_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_6parser_parse_weekday __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_weekday", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_199is_weekday)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_weekday};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2580, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2593
 *             with the instance's weekday; Otherwise False.
 *         """
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
  __pyx_t_8.raise_error = 0;
  __pyx_t_7 = __pyx_f_7cytimes_6parser_parse_weekday(__pyx_v_weekday, 0, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-2))) __PYX_ERR(0, 2593, __pyx_L1_error)
  __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_weekday(__pyx_v_self, 0) == __pyx_t_7);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2580
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_weekday(self, weekday: int | str) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_199is_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_198is_weekday, "Check whether is the exact `weekday` `<'bool'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n\n        :return `<'bool'>`: True if `weekday` is recognized and matched\n            with the instance's weekday; Otherwise False.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_199is_weekday = {"is_weekday", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_199is_weekday, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_198is_weekday};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_199is_weekday(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_weekday = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_weekday (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_weekday,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2580, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2580, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_weekday", 0) < (0)) __PYX_ERR(0, 2580, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_weekday", 1, 1, 1, i); __PYX_ERR(0, 2580, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2580, __pyx_L3_error)
    }
    __pyx_v_weekday = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_weekday", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2580, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_198is_weekday(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_weekday);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_198is_weekday(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_weekday) {
  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_weekday", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_weekday(__pyx_v_self, __pyx_v_weekday, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2580, __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("cytimes.pydt._Pydt.is_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2595
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def weekday_name(self, locale: object = None) -> str:
 *         """Return the weekday name with specified locale `<'str'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_201weekday_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_weekday_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name *__pyx_optional_args) {

  /* "cytimes/pydt.py":2596
 * 
 *     @cython.ccall
 *     def weekday_name(self, locale: object = None) -> str:             # <<<<<<<<<<<<<<
 *         """Return the weekday name with specified locale `<'str'>`.
 * 
*/
  PyObject *__pyx_v_locale = ((PyObject *)Py_None);
  PyObject *__pyx_v_err = 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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("weekday_name", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_locale = __pyx_optional_args->locale;
    }
  }
  __Pyx_INCREF(__pyx_v_locale);

  /* "cytimes/pydt.py":2595
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def weekday_name(self, locale: object = None) -> str:
 *         """Return the weekday name with specified locale `<'str'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_weekday_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_201weekday_name)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_locale};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2595, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2595, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":2608
 *         :return `<'str'>`: The weekday name.
 *         """
 *         if locale is None:             # <<<<<<<<<<<<<<
 *             locale = "en_US"
 *         try:
*/
  __pyx_t_6 = (__pyx_v_locale == Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2609
 *         """
 *         if locale is None:
 *             locale = "en_US"             # <<<<<<<<<<<<<<
 *         try:
 *             return _format_date(self, format="EEEE", locale=locale)
*/
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_en_US);
    __Pyx_DECREF_SET(__pyx_v_locale, __pyx_mstate_global->__pyx_n_u_en_US);

    /* "cytimes/pydt.py":2608
 *         :return `<'str'>`: The weekday name.
 *         """
 *         if locale is None:             # <<<<<<<<<<<<<<
 *             locale = "en_US"
 *         try:
*/
  }

  /* "cytimes/pydt.py":2610
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/pydt.py":2611
 *             locale = "en_US"
 *         try:
 *             return _format_date(self, format="EEEE", locale=locale)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "weekday_name(locale)", None, err)
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_format_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2611, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_format, __pyx_mstate_global->__pyx_n_u_EEEE, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2611, __pyx_L4_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_locale, __pyx_v_locale, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2611, __pyx_L4_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 2611, __pyx_L4_error)
      __pyx_r = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/pydt.py":2610
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:
*/
    }
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":2612
 *         try:
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "weekday_name(locale)", None, err)
 * 
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_10) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 2612, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_err = __pyx_t_4;
      /*try:*/ {

        /* "cytimes/pydt.py":2613
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "weekday_name(locale)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     # . day
*/
        __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2613, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11.__pyx_n = 4;
        __pyx_t_11.cls = __pyx_t_2;
        __pyx_t_11.input_msg = __pyx_mstate_global->__pyx_kp_u_weekday_name_locale;
        __pyx_t_11.error_msg = ((PyObject*)Py_None);
        __pyx_t_11.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2613, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "cytimes/pydt.py":2612
 *         try:
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "weekday_name(locale)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L16;
        }
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
          goto __pyx_L6_except_error;
        }
        __pyx_L16:;
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/pydt.py":2610
 *         if locale is None:
 *             locale = "en_US"
 *         try:             # <<<<<<<<<<<<<<
 *             return _format_date(self, format="EEEE", locale=locale)
 *         except Exception as err:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
  }

  /* "cytimes/pydt.py":2595
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def weekday_name(self, locale: object = None) -> str:
 *         """Return the weekday name with specified locale `<'str'>`.
*/

  /* function exit code */
  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_locale);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_201weekday_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_200weekday_name, "Return the weekday name with specified locale `<'str'>`.\n\n        :param locale `<'str/None'>`: The locale to use for weekday name. Defaults to `None`.\n\n            - Locale determining the language in which to return the weekday name.\n              If `None` uses English locale (`'en_US'`).\n            - Use the command `locale -a` on Unix systems terminal to\n              find locale language code.\n\n        :return `<'str'>`: The weekday name.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_201weekday_name = {"weekday_name", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_201weekday_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_200weekday_name};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_201weekday_name(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_locale = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("weekday_name (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_locale,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2595, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2595, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "weekday_name", 0) < (0)) __PYX_ERR(0, 2595, __pyx_L3_error)

      /* "cytimes/pydt.py":2596
 * 
 *     @cython.ccall
 *     def weekday_name(self, locale: object = None) -> str:             # <<<<<<<<<<<<<<
 *         """Return the weekday name with specified locale `<'str'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2595, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_locale = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("weekday_name", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2595, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_200weekday_name(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_locale);

  /* "cytimes/pydt.py":2595
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def weekday_name(self, locale: object = None) -> str:
 *         """Return the weekday name with specified locale `<'str'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_200weekday_name(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_locale) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("weekday_name", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.locale = __pyx_v_locale;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->weekday_name(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2595, __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("cytimes.pydt._Pydt.weekday_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2616
 * 
 *     # . day
 *     @property             # <<<<<<<<<<<<<<
 *     def day(self) -> int:
 *         """The day (1-31) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_3day_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_3day_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_3day___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_3day___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2619
 *     def day(self) -> int:
 *         """The day (1-31) `<'int'>`."""
 *         return datetime.datetime_day(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_day(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2616
 * 
 *     # . day
 *     @property             # <<<<<<<<<<<<<<
 *     def day(self) -> int:
 *         """The day (1-31) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.day.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2621
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_day(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_203access_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_day", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_203access_day)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2621, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2625
 *     def access_day(self) -> cython.int:
 *         """Return the day (1-31) `<'int'>`."""
 *         return datetime.datetime_day(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_day(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2621
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_day(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_day", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_203access_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_202access_day, "Return the day (1-31) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_203access_day = {"access_day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_203access_day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_202access_day};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_203access_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_day", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_day", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_202access_day(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_202access_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_day", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_day(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __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("cytimes.pydt._Pydt.access_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2627
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_day(self, day: cython.int) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_205is_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_day, int __pyx_skip_dispatch) {
  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;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_day", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_205is_day)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2627, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2627, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2631
 *     def is_day(self, day: cython.int) -> cython.bint:
 *         """Check whether is the exact `day` `<'bool'>`."""
 *         return self.access_day() == day             # <<<<<<<<<<<<<<
 * 
 *     # . time
*/
  __pyx_r = (((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0) == __pyx_v_day);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2627
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_day(self, day: cython.int) -> cython.bint:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.is_day", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_205is_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_204is_day, "Check whether is the exact `day` `<'bool'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_205is_day = {"is_day", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_205is_day, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_204is_day};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_205is_day(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_day;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_day (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_day,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2627, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2627, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_day", 0) < (0)) __PYX_ERR(0, 2627, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_day", 1, 1, 1, i); __PYX_ERR(0, 2627, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2627, __pyx_L3_error)
    }
    __pyx_v_day = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2629, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_day", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2627, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_204is_day(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_day);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_204is_day(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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("is_day", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7cytimes_4pydt_5_Pydt_is_day(__pyx_v_self, __pyx_v_day, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __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("cytimes.pydt._Pydt.is_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2634
 * 
 *     # . time
 *     @property             # <<<<<<<<<<<<<<
 *     def hour(self) -> int:
 *         """The hour (0-23) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4hour_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4hour_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_4hour___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4hour___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2637
 *     def hour(self) -> int:
 *         """The hour (0-23) `<'int'>`."""
 *         return datetime.datetime_hour(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_hour(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2634
 * 
 *     # . time
 *     @property             # <<<<<<<<<<<<<<
 *     def hour(self) -> int:
 *         """The hour (0-23) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.hour.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2639
 *         return datetime.datetime_hour(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_hour(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_207access_hour(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_hour(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_hour", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_207access_hour)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2639, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2643
 *     def access_hour(self) -> cython.int:
 *         """Return the hour (0-23) `<'int'>`."""
 *         return datetime.datetime_hour(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_hour(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2639
 *         return datetime.datetime_hour(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_hour(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_hour", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_207access_hour(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_206access_hour, "Return the hour (0-23) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_207access_hour = {"access_hour", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_207access_hour, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_206access_hour};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_207access_hour(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_hour (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_hour", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_hour", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_206access_hour(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_206access_hour(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_hour", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_hour(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __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("cytimes.pydt._Pydt.access_hour", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2645
 *         return datetime.datetime_hour(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minute(self) -> int:
 *         """The minute (0-59) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6minute_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6minute_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_6minute___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6minute___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2648
 *     def minute(self) -> int:
 *         """The minute (0-59) `<'int'>`."""
 *         return datetime.datetime_minute(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_minute(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2645
 *         return datetime.datetime_hour(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def minute(self) -> int:
 *         """The minute (0-59) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.minute.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2650
 *         return datetime.datetime_minute(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_minute(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_209access_minute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_minute(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_minute", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_209access_minute)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2650, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2654
 *     def access_minute(self) -> cython.int:
 *         """Return the minute (0-59) `<'int'>`."""
 *         return datetime.datetime_minute(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_minute(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2650
 *         return datetime.datetime_minute(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_minute(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_minute", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_209access_minute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_208access_minute, "Return the minute (0-59) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_209access_minute = {"access_minute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_209access_minute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_208access_minute};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_209access_minute(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_minute (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_minute", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_minute", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_208access_minute(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_208access_minute(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_minute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_minute(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2650, __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("cytimes.pydt._Pydt.access_minute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2656
 *         return datetime.datetime_minute(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def second(self) -> int:
 *         """The second (0-59) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6second_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6second_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_6second___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6second___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2659
 *     def second(self) -> int:
 *         """The second (0-59) `<'int'>`."""
 *         return datetime.datetime_second(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_second(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2656
 *         return datetime.datetime_minute(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def second(self) -> int:
 *         """The second (0-59) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.second.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2661
 *         return datetime.datetime_second(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_second(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_211access_second(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_second(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_second", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_211access_second)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2661, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2665
 *     def access_second(self) -> cython.int:
 *         """Return the second (0-59) `<'int'>`."""
 *         return datetime.datetime_second(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_second(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2661
 *         return datetime.datetime_second(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_second(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_second", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_211access_second(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_210access_second, "Return the second (0-59) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_211access_second = {"access_second", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_211access_second, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_210access_second};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_211access_second(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_second (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_second", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_second", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_210access_second(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_210access_second(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_second", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_second(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2661, __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("cytimes.pydt._Pydt.access_second", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2667
 *         return datetime.datetime_second(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def millisecond(self) -> int:
 *         """The millisecond (0-999) part from microsecond `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11millisecond_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11millisecond_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_11millisecond___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_11millisecond___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2670
 *     def millisecond(self) -> int:
 *         """The millisecond (0-999) part from microsecond `<'int'>`."""
 *         return self.access_millisecond()             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_millisecond(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2667
 *         return datetime.datetime_second(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def millisecond(self) -> int:
 *         """The millisecond (0-999) part from microsecond `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.millisecond.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2672
 *         return self.access_millisecond()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_millisecond(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_213access_millisecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_millisecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_millisecond", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_millisecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_213access_millisecond)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2672, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2676
 *     def access_millisecond(self) -> cython.int:
 *         """Return the millisecond (0-999) part from microsecond `<'int'>`."""
 *         return self.access_microsecond() // 1000             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __pyx_r = __Pyx_div_long(((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0), 0x3E8, 1);
  goto __pyx_L0;

  /* "cytimes/pydt.py":2672
 *         return self.access_millisecond()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_millisecond(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_213access_millisecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_212access_millisecond, "Return the millisecond (0-999) part from microsecond `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_213access_millisecond = {"access_millisecond", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_213access_millisecond, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_212access_millisecond};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_213access_millisecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_millisecond (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_millisecond", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_millisecond", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_212access_millisecond(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_212access_millisecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_millisecond", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_millisecond(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2672, __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("cytimes.pydt._Pydt.access_millisecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2678
 *         return self.access_microsecond() // 1000
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def microsecond(self) -> int:
 *         """The microsecond (0-999999) `<'int'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11microsecond_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_11microsecond_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_11microsecond___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_11microsecond___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2681
 *     def microsecond(self) -> int:
 *         """The microsecond (0-999999) `<'int'>`."""
 *         return datetime.datetime_microsecond(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_microsecond(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2678
 *         return self.access_microsecond() // 1000
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def microsecond(self) -> int:
 *         """The microsecond (0-999999) `<'int'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.microsecond.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2683
 *         return datetime.datetime_microsecond(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_microsecond(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_215access_microsecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_microsecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_microsecond", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_215access_microsecond)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2683, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2683, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2687
 *     def access_microsecond(self) -> cython.int:
 *         """Return the microsecond (0-999999) `<'int'>`."""
 *         return datetime.datetime_microsecond(self)             # <<<<<<<<<<<<<<
 * 
 *     # Timezone -----------------------------------------------------------------------------
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_microsecond(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2683
 *         return datetime.datetime_microsecond(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_microsecond(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_215access_microsecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_214access_microsecond, "Return the microsecond (0-999999) `<'int'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_215access_microsecond = {"access_microsecond", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_215access_microsecond, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_214access_microsecond};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_215access_microsecond(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_microsecond (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_microsecond", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_microsecond", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_214access_microsecond(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_214access_microsecond(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_microsecond", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_microsecond(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2683, __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("cytimes.pydt._Pydt.access_microsecond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2690
 * 
 *     # Timezone -----------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def tz_available(self) -> set[str]:
 *         """The available timezone names `<'set[str]'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_12tz_available_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_12tz_available_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_12tz_available___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_12tz_available___get__(CYTHON_UNUSED struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cytimes/pydt.py":2697
 *         >>> zoneinfo.available_timezones()
 *         """
 *         return _available_timezones()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_available_timezones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    assert(__pyx_t_2);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2690
 * 
 *     # Timezone -----------------------------------------------------------------------------
 *     @property             # <<<<<<<<<<<<<<
 *     def tz_available(self) -> set[str]:
 *         """The available timezone names `<'set[str]'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tz_available.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2699
 *         return _available_timezones()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tz(self) -> object:
 *         """The timezone information `<'tzinfo/None'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_2tz_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_2tz_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_2tz___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_2tz___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2705
 *         - Alias of `tzinfo`
 *         """
 *         return self.access_tzinfo()             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2699
 *         return _available_timezones()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tz(self) -> object:
 *         """The timezone information `<'tzinfo/None'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2707
 *         return self.access_tzinfo()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tzinfo(self) -> object:
 *         """The timezone information `<'tzinfo/None'>`."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6tzinfo_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_6tzinfo_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_6tzinfo___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_6tzinfo___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2710
 *     def tzinfo(self) -> object:
 *         """The timezone information `<'tzinfo/None'>`."""
 *         return datetime.datetime_tzinfo(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_datetime_tzinfo(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2707
 *         return self.access_tzinfo()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def tzinfo(self) -> object:
 *         """The timezone information `<'tzinfo/None'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tzinfo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2712
 *         return datetime.datetime_tzinfo(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def access_tzinfo(self) -> object:
 *         """Return the timezone information `<'tzinfo/None'>`."""
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_217access_tzinfo(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_access_tzinfo(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_tzinfo", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_217access_tzinfo)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2715
 *     def access_tzinfo(self) -> object:
 *         """Return the timezone information `<'tzinfo/None'>`."""
 *         return datetime.datetime_tzinfo(self)             # <<<<<<<<<<<<<<
 * 
 *     @property
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cpython_8datetime_datetime_tzinfo(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2712
 *         return datetime.datetime_tzinfo(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def access_tzinfo(self) -> object:
 *         """Return the timezone information `<'tzinfo/None'>`."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.access_tzinfo", __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_7cytimes_4pydt_5_Pydt_217access_tzinfo(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_216access_tzinfo, "Return the timezone information `<'tzinfo/None'>`.");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_217access_tzinfo = {"access_tzinfo", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_217access_tzinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_216access_tzinfo};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_217access_tzinfo(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_tzinfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_tzinfo", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_tzinfo", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_216access_tzinfo(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_216access_tzinfo(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_tzinfo", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_access_tzinfo(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __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("cytimes.pydt._Pydt.access_tzinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2717
 *         return datetime.datetime_tzinfo(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def fold(self) -> int:
 *         """The fold value (0 or 1) for ambiguous times `<'int'>`.
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4fold_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_4fold_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_4fold___get__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_4fold___get__(struct __pyx_obj_7cytimes_4pydt__Pydt *__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);

  /* "cytimes/pydt.py":2724
 *           daylight saving time (DST) transitions.
 *         """
 *         return datetime.datetime_fold(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_datetime_fold(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2717
 *         return datetime.datetime_tzinfo(self)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def fold(self) -> int:
 *         """The fold value (0 or 1) for ambiguous times `<'int'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.fold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2726
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_fold(self) -> cython.int:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_219access_fold(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_access_fold(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("access_fold", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_access_fold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_219access_fold)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2734
 *           daylight saving time (DST) transitions.
 *         """
 *         return datetime.datetime_fold(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_r = __pyx_f_7cpython_8datetime_datetime_fold(((PyObject *)__pyx_v_self));
  goto __pyx_L0;

  /* "cytimes/pydt.py":2726
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_fold(self) -> cython.int:
*/

  /* 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_WriteUnraisable("cytimes.pydt._Pydt.access_fold", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_219access_fold(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_218access_fold, "Return the fold value (0 or 1) for ambiguous times `<'int'>`.\n\n        - Use to disambiguates local times during\n          daylight saving time (DST) transitions.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_219access_fold = {"access_fold", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_219access_fold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_218access_fold};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_219access_fold(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("access_fold (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("access_fold", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("access_fold", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_218access_fold(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_218access_fold(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("access_fold", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_f_7cytimes_4pydt_5_Pydt_access_fold(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __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("cytimes.pydt._Pydt.access_fold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2736
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_local(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_221is_local(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_local(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_local", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_local); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_221is_local)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2736, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2743
 *         - Naive datetime always return `False`.
 *         """
 *         return self.access_tzinfo() is utils.tz_local()             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = (__pyx_t_1 == __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2736
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_local(self) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_221is_local(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_220is_local, "Check whether is in the local timezone `<'bool'>`.\n\n        - Naive datetime always return `False`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_221is_local = {"is_local", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_221is_local, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_220is_local};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_221is_local(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_local (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_local", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_local", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_220is_local(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_220is_local(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("is_local", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_local(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2736, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_local", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2745
 *         return self.access_tzinfo() is utils.tz_local()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_utc(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_223is_utc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_utc(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_utc", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_utc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_223is_utc)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2745, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2745, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2752
 *         - Naive datetime always return `False`.
 *         """
 *         return self.access_tzinfo() is utils.UTC             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_t_1 == ((PyObject *)__pyx_v_7cytimes_5utils_UTC));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2745
 *         return self.access_tzinfo() is utils.tz_local()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_utc(self) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_223is_utc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_222is_utc, "Check whether is in the UTC timezone `<'bool'>`.\n\n        - Naive datetime always return `False`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_223is_utc = {"is_utc", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_223is_utc, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_222is_utc};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_223is_utc(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_utc (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_utc", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_utc", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_222is_utc(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_222is_utc(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("is_utc", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_utc(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2745, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_utc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2754
 *         return self.access_tzinfo() is utils.UTC
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_dst(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_225is_dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Delta *__pyx_v_dst = 0;
  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;
  size_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("is_dst", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_dst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_225is_dst)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2754, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2754, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2761
 *         - Naive datetime always return `False`.
 *         """
 *         dst: datetime.timedelta = utils.dt_dst(self)             # <<<<<<<<<<<<<<
 *         return False if dst is None else bool(utils.td_to_us(dst))
 * 
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_dst(((PyDateTime_DateTime *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dst = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2762
 *         """
 *         dst: datetime.timedelta = utils.dt_dst(self)
 *         return False if dst is None else bool(utils.td_to_us(dst))             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_7 = (((PyObject *)__pyx_v_dst) == Py_None);
  if (__pyx_t_7) {
    __pyx_t_6 = 0;
  } else {
    __pyx_t_6 = (!(!(__pyx_f_7cytimes_5utils_td_to_us(__pyx_v_dst) != 0)));
  }
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2754
 *         return self.access_tzinfo() is utils.UTC
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_dst(self) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dst);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_225is_dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_224is_dst, "Check whether is in Dayligh Saving Time (DST) `<'bool'>.\n\n        - Naive datetime always return `False`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_225is_dst = {"is_dst", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_225is_dst, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_224is_dst};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_225is_dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_dst (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_dst", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_dst", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_224is_dst(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_224is_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("is_dst", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_dst(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2754, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2764
 *         return False if dst is None else bool(utils.td_to_us(dst))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tzname(self) -> str:
 *         """Return the timezone name `<'str/None'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_227tzname(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_tzname(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tzname", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tzname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_227tzname)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2764, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2764, __pyx_L1_error)
        __pyx_r = ((PyObject*)__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_typedict_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
  }

  /* "cytimes/pydt.py":2770
 *         - Naive datetime always return `None`.
 *         """
 *         return utils.dt_tzname(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_tzname(((PyDateTime_DateTime *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2764
 *         return False if dst is None else bool(utils.td_to_us(dst))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tzname(self) -> str:
 *         """Return the timezone name `<'str/None'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tzname", __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_7cytimes_4pydt_5_Pydt_227tzname(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_226tzname, "Return the timezone name `<'str/None'>`.\n\n        - Naive datetime always return `None`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_227tzname = {"tzname", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_227tzname, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_226tzname};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_227tzname(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tzname (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("tzname", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("tzname", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_226tzname(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_226tzname(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("tzname", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_tzname(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2764, __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("cytimes.pydt._Pydt.tzname", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2772
 *         return utils.dt_tzname(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset(self) -> datetime.timedelta:
 *         """Return the UTC offset `<'datetime.timedelta/None'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_229utcoffset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyDateTime_Delta *__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcoffset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_utcoffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_229utcoffset)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2772, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 2772, __pyx_L1_error)
        __pyx_r = ((PyDateTime_Delta *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2781
 *         - Naive datetime always return `None`.
 *         """
 *         return utils.dt_utcoffset(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(((PyDateTime_DateTime *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2772
 *         return utils.dt_tzname(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset(self) -> datetime.timedelta:
 *         """Return the UTC offset `<'datetime.timedelta/None'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utcoffset", __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_7cytimes_4pydt_5_Pydt_229utcoffset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_228utcoffset, "Return the UTC offset `<'datetime.timedelta/None'>`.\n\n        The offset is positive for timezones east of\n        UTC and negative for timezones west of UTC.\n\n        - Naive datetime always return `None`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_229utcoffset = {"utcoffset", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_229utcoffset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_228utcoffset};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_229utcoffset(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcoffset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("utcoffset", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("utcoffset", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_228utcoffset(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_228utcoffset(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("utcoffset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2772, __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("cytimes.pydt._Pydt.utcoffset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2783
 *         return utils.dt_utcoffset(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset_seconds(self) -> object:
 *         """Return the UTC offset in seconds `<'int/None'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_231utcoffset_seconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset_seconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_tz = NULL;
  int __pyx_v_ss;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset_sec __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utcoffset_seconds", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_utcoffset_seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_231utcoffset_seconds)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2783, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __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_typedict_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
  }

  /* "cytimes/pydt.py":2792
 *         - Naive datetime always return `None`.
 *         """
 *         tz = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         if tz is None:
 *             return None
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2793
 *         """
 *         tz = self.access_tzinfo()
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return None
 *         ss: cython.int = utils.tz_utcoffset_sec(tz, self)
*/
  __pyx_t_6 = (__pyx_v_tz == Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2794
 *         tz = self.access_tzinfo()
 *         if tz is None:
 *             return None             # <<<<<<<<<<<<<<
 *         ss: cython.int = utils.tz_utcoffset_sec(tz, self)
 *         return None if ss == utils.NULL_TZOFFSET else ss
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cytimes/pydt.py":2793
 *         """
 *         tz = self.access_tzinfo()
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return None
 *         ss: cython.int = utils.tz_utcoffset_sec(tz, self)
*/
  }

  /* "cytimes/pydt.py":2795
 *         if tz is None:
 *             return None
 *         ss: cython.int = utils.tz_utcoffset_sec(tz, self)             # <<<<<<<<<<<<<<
 *         return None if ss == utils.NULL_TZOFFSET else ss
 * 
*/
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.dt = ((PyDateTime_DateTime *)__pyx_v_self);
  __pyx_t_7 = __pyx_f_7cytimes_5utils_tz_utcoffset_sec(__pyx_v_tz, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((int)-200000))) __PYX_ERR(0, 2795, __pyx_L1_error)
  __pyx_v_ss = __pyx_t_7;

  /* "cytimes/pydt.py":2796
 *             return None
 *         ss: cython.int = utils.tz_utcoffset_sec(tz, self)
 *         return None if ss == utils.NULL_TZOFFSET else ss             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = (__pyx_v_ss == __pyx_v_7cytimes_5utils_NULL_TZOFFSET);
  if (__pyx_t_6) {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  } else {
    __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_ss); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2783
 *         return utils.dt_utcoffset(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset_seconds(self) -> object:
 *         """Return the UTC offset in seconds `<'int/None'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.utcoffset_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_231utcoffset_seconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_230utcoffset_seconds, "Return the UTC offset in seconds `<'int/None'>`.\n\n        The offset is positive for timezones east of\n        UTC and negative for timezones west of UTC.\n\n        - Naive datetime always return `None`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_231utcoffset_seconds = {"utcoffset_seconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_231utcoffset_seconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_230utcoffset_seconds};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_231utcoffset_seconds(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utcoffset_seconds (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("utcoffset_seconds", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("utcoffset_seconds", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_230utcoffset_seconds(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_230utcoffset_seconds(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("utcoffset_seconds", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_utcoffset_seconds(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __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("cytimes.pydt._Pydt.utcoffset_seconds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2798
 *         return None if ss == utils.NULL_TZOFFSET else ss
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def dst(self) -> datetime.timedelta:
 *         """Return the Daylight Saving Time (DST) offset `<'datetime.timedelta/None'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_233dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyDateTime_Delta *__pyx_f_7cytimes_4pydt_5_Pydt_dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  PyDateTime_Delta *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dst", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_233dst)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2798, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 2798, __pyx_L1_error)
        __pyx_r = ((PyDateTime_Delta *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2806
 *         - Naive datetime always return `None`.
 *         """
 *         return utils.dt_dst(self)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_dst(((PyDateTime_DateTime *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyDateTime_Delta *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2798
 *         return None if ss == utils.NULL_TZOFFSET else ss
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def dst(self) -> datetime.timedelta:
 *         """Return the Daylight Saving Time (DST) offset `<'datetime.timedelta/None'>`.
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.dst", __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_7cytimes_4pydt_5_Pydt_233dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_232dst, "Return the Daylight Saving Time (DST) offset `<'datetime.timedelta/None'>`.\n\n        - This is purely informational, the DST offset has already\n          been added to the UTC offset returned by 'utcoffset()'.\n        - Naive datetime always return `None`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_233dst = {"dst", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_233dst, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_232dst};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_233dst(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dst (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("dst", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("dst", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_232dst(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_232dst(struct __pyx_obj_7cytimes_4pydt__Pydt *__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("dst", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_dst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2798, __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("cytimes.pydt._Pydt.dst", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2808
 *         return utils.dt_dst(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:
 *         """Convert to another timezone `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_235astimezone(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_astimezone(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone *__pyx_optional_args) {

  /* "cytimes/pydt.py":2809
 * 
 *     @cython.ccall
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Convert to another timezone `<'Pydt'>`.
 * 
*/
  PyObject *__pyx_v_tz = ((PyObject *)Py_None);
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  struct __pyx_opt_args_7cytimes_5utils_dt_astimezone __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astimezone", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_tz = __pyx_optional_args->tz;
    }
  }
  __Pyx_INCREF(__pyx_v_tz);

  /* "cytimes/pydt.py":2808
 *         return utils.dt_dst(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:
 *         """Convert to another timezone `<'Pydt'>`.
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_astimezone); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_235astimezone)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tz};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2808, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2808, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2822
 *             `localizes` the datetime to the system local zone.
 *         """
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2823
 *         """
 *         tz = utils.tz_parse(tz)
 *         return utils.dt_astimezone(self, tz, self._cls())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6.__pyx_n = 2;
  __pyx_t_6.tzinfo = __pyx_v_tz;
  __pyx_t_6.dtclass = __pyx_t_1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2823, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2808
 *         return utils.dt_dst(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:
 *         """Convert to another timezone `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_235astimezone(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_234astimezone, "Convert to another timezone `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` the system `local` timezone is used.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime representing the `same` datetime\n            expressed in the target timezone. For naive datetime and `tz is None`,\n            `localizes` the datetime to the system local zone.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_235astimezone = {"astimezone", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_235astimezone, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_234astimezone};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_235astimezone(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("astimezone (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2808, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "astimezone", 0) < (0)) __PYX_ERR(0, 2808, __pyx_L3_error)

      /* "cytimes/pydt.py":2809
 * 
 *     @cython.ccall
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:             # <<<<<<<<<<<<<<
 *         """Convert to another timezone `<'Pydt'>`.
 * 
*/
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2808, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_tz = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("astimezone", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2808, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_234astimezone(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_tz);

  /* "cytimes/pydt.py":2808
 *         return utils.dt_dst(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:
 *         """Convert to another timezone `<'Pydt'>`.
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_234astimezone(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("astimezone", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.tz = __pyx_v_tz;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->astimezone(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __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("cytimes.pydt._Pydt.astimezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2825
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_localize(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Localize timezone-naive datetime to the target timezone;
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_237tz_localize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_localize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_my_tz = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_localize", 0);
  __Pyx_INCREF(__pyx_v_tz);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tz_localize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_237tz_localize)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tz};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2825, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2843
 *         """
 *         # Timezone-aware
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2844
 *         # Timezone-aware
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         if my_tz is not None:
 *             if tz is not None:
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2845
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             if tz is not None:
 *                 errors.raise_argument_error(
*/
  __pyx_t_6 = (__pyx_v_my_tz != Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2846
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:
 *             if tz is not None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self._cls(),
*/
    __pyx_t_6 = (__pyx_v_tz != Py_None);
    if (__pyx_t_6) {

      /* "cytimes/pydt.py":2848
 *             if tz is not None:
 *                 errors.raise_argument_error(
 *                     self._cls(),             # <<<<<<<<<<<<<<
 *                     "tz_localize(tz)",
 *                     "Datetime '%s' is already timezone-aware.\n"
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2848, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":2852
 *                     "Datetime '%s' is already timezone-aware.\n"
 *                     "Use 'tz_convert()' or 'tz_switch()' method "
 *                     "to convert to the target timezone." % self,             # <<<<<<<<<<<<<<
 *                 )
 *             # . localize: aware => naive
*/
      __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Datetime_s_is_already_timezone_a, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cytimes/pydt.py":2847
 *         if my_tz is not None:
 *             if tz is not None:
 *                 errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                     self._cls(),
 *                     "tz_localize(tz)",
*/
      __pyx_t_7.__pyx_n = 3;
      __pyx_t_7.cls = __pyx_t_1;
      __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_localize_tz;
      __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
      __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2847, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cytimes/pydt.py":2846
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:
 *             if tz is not None:             # <<<<<<<<<<<<<<
 *                 errors.raise_argument_error(
 *                     self._cls(),
*/
    }

    /* "cytimes/pydt.py":2855
 *                 )
 *             # . localize: aware => naive
 *             return utils.dt_replace_tz(self, None, self._cls())             # <<<<<<<<<<<<<<
 * 
 *         # Timezone-naive
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dtclass = __pyx_t_2;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), Py_None, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2855, __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_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2855, __pyx_L1_error)
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2845
 *         tz = utils.tz_parse(tz)
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             if tz is not None:
 *                 errors.raise_argument_error(
*/
  }

  /* "cytimes/pydt.py":2858
 * 
 *         # Timezone-naive
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return self
 *         # . localize: naive => aware
*/
  __pyx_t_6 = (__pyx_v_tz == Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2859
 *         # Timezone-naive
 *         if tz is None:
 *             return self             # <<<<<<<<<<<<<<
 *         # . localize: naive => aware
 *         return utils.dt_replace_tz(self, tz, self._cls())
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2858
 * 
 *         # Timezone-naive
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return self
 *         # . localize: naive => aware
*/
  }

  /* "cytimes/pydt.py":2861
 *             return self
 *         # . localize: naive => aware
 *         return utils.dt_replace_tz(self, tz, self._cls())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.dtclass = __pyx_t_1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), __pyx_v_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2861, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2825
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_localize(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Localize timezone-naive datetime to the target timezone;
*/

  /* 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("cytimes.pydt._Pydt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_237tz_localize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_236tz_localize, "Localize timezone-naive datetime to the target timezone;\n        or timezone-aware datetime to timezone naive (without moving\n        the date & time fields) `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime localized to the target timezone.\n\n        ## Equivalent\n        >>> pandas.Timestamp.tz_localize(tz)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_237tz_localize = {"tz_localize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_237tz_localize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_236tz_localize};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_237tz_localize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_localize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2825, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2825, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_localize", 0) < (0)) __PYX_ERR(0, 2825, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 1, 1, i); __PYX_ERR(0, 2825, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2825, __pyx_L3_error)
    }
    __pyx_v_tz = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_localize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2825, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_236tz_localize(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_tz);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_236tz_localize(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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("tz_localize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_tz_localize(__pyx_v_self, __pyx_v_tz, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2825, __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("cytimes.pydt._Pydt.tz_localize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2863
 *         return utils.dt_replace_tz(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Convert timezone-aware datetime to another timezone `<'Pydt'>`.
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_239tz_convert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_convert(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_tz, int __pyx_skip_dispatch) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_astimezone __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_convert", 0);
  __Pyx_INCREF(__pyx_v_tz);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tz_convert); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_239tz_convert)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tz};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2863, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2863, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2880
 *         """
 *         # Validate
 *         if self.access_tzinfo() is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2882
 *         if self.access_tzinfo() is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "tz_convert(tz)",
 *                 "Datetime '%s' is timezone-naive.\n"
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":2887
 *                 "Use 'tz_localize()' method to localize timezone, or "
 *                 "use 'tz_switch()' method to convert to the target "
 *                 "timezone by providing a base timezone." % self,             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Datetime_s_is_timezone_naive_Use, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":2881
 *         # Validate
 *         if self.access_tzinfo() is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "tz_convert(tz)",
*/
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.cls = __pyx_t_1;
    __pyx_t_7.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_convert_tz;
    __pyx_t_7.error_msg = ((PyObject*)__pyx_t_2);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2881, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pydt.py":2880
 *         """
 *         # Validate
 *         if self.access_tzinfo() is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":2891
 * 
 *         # Convert: aware => None
 *         tz = utils.tz_parse(tz)             # <<<<<<<<<<<<<<
 *         if tz is None:
 *             return utils.dt_replace_tz(
*/
  __pyx_t_2 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_tz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2892
 *         # Convert: aware => None
 *         tz = utils.tz_parse(tz)
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace_tz(
 *                 utils.dt_astimezone(self, utils.UTC, None), None, self._cls()
*/
  __pyx_t_6 = (__pyx_v_tz == Py_None);
  if (__pyx_t_6) {

    /* "cytimes/pydt.py":2893
 *         tz = utils.tz_parse(tz)
 *         if tz is None:
 *             return utils.dt_replace_tz(             # <<<<<<<<<<<<<<
 *                 utils.dt_astimezone(self, utils.UTC, None), None, self._cls()
 *             )
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);

    /* "cytimes/pydt.py":2894
 *         if tz is None:
 *             return utils.dt_replace_tz(
 *                 utils.dt_astimezone(self, utils.UTC, None), None, self._cls()             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_2 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_8.__pyx_n = 2;
    __pyx_t_8.tzinfo = __pyx_t_2;
    __pyx_t_8.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":2893
 *         tz = utils.tz_parse(tz)
 *         if tz is None:
 *             return utils.dt_replace_tz(             # <<<<<<<<<<<<<<
 *                 utils.dt_astimezone(self, utils.UTC, None), None, self._cls()
 *             )
*/
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.dtclass = __pyx_t_2;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_t_1), Py_None, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2893, __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;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2893, __pyx_L1_error)
    __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2892
 *         # Convert: aware => None
 *         tz = utils.tz_parse(tz)
 *         if tz is None:             # <<<<<<<<<<<<<<
 *             return utils.dt_replace_tz(
 *                 utils.dt_astimezone(self, utils.UTC, None), None, self._cls()
*/
  }

  /* "cytimes/pydt.py":2898
 * 
 *         # Convert: aware => aware
 *         return utils.dt_astimezone(self, tz, self._cls())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_4 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8.__pyx_n = 2;
  __pyx_t_8.tzinfo = __pyx_v_tz;
  __pyx_t_8.dtclass = __pyx_t_4;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2898, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":2863
 *         return utils.dt_replace_tz(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Convert timezone-aware datetime to another timezone `<'Pydt'>`.
*/

  /* 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("cytimes.pydt._Pydt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_239tz_convert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_238tz_convert, "Convert timezone-aware datetime to another timezone `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Convert to UTC timezone and localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime representing the `same`\n            datetime expressed in the target timezone.\n\n        ## Equivalent\n        >>> pandas.Timestamp.tz_convert(tz)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_239tz_convert = {"tz_convert", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_239tz_convert, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_238tz_convert};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_239tz_convert(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_tz = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_convert (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_tz,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2863, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2863, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_convert", 0) < (0)) __PYX_ERR(0, 2863, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 1, 1, i); __PYX_ERR(0, 2863, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2863, __pyx_L3_error)
    }
    __pyx_v_tz = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_convert", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2863, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_238tz_convert(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_tz);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_238tz_convert(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, 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("tz_convert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_4pydt_5_Pydt_tz_convert(__pyx_v_self, __pyx_v_tz, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2863, __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("cytimes.pydt._Pydt.tz_convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_241tz_switch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_tz_switch(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_targ_tz, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch *__pyx_optional_args) {

  /* "cytimes/pydt.py":2904
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         naive: cython.bint = False,
 *     ) -> _Pydt:
*/
  PyObject *__pyx_v_base_tz = ((PyObject *)Py_None);

  /* "cytimes/pydt.py":2905
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,
 *         naive: cython.bint = False,             # <<<<<<<<<<<<<<
 *     ) -> _Pydt:
 *         """Switch (convert) the datetime from base timezone to the target timezone `<'Pydt'>`.
*/
  int __pyx_v_naive = ((int)0);
  PyObject *__pyx_v_to_tz = NULL;
  PyObject *__pyx_v_my_tz = NULL;
  PyDateTime_DateTime *__pyx_v_dt = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  size_t __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_dt_replace_tz __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_dt_astimezone __pyx_t_9;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_switch", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_base_tz = __pyx_optional_args->base_tz;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_naive = __pyx_optional_args->naive;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_base_tz);

  /* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_tz_switch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_241tz_switch)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_naive); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_targ_tz, __pyx_v_base_tz, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2900, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":2926
 *         """
 *         # Timezone-aware
 *         to_tz = utils.tz_parse(targ_tz)             # <<<<<<<<<<<<<<
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_targ_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2927
 *         # Timezone-aware
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         if my_tz is not None:
 *             # . target timezone is None
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_my_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2928
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             # . target timezone is None
 *             if to_tz is None:
*/
  __pyx_t_7 = (__pyx_v_my_tz != Py_None);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2930
 *         if my_tz is not None:
 *             # . target timezone is None
 *             if to_tz is None:             # <<<<<<<<<<<<<<
 *                 return utils.dt_replace_tz(self, None, self._cls())
 *             # . target timezone is my_tz
*/
    __pyx_t_7 = (__pyx_v_to_tz == Py_None);
    if (__pyx_t_7) {

      /* "cytimes/pydt.py":2931
 *             # . target timezone is None
 *             if to_tz is None:
 *                 return utils.dt_replace_tz(self, None, self._cls())             # <<<<<<<<<<<<<<
 *             # . target timezone is my_tz
 *             elif to_tz is my_tz:
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), Py_None, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2931, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2930
 *         if my_tz is not None:
 *             # . target timezone is None
 *             if to_tz is None:             # <<<<<<<<<<<<<<
 *                 return utils.dt_replace_tz(self, None, self._cls())
 *             # . target timezone is my_tz
*/
    }

    /* "cytimes/pydt.py":2933
 *                 return utils.dt_replace_tz(self, None, self._cls())
 *             # . target timezone is my_tz
 *             elif to_tz is my_tz:             # <<<<<<<<<<<<<<
 *                 if naive:
 *                     return utils.dt_replace_tz(self, None, self._cls())
*/
    __pyx_t_7 = (__pyx_v_to_tz == __pyx_v_my_tz);
    if (__pyx_t_7) {

      /* "cytimes/pydt.py":2934
 *             # . target timezone is my_tz
 *             elif to_tz is my_tz:
 *                 if naive:             # <<<<<<<<<<<<<<
 *                     return utils.dt_replace_tz(self, None, self._cls())
 *                 else:
*/
      if (__pyx_v_naive) {

        /* "cytimes/pydt.py":2935
 *             elif to_tz is my_tz:
 *                 if naive:
 *                     return utils.dt_replace_tz(self, None, self._cls())             # <<<<<<<<<<<<<<
 *                 else:
 *                     return self  # exit
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8.__pyx_n = 1;
        __pyx_t_8.dtclass = __pyx_t_2;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), Py_None, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2935, __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_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2935, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "cytimes/pydt.py":2934
 *             # . target timezone is my_tz
 *             elif to_tz is my_tz:
 *                 if naive:             # <<<<<<<<<<<<<<
 *                     return utils.dt_replace_tz(self, None, self._cls())
 *                 else:
*/
      }

      /* "cytimes/pydt.py":2937
 *                     return utils.dt_replace_tz(self, None, self._cls())
 *                 else:
 *                     return self  # exit             # <<<<<<<<<<<<<<
 *             # . my_tz => target timezone
 *             else:
*/
      /*else*/ {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __Pyx_INCREF((PyObject *)__pyx_v_self);
        __pyx_r = __pyx_v_self;
        goto __pyx_L0;
      }

      /* "cytimes/pydt.py":2933
 *                 return utils.dt_replace_tz(self, None, self._cls())
 *             # . target timezone is my_tz
 *             elif to_tz is my_tz:             # <<<<<<<<<<<<<<
 *                 if naive:
 *                     return utils.dt_replace_tz(self, None, self._cls())
*/
    }

    /* "cytimes/pydt.py":2940
 *             # . my_tz => target timezone
 *             else:
 *                 if naive:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_astimezone(self, to_tz, None)
 *                     return utils.dt_replace_tz(dt, None, self._cls())
*/
    /*else*/ {
      if (__pyx_v_naive) {

        /* "cytimes/pydt.py":2941
 *             else:
 *                 if naive:
 *                     dt = utils.dt_astimezone(self, to_tz, None)             # <<<<<<<<<<<<<<
 *                     return utils.dt_replace_tz(dt, None, self._cls())
 *                 else:
*/
        __pyx_t_9.__pyx_n = 2;
        __pyx_t_9.tzinfo = __pyx_v_to_tz;
        __pyx_t_9.dtclass = Py_None;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2941, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/pydt.py":2942
 *                 if naive:
 *                     dt = utils.dt_astimezone(self, to_tz, None)
 *                     return utils.dt_replace_tz(dt, None, self._cls())             # <<<<<<<<<<<<<<
 *                 else:
 *                     return utils.dt_astimezone(self, to_tz, self._cls())
*/
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8.__pyx_n = 1;
        __pyx_t_8.dtclass = __pyx_t_1;
        __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, Py_None, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2942, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "cytimes/pydt.py":2940
 *             # . my_tz => target timezone
 *             else:
 *                 if naive:             # <<<<<<<<<<<<<<
 *                     dt = utils.dt_astimezone(self, to_tz, None)
 *                     return utils.dt_replace_tz(dt, None, self._cls())
*/
      }

      /* "cytimes/pydt.py":2944
 *                     return utils.dt_replace_tz(dt, None, self._cls())
 *                 else:
 *                     return utils.dt_astimezone(self, to_tz, self._cls())             # <<<<<<<<<<<<<<
 * 
 *         # Timezone-naive
*/
      /*else*/ {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9.__pyx_n = 2;
        __pyx_t_9.tzinfo = __pyx_v_to_tz;
        __pyx_t_9.dtclass = __pyx_t_2;
        __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __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_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2944, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }
    }

    /* "cytimes/pydt.py":2928
 *         to_tz = utils.tz_parse(targ_tz)
 *         my_tz = self.access_tzinfo()
 *         if my_tz is not None:             # <<<<<<<<<<<<<<
 *             # . target timezone is None
 *             if to_tz is None:
*/
  }

  /* "cytimes/pydt.py":2948
 *         # Timezone-naive
 *         # . target timezone is None
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 *         # . base is None
*/
  __pyx_t_7 = (__pyx_v_to_tz == Py_None);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2949
 *         # . target timezone is None
 *         if to_tz is None:
 *             return self  # exit             # <<<<<<<<<<<<<<
 *         # . base is None
 *         base_tz = utils.tz_parse(base_tz)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "cytimes/pydt.py":2948
 *         # Timezone-naive
 *         # . target timezone is None
 *         if to_tz is None:             # <<<<<<<<<<<<<<
 *             return self  # exit
 *         # . base is None
*/
  }

  /* "cytimes/pydt.py":2951
 *             return self  # exit
 *         # . base is None
 *         base_tz = utils.tz_parse(base_tz)             # <<<<<<<<<<<<<<
 *         if base_tz is None:
 *             errors.raise_argument_error(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_base_tz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_base_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":2952
 *         # . base is None
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  __pyx_t_7 = (__pyx_v_base_tz == Py_None);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2954
 *         if base_tz is None:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "tz_switch(...)",
 *                 "Datetime '%s' is timezone-naive.\n"
*/
    __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/pydt.py":2958
 *                 "Datetime '%s' is timezone-naive.\n"
 *                 "Cannot convert timezone-naive datetime to the "
 *                 "target timezone without a base timezone (base_tz)." % self,             # <<<<<<<<<<<<<<
 *             )
 *         # . base timezone is target timezone
*/
    __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Datetime_s_is_timezone_naive_Can, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":2953
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "tz_switch(...)",
*/
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.cls = __pyx_t_1;
    __pyx_t_10.input_msg = __pyx_mstate_global->__pyx_kp_u_tz_switch_2;
    __pyx_t_10.error_msg = ((PyObject*)__pyx_t_2);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2953, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cytimes/pydt.py":2952
 *         # . base is None
 *         base_tz = utils.tz_parse(base_tz)
 *         if base_tz is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self._cls(),
*/
  }

  /* "cytimes/pydt.py":2961
 *             )
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:             # <<<<<<<<<<<<<<
 *             if naive:
 *                 return self  # exit
*/
  __pyx_t_7 = (__pyx_v_base_tz == __pyx_v_to_tz);
  if (__pyx_t_7) {

    /* "cytimes/pydt.py":2962
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:
 *             if naive:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             else:
*/
    if (__pyx_v_naive) {

      /* "cytimes/pydt.py":2963
 *         if base_tz is to_tz:
 *             if naive:
 *                 return self  # exit             # <<<<<<<<<<<<<<
 *             else:
 *                 return utils.dt_replace_tz(self, to_tz, self._cls())
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = __pyx_v_self;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2962
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:
 *             if naive:             # <<<<<<<<<<<<<<
 *                 return self  # exit
 *             else:
*/
    }

    /* "cytimes/pydt.py":2965
 *                 return self  # exit
 *             else:
 *                 return utils.dt_replace_tz(self, to_tz, self._cls())             # <<<<<<<<<<<<<<
 *         # . localize to base, then convert to target timezone
 *         else:
*/
    /*else*/ {
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.dtclass = __pyx_t_2;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), __pyx_v_to_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2965, __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_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2965, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "cytimes/pydt.py":2961
 *             )
 *         # . base timezone is target timezone
 *         if base_tz is to_tz:             # <<<<<<<<<<<<<<
 *             if naive:
 *                 return self  # exit
*/
  }

  /* "cytimes/pydt.py":2968
 *         # . localize to base, then convert to target timezone
 *         else:
 *             dt = utils.dt_replace_tz(self, base_tz, None)             # <<<<<<<<<<<<<<
 *             if naive:
 *                 dt = utils.dt_astimezone(dt, to_tz, None)
*/
  /*else*/ {
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_self), __pyx_v_base_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":2969
 *         else:
 *             dt = utils.dt_replace_tz(self, base_tz, None)
 *             if naive:             # <<<<<<<<<<<<<<
 *                 dt = utils.dt_astimezone(dt, to_tz, None)
 *                 return utils.dt_replace_tz(dt, None, self._cls())
*/
    if (__pyx_v_naive) {

      /* "cytimes/pydt.py":2970
 *             dt = utils.dt_replace_tz(self, base_tz, None)
 *             if naive:
 *                 dt = utils.dt_astimezone(dt, to_tz, None)             # <<<<<<<<<<<<<<
 *                 return utils.dt_replace_tz(dt, None, self._cls())
 *             else:
*/
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.tzinfo = __pyx_v_to_tz;
      __pyx_t_9.dtclass = Py_None;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(__pyx_v_dt, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_dt, ((PyDateTime_DateTime *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cytimes/pydt.py":2971
 *             if naive:
 *                 dt = utils.dt_astimezone(dt, to_tz, None)
 *                 return utils.dt_replace_tz(dt, None, self._cls())             # <<<<<<<<<<<<<<
 *             else:
 *                 return utils.dt_astimezone(dt, to_tz, self._cls())
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8.__pyx_n = 1;
      __pyx_t_8.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(__pyx_v_dt, Py_None, &__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2971, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cytimes/pydt.py":2969
 *         else:
 *             dt = utils.dt_replace_tz(self, base_tz, None)
 *             if naive:             # <<<<<<<<<<<<<<
 *                 dt = utils.dt_astimezone(dt, to_tz, None)
 *                 return utils.dt_replace_tz(dt, None, self._cls())
*/
    }

    /* "cytimes/pydt.py":2973
 *                 return utils.dt_replace_tz(dt, None, self._cls())
 *             else:
 *                 return utils.dt_astimezone(dt, to_tz, self._cls())             # <<<<<<<<<<<<<<
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
*/
    /*else*/ {
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.tzinfo = __pyx_v_to_tz;
      __pyx_t_9.dtclass = __pyx_t_2;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_astimezone(__pyx_v_dt, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2973, __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_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2973, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }

  /* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/

  /* 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("cytimes.pydt._Pydt.tz_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_to_tz);
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_base_tz);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_241tz_switch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_240tz_switch, "Switch (convert) the datetime from base timezone to the target timezone `<'Pydt'>`.\n\n        This method extends the functionality of `astimezone()` by allowing\n        user to specify a base timezone for timezone-naive instances before\n        converting to the target timezone.\n\n        - If the datetime is timezone-aware, the 'base_tz' argument is `ignored`,\n          and this method behaves identical to `astimezone()`: converting the\n          datetime to the target timezone.\n        - If the instance is timezone-naive, it first localizes the datetime\n          to the `base_tz` (required), and then converts to the target timezone.\n\n        :param targ_tz `<'tzinfo/str/None'>`: The target timezone.\n        :param base_tz `<'tzinfo/str/None'>`: The base timezone for timezone-naive datetime. Defaults to `None`.\n        :param naive `<'bool'>`: If 'True', returns timezone-naive instance after conversion. Defaults to `False`.\n        :returns `<'Pydt'>`: The resulting datetime representing the `same` datetime\n            expressed in the target timezone; optionally timezone-naive.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_241tz_switch = {"tz_switch", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_241tz_switch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_240tz_switch};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_241tz_switch(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_targ_tz = 0;
  PyObject *__pyx_v_base_tz = 0;
  int __pyx_v_naive;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tz_switch (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_targ_tz,&__pyx_mstate_global->__pyx_n_u_base_tz,&__pyx_mstate_global->__pyx_n_u_naive,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2900, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2900, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2900, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2900, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "tz_switch", 0) < (0)) __PYX_ERR(0, 2900, __pyx_L3_error)

      /* "cytimes/pydt.py":2904
 *         self,
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         naive: cython.bint = False,
 *     ) -> _Pydt:
*/
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("tz_switch", 0, 1, 3, i); __PYX_ERR(0, 2900, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2900, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2900, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2900, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_targ_tz = values[0];
    __pyx_v_base_tz = values[1];
    if (values[2]) {
      __pyx_v_naive = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_naive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2905, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":2905
 *         targ_tz: datetime.tzinfo | str | None,
 *         base_tz: datetime.tzinfo | str | None = None,
 *         naive: cython.bint = False,             # <<<<<<<<<<<<<<
 *     ) -> _Pydt:
 *         """Switch (convert) the datetime from base timezone to the target timezone `<'Pydt'>`.
*/
      __pyx_v_naive = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tz_switch", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2900, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.tz_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_240tz_switch(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_targ_tz, __pyx_v_base_tz, __pyx_v_naive);

  /* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_240tz_switch(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_targ_tz, PyObject *__pyx_v_base_tz, int __pyx_v_naive) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_switch", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.base_tz = __pyx_v_base_tz;
  __pyx_t_2.naive = __pyx_v_naive;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->tz_switch(__pyx_v_self, __pyx_v_targ_tz, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __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("cytimes.pydt._Pydt.tz_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":2976
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def add(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_243add(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_add(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  int __pyx_v_days = ((int)0);
  int __pyx_v_hours = ((int)0);
  int __pyx_v_minutes = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_milliseconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add_delta __pyx_t_19;
  int __pyx_t_20;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_21;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_243add)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_years); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_quarters); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_months); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_weeks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_days); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_hours); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_minutes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_seconds); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_milliseconds); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_microseconds); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[11] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_15, (11-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 2976, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":3004
 *         :returns `<'Pydt'>`: The resulting datetime after adding the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_18);
    /*try:*/ {

      /* "cytimes/pydt.py":3006
 *         try:
 *             # fmt: off
 *             return utils.dt_add_delta(self,             # <<<<<<<<<<<<<<
 *                 years, quarters, months, weeks, days,
 *                 hours, minutes, seconds, milliseconds, microseconds,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":3009
 *                 years, quarters, months, weeks, days,
 *                 hours, minutes, seconds, milliseconds, microseconds,
 *                 -1 ,-1, -1, -1, -1,-1, -1, -1, -1, self._cls()             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":3006
 *         try:
 *             # fmt: off
 *             return utils.dt_add_delta(self,             # <<<<<<<<<<<<<<
 *                 years, quarters, months, weeks, days,
 *                 hours, minutes, seconds, milliseconds, microseconds,
*/
      __pyx_t_19.__pyx_n = 20;
      __pyx_t_19.years = __pyx_v_years;
      __pyx_t_19.quarters = __pyx_v_quarters;
      __pyx_t_19.months = __pyx_v_months;
      __pyx_t_19.weeks = __pyx_v_weeks;
      __pyx_t_19.days = __pyx_v_days;
      __pyx_t_19.hours = __pyx_v_hours;
      __pyx_t_19.minutes = __pyx_v_minutes;
      __pyx_t_19.seconds = __pyx_v_seconds;
      __pyx_t_19.milliseconds = __pyx_v_milliseconds;
      __pyx_t_19.microseconds = __pyx_v_microseconds;
      __pyx_t_19.year = -1;
      __pyx_t_19.month = -1;
      __pyx_t_19.day = -1;
      __pyx_t_19.weekday = -1;
      __pyx_t_19.hour = -1;
      __pyx_t_19.minute = -1;
      __pyx_t_19.second = -1;
      __pyx_t_19.millisecond = -1;
      __pyx_t_19.microsecond = -1;
      __pyx_t_19.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add_delta(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3006, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 3006, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":3004
 *         :returns `<'Pydt'>`: The resulting datetime after adding the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pydt.py":3012
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)
 * 
*/
    __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_20) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 3012, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":3013
 *             # fmt: on
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_14 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3013, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_21.__pyx_n = 4;
        __pyx_t_21.cls = __pyx_t_14;
        __pyx_t_21.input_msg = __pyx_mstate_global->__pyx_kp_u_add_2;
        __pyx_t_21.error_msg = ((PyObject*)Py_None);
        __pyx_t_21.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_21); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3013, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }

      /* "cytimes/pydt.py":3012
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
          if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_27);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __pyx_t_20 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":3004
 *         :returns `<'Pydt'>`: The resulting datetime after adding the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  }

  /* "cytimes/pydt.py":2976
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def add(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_243add(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_242add, "Add relative delta to the datetime `<'Pydt'>`.\n\n        :param years `<'int'>`: Relative years. Defaults to `0`.\n        :param quarters `<'int'>`: Relative quarters (3 months). Defaults to `0`.\n        :param months `<'int'>`: Relative months. Defaults to `0`.\n        :param weeks `<'int'>`: Relative weeks (7 days). Defaults to `0`.\n        :param days `<'int'>`: Relative days. Defaults to `0`.\n        :param hours `<'int'>`: Relative hours. Defaults to `0`.\n        :param minutes `<'int'>`: Relative minutes. Defaults to `0`.\n        :param seconds `<'int'>`: Relative seconds. Defaults to `0`.\n        :param milliseconds `<'int'>`: Relative milliseconds (`1000 us`). Defaults to `0`.\n        :param microseconds `<'int'>`: Relative microseconds. Defaults to `0`.\n        :returns `<'Pydt'>`: The resulting datetime after adding the relative delta.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_243add = {"add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_243add, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_242add};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_243add(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_years;
  int __pyx_v_quarters;
  int __pyx_v_months;
  int __pyx_v_weeks;
  int __pyx_v_days;
  int __pyx_v_hours;
  int __pyx_v_minutes;
  int __pyx_v_seconds;
  int __pyx_v_milliseconds;
  int __pyx_v_microseconds;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_years,&__pyx_mstate_global->__pyx_n_u_quarters,&__pyx_mstate_global->__pyx_n_u_months,&__pyx_mstate_global->__pyx_n_u_weeks,&__pyx_mstate_global->__pyx_n_u_days,&__pyx_mstate_global->__pyx_n_u_hours,&__pyx_mstate_global->__pyx_n_u_minutes_2,&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_milliseconds,&__pyx_mstate_global->__pyx_n_u_microseconds,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2976, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add", 0) < (0)) __PYX_ERR(0, 2976, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_years = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_years == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2979, __pyx_L3_error)
    } else {
      __pyx_v_years = ((int)0);
    }
    if (values[1]) {
      __pyx_v_quarters = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_quarters == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2980, __pyx_L3_error)
    } else {
      __pyx_v_quarters = ((int)0);
    }
    if (values[2]) {
      __pyx_v_months = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_months == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2981, __pyx_L3_error)
    } else {
      __pyx_v_months = ((int)0);
    }
    if (values[3]) {
      __pyx_v_weeks = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_weeks == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2982, __pyx_L3_error)
    } else {
      __pyx_v_weeks = ((int)0);
    }
    if (values[4]) {
      __pyx_v_days = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_days == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2983, __pyx_L3_error)
    } else {
      __pyx_v_days = ((int)0);
    }
    if (values[5]) {
      __pyx_v_hours = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_hours == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2984, __pyx_L3_error)
    } else {
      __pyx_v_hours = ((int)0);
    }
    if (values[6]) {
      __pyx_v_minutes = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_minutes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2985, __pyx_L3_error)
    } else {
      __pyx_v_minutes = ((int)0);
    }
    if (values[7]) {
      __pyx_v_seconds = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_seconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2986, __pyx_L3_error)
    } else {
      __pyx_v_seconds = ((int)0);
    }
    if (values[8]) {
      __pyx_v_milliseconds = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2987, __pyx_L3_error)
    } else {
      __pyx_v_milliseconds = ((int)0);
    }
    if (values[9]) {
      __pyx_v_microseconds = __Pyx_PyLong_As_int(values[9]); if (unlikely((__pyx_v_microseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2988, __pyx_L3_error)
    } else {
      __pyx_v_microseconds = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add", 0, 0, 10, __pyx_nargs); __PYX_ERR(0, 2976, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_242add(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_242add(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.years = __pyx_v_years;
  __pyx_t_2.quarters = __pyx_v_quarters;
  __pyx_t_2.months = __pyx_v_months;
  __pyx_t_2.weeks = __pyx_v_weeks;
  __pyx_t_2.days = __pyx_v_days;
  __pyx_t_2.hours = __pyx_v_hours;
  __pyx_t_2.minutes = __pyx_v_minutes;
  __pyx_t_2.seconds = __pyx_v_seconds;
  __pyx_t_2.milliseconds = __pyx_v_milliseconds;
  __pyx_t_2.microseconds = __pyx_v_microseconds;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->add(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2976, __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("cytimes.pydt._Pydt.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3015
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def sub(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_245sub(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_f_7cytimes_4pydt_5_Pydt_sub(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub *__pyx_optional_args) {
  int __pyx_v_years = ((int)0);
  int __pyx_v_quarters = ((int)0);
  int __pyx_v_months = ((int)0);
  int __pyx_v_weeks = ((int)0);
  int __pyx_v_days = ((int)0);
  int __pyx_v_hours = ((int)0);
  int __pyx_v_minutes = ((int)0);
  int __pyx_v_seconds = ((int)0);
  int __pyx_v_milliseconds = ((int)0);
  int __pyx_v_microseconds = ((int)0);
  PyObject *__pyx_v_err = NULL;
  struct __pyx_obj_7cytimes_4pydt__Pydt *__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;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add_delta __pyx_t_19;
  int __pyx_t_20;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __pyx_t_21;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sub", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_years = __pyx_optional_args->years;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_quarters = __pyx_optional_args->quarters;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_months = __pyx_optional_args->months;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_weeks = __pyx_optional_args->weeks;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_days = __pyx_optional_args->days;
              if (__pyx_optional_args->__pyx_n > 5) {
                __pyx_v_hours = __pyx_optional_args->hours;
                if (__pyx_optional_args->__pyx_n > 6) {
                  __pyx_v_minutes = __pyx_optional_args->minutes;
                  if (__pyx_optional_args->__pyx_n > 7) {
                    __pyx_v_seconds = __pyx_optional_args->seconds;
                    if (__pyx_optional_args->__pyx_n > 8) {
                      __pyx_v_milliseconds = __pyx_optional_args->milliseconds;
                      if (__pyx_optional_args->__pyx_n > 9) {
                        __pyx_v_microseconds = __pyx_optional_args->microseconds;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_245sub)) {
        __Pyx_XDECREF((PyObject *)__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_years); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_quarters); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_months); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_weeks); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_days); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_hours); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_minutes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_seconds); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_milliseconds); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_microseconds); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3015, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_15 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[11] = {__pyx_t_3, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_15, (11-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 3015, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__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_typedict_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
  }

  /* "cytimes/pydt.py":3043
 *         :returns `<'Pydt'>`: The resulting datetime after subtracting the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
    __Pyx_XGOTREF(__pyx_t_16);
    __Pyx_XGOTREF(__pyx_t_17);
    __Pyx_XGOTREF(__pyx_t_18);
    /*try:*/ {

      /* "cytimes/pydt.py":3045
 *         try:
 *             # fmt: off
 *             return utils.dt_add_delta(self,             # <<<<<<<<<<<<<<
 *                 -years, -quarters, -months, -weeks, -days,
 *                 -hours, -minutes, -seconds, -milliseconds, -microseconds,
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);

      /* "cytimes/pydt.py":3048
 *                 -years, -quarters, -months, -weeks, -days,
 *                 -hours, -minutes, -seconds, -milliseconds, -microseconds,
 *                 -1 ,-1, -1, -1, -1,-1, -1, -1, -1, self._cls()             # <<<<<<<<<<<<<<
 *             )
 *             # fmt: on
*/
      __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cytimes/pydt.py":3045
 *         try:
 *             # fmt: off
 *             return utils.dt_add_delta(self,             # <<<<<<<<<<<<<<
 *                 -years, -quarters, -months, -weeks, -days,
 *                 -hours, -minutes, -seconds, -milliseconds, -microseconds,
*/
      __pyx_t_19.__pyx_n = 20;
      __pyx_t_19.years = (-__pyx_v_years);
      __pyx_t_19.quarters = (-__pyx_v_quarters);
      __pyx_t_19.months = (-__pyx_v_months);
      __pyx_t_19.weeks = (-__pyx_v_weeks);
      __pyx_t_19.days = (-__pyx_v_days);
      __pyx_t_19.hours = (-__pyx_v_hours);
      __pyx_t_19.minutes = (-__pyx_v_minutes);
      __pyx_t_19.seconds = (-__pyx_v_seconds);
      __pyx_t_19.milliseconds = (-__pyx_v_milliseconds);
      __pyx_t_19.microseconds = (-__pyx_v_microseconds);
      __pyx_t_19.year = -1;
      __pyx_t_19.month = -1;
      __pyx_t_19.day = -1;
      __pyx_t_19.weekday = -1;
      __pyx_t_19.hour = -1;
      __pyx_t_19.minute = -1;
      __pyx_t_19.second = -1;
      __pyx_t_19.millisecond = -1;
      __pyx_t_19.microsecond = -1;
      __pyx_t_19.dtclass = __pyx_t_1;
      __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add_delta(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3045, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt))))) __PYX_ERR(0, 3045, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "cytimes/pydt.py":3043
 *         :returns `<'Pydt'>`: The resulting datetime after subtracting the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __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;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/pydt.py":3051
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
*/
    __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_20) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 3051, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_err = __pyx_t_1;
      /*try:*/ {

        /* "cytimes/pydt.py":3052
 *             # fmt: on
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
        __pyx_t_14 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3052, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_21.__pyx_n = 4;
        __pyx_t_21.cls = __pyx_t_14;
        __pyx_t_21.input_msg = __pyx_mstate_global->__pyx_kp_u_sub_2;
        __pyx_t_21.error_msg = ((PyObject*)Py_None);
        __pyx_t_21.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_21); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3052, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }

      /* "cytimes/pydt.py":3051
 *             )
 *             # fmt: on
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          goto __pyx_L15;
        }
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
          if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __Pyx_XGOTREF(__pyx_t_27);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __pyx_t_20 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_27);
          __Pyx_XGIVEREF(__pyx_t_28);
          __Pyx_XGIVEREF(__pyx_t_29);
          __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_26);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
          goto __pyx_L5_except_error;
        }
        __pyx_L15:;
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":3043
 *         :returns `<'Pydt'>`: The resulting datetime after subtracting the relative delta.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             # fmt: off
 *             return utils.dt_add_delta(self,
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_16);
    __Pyx_XGIVEREF(__pyx_t_17);
    __Pyx_XGIVEREF(__pyx_t_18);
    __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
  }

  /* "cytimes/pydt.py":3015
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def sub(
 *         self,
*/

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_245sub(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_244sub, "Subtract relative delta from the datetime `<'Pydt'>`.\n\n        :param years `<'int'>`: Relative years. Defaults to `0`.\n        :param quarters `<'int'>`: Relative quarters (3 months). Defaults to `0`.\n        :param months `<'int'>`: Relative months. Defaults to `0`.\n        :param weeks `<'int'>`: Relative weeks (7 days). Defaults to `0`.\n        :param days `<'int'>`: Relative days. Defaults to `0`.\n        :param hours `<'int'>`: Relative hours. Defaults to `0`.\n        :param minutes `<'int'>`: Relative minutes. Defaults to `0`.\n        :param seconds `<'int'>`: Relative seconds. Defaults to `0`.\n        :param milliseconds `<'int'>`: Relative milliseconds (`1000 us`). Defaults to `0`.\n        :param microseconds `<'int'>`: Relative microseconds. Defaults to `0`.\n        :returns `<'Pydt'>`: The resulting datetime after subtracting the relative delta.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_245sub = {"sub", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_245sub, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_244sub};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_245sub(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_years;
  int __pyx_v_quarters;
  int __pyx_v_months;
  int __pyx_v_weeks;
  int __pyx_v_days;
  int __pyx_v_hours;
  int __pyx_v_minutes;
  int __pyx_v_seconds;
  int __pyx_v_milliseconds;
  int __pyx_v_microseconds;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sub (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_years,&__pyx_mstate_global->__pyx_n_u_quarters,&__pyx_mstate_global->__pyx_n_u_months,&__pyx_mstate_global->__pyx_n_u_weeks,&__pyx_mstate_global->__pyx_n_u_days,&__pyx_mstate_global->__pyx_n_u_hours,&__pyx_mstate_global->__pyx_n_u_minutes_2,&__pyx_mstate_global->__pyx_n_u_seconds,&__pyx_mstate_global->__pyx_n_u_milliseconds,&__pyx_mstate_global->__pyx_n_u_microseconds,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3015, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sub", 0) < (0)) __PYX_ERR(0, 3015, __pyx_L3_error)
    } else {
      switch (__pyx_nargs) {
        case 10:
        values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3015, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_years = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_years == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3018, __pyx_L3_error)
    } else {
      __pyx_v_years = ((int)0);
    }
    if (values[1]) {
      __pyx_v_quarters = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_quarters == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
    } else {
      __pyx_v_quarters = ((int)0);
    }
    if (values[2]) {
      __pyx_v_months = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_months == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3020, __pyx_L3_error)
    } else {
      __pyx_v_months = ((int)0);
    }
    if (values[3]) {
      __pyx_v_weeks = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_weeks == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3021, __pyx_L3_error)
    } else {
      __pyx_v_weeks = ((int)0);
    }
    if (values[4]) {
      __pyx_v_days = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_days == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3022, __pyx_L3_error)
    } else {
      __pyx_v_days = ((int)0);
    }
    if (values[5]) {
      __pyx_v_hours = __Pyx_PyLong_As_int(values[5]); if (unlikely((__pyx_v_hours == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3023, __pyx_L3_error)
    } else {
      __pyx_v_hours = ((int)0);
    }
    if (values[6]) {
      __pyx_v_minutes = __Pyx_PyLong_As_int(values[6]); if (unlikely((__pyx_v_minutes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3024, __pyx_L3_error)
    } else {
      __pyx_v_minutes = ((int)0);
    }
    if (values[7]) {
      __pyx_v_seconds = __Pyx_PyLong_As_int(values[7]); if (unlikely((__pyx_v_seconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3025, __pyx_L3_error)
    } else {
      __pyx_v_seconds = ((int)0);
    }
    if (values[8]) {
      __pyx_v_milliseconds = __Pyx_PyLong_As_int(values[8]); if (unlikely((__pyx_v_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3026, __pyx_L3_error)
    } else {
      __pyx_v_milliseconds = ((int)0);
    }
    if (values[9]) {
      __pyx_v_microseconds = __Pyx_PyLong_As_int(values[9]); if (unlikely((__pyx_v_microseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3027, __pyx_L3_error)
    } else {
      __pyx_v_microseconds = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sub", 0, 0, 10, __pyx_nargs); __PYX_ERR(0, 3015, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_244sub(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_years, __pyx_v_quarters, __pyx_v_months, __pyx_v_weeks, __pyx_v_days, __pyx_v_hours, __pyx_v_minutes, __pyx_v_seconds, __pyx_v_milliseconds, __pyx_v_microseconds);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_244sub(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_v_years, int __pyx_v_quarters, int __pyx_v_months, int __pyx_v_weeks, int __pyx_v_days, int __pyx_v_hours, int __pyx_v_minutes, int __pyx_v_seconds, int __pyx_v_milliseconds, int __pyx_v_microseconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sub", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 10;
  __pyx_t_2.years = __pyx_v_years;
  __pyx_t_2.quarters = __pyx_v_quarters;
  __pyx_t_2.months = __pyx_v_months;
  __pyx_t_2.weeks = __pyx_v_weeks;
  __pyx_t_2.days = __pyx_v_days;
  __pyx_t_2.hours = __pyx_v_hours;
  __pyx_t_2.minutes = __pyx_v_minutes;
  __pyx_t_2.seconds = __pyx_v_seconds;
  __pyx_t_2.milliseconds = __pyx_v_milliseconds;
  __pyx_t_2.microseconds = __pyx_v_microseconds;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7cytimes_4pydt__Pydt->sub(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __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("cytimes.pydt._Pydt.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_247diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PY_LONG_LONG __pyx_f_7cytimes_4pydt_5_Pydt_diff(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_unit, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff *__pyx_optional_args) {

  /* "cytimes/pydt.py":3059
 *         dtobj: object,
 *         unit: str,
 *         absolute: cython.bint = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "one",
 *     ) -> cython.longlong:
*/
  int __pyx_v_absolute = ((int)0);
  PyObject *__pyx_v_inclusive = ((PyObject*)__pyx_mstate_global->__pyx_n_u_one);
  PyDateTime_DateTime *__pyx_v_dt = 0;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_my_tz = NULL;
  PyObject *__pyx_v_dt_tz = NULL;
  int __pyx_v_my_aware;
  int __pyx_v_dt_aware;
  int __pyx_v_incl_off;
  Py_ssize_t __pyx_v_unit_len;
  PY_LONG_LONG __pyx_v_my_val;
  PY_LONG_LONG __pyx_v_dt_val;
  PY_LONG_LONG __pyx_v_delta;
  PY_LONG_LONG __pyx_r;
  __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;
  size_t __pyx_t_6;
  PY_LONG_LONG __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_11;
  int __pyx_t_12;
  struct __pyx_opt_args_7cytimes_6errors_raise_argument_error __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_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24[8];
  PyObject *__pyx_t_25 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_26;
  int __pyx_t_27;
  struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch_W_iso __pyx_t_28;
  struct __pyx_opt_args_7cytimes_5utils_dt_as_epoch __pyx_t_29;
  char const *__pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_absolute = __pyx_optional_args->absolute;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_inclusive = __pyx_optional_args->inclusive;
      }
    }
  }

  /* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_diff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_247diff)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_absolute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3054, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_dtobj, __pyx_v_unit, __pyx_t_5, __pyx_v_inclusive};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_7 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_7 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3054, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":3092
 *         """
 *         # Parse 'dtobj' to datetime
 *         try:             # <<<<<<<<<<<<<<
 *             dt: datetime.datetime = _parse_obj(
 *                 dtobj, None, True, False, False, True, None, None
*/
  {
    __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:*/ {

      /* "cytimes/pydt.py":3093
 *         # Parse 'dtobj' to datetime
 *         try:
 *             dt: datetime.datetime = _parse_obj(             # <<<<<<<<<<<<<<
 *                 dtobj, None, True, False, False, True, None, None
 *             )
*/
      __pyx_t_11.__pyx_n = 7;
      __pyx_t_11.__pyx_default = Py_None;
      __pyx_t_11.yearfirst = Py_True;
      __pyx_t_11.dayfirst = Py_False;
      __pyx_t_11.ignoretz = 0;
      __pyx_t_11.isoformat = 1;
      __pyx_t_11.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
      __pyx_t_11.dtclass = Py_None;
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_dtobj, 0, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_dt = ((PyDateTime_DateTime *)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytimes/pydt.py":3092
 *         """
 *         # Parse 'dtobj' to datetime
 *         try:             # <<<<<<<<<<<<<<
 *             dt: datetime.datetime = _parse_obj(
 *                 dtobj, None, True, False, False, True, None, None
*/
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/pydt.py":3096
 *                 dtobj, None, True, False, False, True, None, None
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "diff(dtobj, ...)", None, err)
 *             return 0  # unreachable: suppress compiler warning
*/
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 3096, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_err = __pyx_t_2;
      /*try:*/ {

        /* "cytimes/pydt.py":3097
 *             )
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "diff(dtobj, ...)", None, err)             # <<<<<<<<<<<<<<
 *             return 0  # unreachable: suppress compiler warning
 * 
*/
        __pyx_t_5 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3097, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13.__pyx_n = 4;
        __pyx_t_13.cls = __pyx_t_5;
        __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_dtobj;
        __pyx_t_13.error_msg = ((PyObject*)Py_None);
        __pyx_t_13.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3097, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cytimes/pydt.py":3098
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "diff(dtobj, ...)", None, err)
 *             return 0  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Check timezone parity
*/
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L13_return;
      }

      /* "cytimes/pydt.py":3096
 *                 dtobj, None, True, False, False, True, None, None
 *             )
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "diff(dtobj, ...)", None, err)
 *             return 0  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L14_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_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __pyx_t_12 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __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_12; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L5_except_error;
        }
        __pyx_L13_return: {
          __pyx_t_7 = __pyx_r;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_7;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "cytimes/pydt.py":3092
 *         """
 *         # Parse 'dtobj' to datetime
 *         try:             # <<<<<<<<<<<<<<
 *             dt: datetime.datetime = _parse_obj(
 *                 dtobj, None, True, False, False, True, None, None
*/
    __pyx_L5_except_error:;
    __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_L6_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;
    __pyx_L8_try_end:;
  }

  /* "cytimes/pydt.py":3101
 * 
 *         # Check timezone parity
 *         my_tz = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         dt_tz = dt.tzinfo
 *         my_aware: cython.bint = my_tz is not None
*/
  __pyx_t_4 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_my_tz = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/pydt.py":3102
 *         # Check timezone parity
 *         my_tz = self.access_tzinfo()
 *         dt_tz = dt.tzinfo             # <<<<<<<<<<<<<<
 *         my_aware: cython.bint = my_tz is not None
 *         dt_aware: cython.bint = dt_tz is not None
*/
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_6tzinfo_tzinfo(__pyx_v_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_dt_tz = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/pydt.py":3103
 *         my_tz = self.access_tzinfo()
 *         dt_tz = dt.tzinfo
 *         my_aware: cython.bint = my_tz is not None             # <<<<<<<<<<<<<<
 *         dt_aware: cython.bint = dt_tz is not None
 *         if my_aware != dt_aware:
*/
  __pyx_t_22 = (__pyx_v_my_tz != Py_None);
  __pyx_v_my_aware = __pyx_t_22;

  /* "cytimes/pydt.py":3104
 *         dt_tz = dt.tzinfo
 *         my_aware: cython.bint = my_tz is not None
 *         dt_aware: cython.bint = dt_tz is not None             # <<<<<<<<<<<<<<
 *         if my_aware != dt_aware:
 *             errors.raise_error(
*/
  __pyx_t_22 = (__pyx_v_dt_tz != Py_None);
  __pyx_v_dt_aware = __pyx_t_22;

  /* "cytimes/pydt.py":3105
 *         my_aware: cython.bint = my_tz is not None
 *         dt_aware: cython.bint = dt_tz is not None
 *         if my_aware != dt_aware:             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  __pyx_t_22 = (__pyx_v_my_aware != __pyx_v_dt_aware);
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3107
 *         if my_aware != dt_aware:
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "diff(dtobj, ...)",
*/
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":3108
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "diff(dtobj, ...)",
 *                 "Cannot compare naive and aware datetimes:\n"
*/
    __pyx_t_4 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cytimes/pydt.py":3112
 *                 "Cannot compare naive and aware datetimes:\n"
 *                 "  - datetime1: '%s' %s\n"
 *                 "  - datetime2: '%s' %s" % (self, type(self), dt, type(dt)),             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_self)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_dt)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_23 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_dt)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
    __pyx_t_24[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_compare_naive_and_aware_d;
    __pyx_t_24[1] = __pyx_t_1;
    __pyx_t_24[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_24[3] = __pyx_t_5;
    __pyx_t_24[4] = __pyx_mstate_global->__pyx_kp_u_datetime2;
    __pyx_t_24[5] = __pyx_t_3;
    __pyx_t_24[6] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_24[7] = __pyx_t_23;

    /* "cytimes/pydt.py":3110
 *                 self._cls(),
 *                 "diff(dtobj, ...)",
 *                 "Cannot compare naive and aware datetimes:\n"             # <<<<<<<<<<<<<<
 *                 "  - datetime1: '%s' %s\n"
 *                 "  - datetime2: '%s' %s" % (self, type(self), dt, type(dt)),
*/
    __pyx_t_25 = __Pyx_PyUnicode_Join(__pyx_t_24, 8, 58 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_23), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_23));
    if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

    /* "cytimes/pydt.py":3106
 *         dt_aware: cython.bint = dt_tz is not None
 *         if my_aware != dt_aware:
 *             errors.raise_error(             # <<<<<<<<<<<<<<
 *                 errors.MixedTimezoneError,
 *                 self._cls(),
*/
    __pyx_t_26.__pyx_n = 3;
    __pyx_t_26.cls = __pyx_t_4;
    __pyx_t_26.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_dtobj;
    __pyx_t_26.error_msg = ((PyObject*)__pyx_t_25);
    __pyx_f_7cytimes_6errors_raise_error(__pyx_t_2, 0, &__pyx_t_26); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;

    /* "cytimes/pydt.py":3105
 *         my_aware: cython.bint = my_tz is not None
 *         dt_aware: cython.bint = dt_tz is not None
 *         if my_aware != dt_aware:             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  }

  /* "cytimes/pydt.py":3116
 * 
 *         # Handle inclusive
 *         if inclusive == "both":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
*/
  __pyx_t_22 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_both, Py_EQ)); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 3116, __pyx_L1_error)
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3117
 *         # Handle inclusive
 *         if inclusive == "both":
 *             incl_off: cython.int = 1             # <<<<<<<<<<<<<<
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
*/
    __pyx_v_incl_off = 1;

    /* "cytimes/pydt.py":3116
 * 
 *         # Handle inclusive
 *         if inclusive == "both":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
*/
    goto __pyx_L21;
  }

  /* "cytimes/pydt.py":3118
 *         if inclusive == "both":
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
*/
  __pyx_t_22 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_one, Py_EQ)); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 3118, __pyx_L1_error)
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3119
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0             # <<<<<<<<<<<<<<
 *         elif inclusive == "neither":
 *             incl_off: cython.int = -1
*/
    __pyx_v_incl_off = 0;

    /* "cytimes/pydt.py":3118
 *         if inclusive == "both":
 *             incl_off: cython.int = 1
 *         elif inclusive == "one":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
*/
    goto __pyx_L21;
  }

  /* "cytimes/pydt.py":3120
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = -1
 *         else:
*/
  __pyx_t_22 = (__Pyx_PyUnicode_Equals(__pyx_v_inclusive, __pyx_mstate_global->__pyx_n_u_neither, Py_EQ)); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 3120, __pyx_L1_error)
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3121
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":
 *             incl_off: cython.int = -1             # <<<<<<<<<<<<<<
 *         else:
 *             errors.raise_argument_error(
*/
    __pyx_v_incl_off = -1;

    /* "cytimes/pydt.py":3120
 *         elif inclusive == "one":
 *             incl_off: cython.int = 0
 *         elif inclusive == "neither":             # <<<<<<<<<<<<<<
 *             incl_off: cython.int = -1
 *         else:
*/
    goto __pyx_L21;
  }

  /* "cytimes/pydt.py":3123
 *             incl_off: cython.int = -1
 *         else:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "diff(..., inclusive)",
*/
  /*else*/ {

    /* "cytimes/pydt.py":3124
 *         else:
 *             errors.raise_argument_error(
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "diff(..., inclusive)",
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,
*/
    __pyx_t_25 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);

    /* "cytimes/pydt.py":3126
 *                 self._cls(),
 *                 "diff(..., inclusive)",
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,             # <<<<<<<<<<<<<<
 *             )
 *             return 0  # unreachable: suppress compiler warning
*/
    __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Supports_one_both_or_neither_got, __pyx_v_inclusive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cytimes/pydt.py":3123
 *             incl_off: cython.int = -1
 *         else:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "diff(..., inclusive)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_25;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_inclusive;
    __pyx_t_13.error_msg = ((PyObject*)__pyx_t_4);
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":3128
 *                 "Supports: 'one', 'both' or 'neither'; got '%s'." % inclusive,
 *             )
 *             return 0  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 * 
 *         # Validate delta 'unit'
*/
    __pyx_r = 0;
    goto __pyx_L0;
  }
  __pyx_L21:;

  /* "cytimes/pydt.py":3131
 * 
 *         # Validate delta 'unit'
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_22 = (__pyx_v_unit == ((PyObject*)Py_None));
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3133
 *         if unit is None:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(..., unit)",
 *                 "Delta 'unit' cannot be None.",
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cytimes/pydt.py":3132
 *         # Validate delta 'unit'
 *         if unit is None:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., unit)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_4;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
    __pyx_t_13.error_msg = __pyx_mstate_global->__pyx_kp_u_Delta_unit_cannot_be_None;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":3131
 * 
 *         # Validate delta 'unit'
 *         if unit is None:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pydt.py":3137
 *                 "Delta 'unit' cannot be None.",
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)             # <<<<<<<<<<<<<<
 *         if unit_len == 0:
 *             errors.raise_argument_error(
*/
  __pyx_v_unit_len = PyUnicode_GET_LENGTH(__pyx_v_unit);

  /* "cytimes/pydt.py":3138
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  __pyx_t_22 = (__pyx_v_unit_len == 0);
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3140
 *         if unit_len == 0:
 *             errors.raise_argument_error(
 *                 self.__class__,             # <<<<<<<<<<<<<<
 *                 "diff(..., unit)",
 *                 "Delta 'unit' cannot be an empty string.",
*/
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cytimes/pydt.py":3139
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:
 *             errors.raise_argument_error(             # <<<<<<<<<<<<<<
 *                 self.__class__,
 *                 "diff(..., unit)",
*/
    __pyx_t_13.__pyx_n = 3;
    __pyx_t_13.cls = __pyx_t_4;
    __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
    __pyx_t_13.error_msg = __pyx_mstate_global->__pyx_kp_u_Delta_unit_cannot_be_an_empty_st;
    __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/pydt.py":3138
 *             )
 *         unit_len: cython.Py_ssize_t = str_len(unit)
 *         if unit_len == 0:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(
 *                 self.__class__,
*/
  }

  /* "cytimes/pydt.py":3146
 * 
 *         # Compute difference
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "cytimes/pydt.py":3148
 *         try:
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":             # <<<<<<<<<<<<<<
 *                 my_val: cython.longlong = utils.dt_as_epoch_W_iso(self, 1, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch_W_iso(dt, 1, dt_aware)
*/
      __pyx_t_27 = (__pyx_v_unit_len == 1);
      if (__pyx_t_27) {
      } else {
        __pyx_t_22 = __pyx_t_27;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_27 = (PyUnicode_READ_CHAR(__pyx_v_unit, 0) == 87);
      __pyx_t_22 = __pyx_t_27;
      __pyx_L31_bool_binop_done:;
      if (__pyx_t_22) {

        /* "cytimes/pydt.py":3149
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
 *                 my_val: cython.longlong = utils.dt_as_epoch_W_iso(self, 1, my_aware)             # <<<<<<<<<<<<<<
 *                 dt_val: cython.longlong = utils.dt_as_epoch_W_iso(dt, 1, dt_aware)
 *             # . convert to int64[unit]
*/
        __pyx_t_28.__pyx_n = 1;
        __pyx_t_28.utc = __pyx_v_my_aware;
        __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_as_epoch_W_iso(((PyDateTime_DateTime *)__pyx_v_self), 1, &__pyx_t_28); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3149, __pyx_L24_error)
        __pyx_v_my_val = __pyx_t_7;

        /* "cytimes/pydt.py":3150
 *             if unit_len == 1 and str_read(unit, 0) == "W":
 *                 my_val: cython.longlong = utils.dt_as_epoch_W_iso(self, 1, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch_W_iso(dt, 1, dt_aware)             # <<<<<<<<<<<<<<
 *             # . convert to int64[unit]
 *             else:
*/
        __pyx_t_28.__pyx_n = 1;
        __pyx_t_28.utc = __pyx_v_dt_aware;
        __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_as_epoch_W_iso(__pyx_v_dt, 1, &__pyx_t_28); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3150, __pyx_L24_error)
        __pyx_v_dt_val = __pyx_t_7;

        /* "cytimes/pydt.py":3148
 *         try:
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":             # <<<<<<<<<<<<<<
 *                 my_val: cython.longlong = utils.dt_as_epoch_W_iso(self, 1, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch_W_iso(dt, 1, dt_aware)
*/
        goto __pyx_L30;
      }

      /* "cytimes/pydt.py":3153
 *             # . convert to int64[unit]
 *             else:
 *                 my_val: cython.longlong = utils.dt_as_epoch(self, unit, my_aware)             # <<<<<<<<<<<<<<
 *                 dt_val: cython.longlong = utils.dt_as_epoch(dt, unit, dt_aware)
 *         except Exception as err:
*/
      /*else*/ {
        __pyx_t_29.__pyx_n = 1;
        __pyx_t_29.utc = __pyx_v_my_aware;
        __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_as_epoch(((PyDateTime_DateTime *)__pyx_v_self), __pyx_v_unit, &__pyx_t_29); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3153, __pyx_L24_error)
        __pyx_v_my_val = __pyx_t_7;

        /* "cytimes/pydt.py":3154
 *             else:
 *                 my_val: cython.longlong = utils.dt_as_epoch(self, unit, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch(dt, unit, dt_aware)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "diff(..., unit)", None, err)
*/
        __pyx_t_29.__pyx_n = 1;
        __pyx_t_29.utc = __pyx_v_dt_aware;
        __pyx_t_7 = __pyx_f_7cytimes_5utils_dt_as_epoch(__pyx_v_dt, __pyx_v_unit, &__pyx_t_29); if (unlikely(__pyx_t_7 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3154, __pyx_L24_error)
        __pyx_v_dt_val = __pyx_t_7;
      }
      __pyx_L30:;

      /* "cytimes/pydt.py":3146
 * 
 *         # Compute difference
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
    }
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L29_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __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;

    /* "cytimes/pydt.py":3155
 *                 my_val: cython.longlong = utils.dt_as_epoch(self, unit, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch(dt, unit, dt_aware)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "diff(..., unit)", None, err)
 *             return 0  # unreachable: suppress compiler warning
*/
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("cytimes.pydt._Pydt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_25, &__pyx_t_2) < 0) __PYX_ERR(0, 3155, __pyx_L26_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_25);
      __pyx_v_err = __pyx_t_25;
      /*try:*/ {

        /* "cytimes/pydt.py":3156
 *                 dt_val: cython.longlong = utils.dt_as_epoch(dt, unit, dt_aware)
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "diff(..., unit)", None, err)             # <<<<<<<<<<<<<<
 *             return 0  # unreachable: suppress compiler warning
 *         # . compute relative delta
*/
        __pyx_t_23 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 3156, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_23);
        __pyx_t_13.__pyx_n = 4;
        __pyx_t_13.cls = __pyx_t_23;
        __pyx_t_13.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_unit;
        __pyx_t_13.error_msg = ((PyObject*)Py_None);
        __pyx_t_13.tb_exc = __pyx_v_err;
        __pyx_f_7cytimes_6errors_raise_argument_error(0, &__pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3156, __pyx_L38_error)
        __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;

        /* "cytimes/pydt.py":3157
 *         except Exception as err:
 *             errors.raise_argument_error(self._cls(), "diff(..., unit)", None, err)
 *             return 0  # unreachable: suppress compiler warning             # <<<<<<<<<<<<<<
 *         # . compute relative delta
 *         delta: cython.longlong = my_val - dt_val
*/
        __pyx_r = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
        goto __pyx_L37_return;
      }

      /* "cytimes/pydt.py":3155
 *                 my_val: cython.longlong = utils.dt_as_epoch(self, unit, my_aware)
 *                 dt_val: cython.longlong = utils.dt_as_epoch(dt, unit, dt_aware)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             errors.raise_argument_error(self._cls(), "diff(..., unit)", None, err)
 *             return 0  # unreachable: suppress compiler warning
*/
      /*finally:*/ {
        __pyx_L38_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          __pyx_t_14 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_30;
          goto __pyx_L26_except_error;
        }
        __pyx_L37_return: {
          __pyx_t_7 = __pyx_r;
          __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
          __pyx_r = __pyx_t_7;
          goto __pyx_L27_except_return;
        }
      }
    }
    goto __pyx_L26_except_error;

    /* "cytimes/pydt.py":3146
 * 
 *         # Compute difference
 *         try:             # <<<<<<<<<<<<<<
 *             # . convert to int64[W] on monday
 *             if unit_len == 1 and str_read(unit, 0) == "W":
*/
    __pyx_L26_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L27_except_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L29_try_end:;
  }

  /* "cytimes/pydt.py":3159
 *             return 0  # unreachable: suppress compiler warning
 *         # . compute relative delta
 *         delta: cython.longlong = my_val - dt_val             # <<<<<<<<<<<<<<
 * 
 *         # Adjust for inclusivity
*/
  __pyx_v_delta = (__pyx_v_my_val - __pyx_v_dt_val);

  /* "cytimes/pydt.py":3163
 *         # Adjust for inclusivity
 *         # . absolute = True
 *         if absolute:             # <<<<<<<<<<<<<<
 *             delta = (-delta if delta < 0 else delta) + incl_off
 *         # . absolute = False & inclusive offset
*/
  if (__pyx_v_absolute) {

    /* "cytimes/pydt.py":3164
 *         # . absolute = True
 *         if absolute:
 *             delta = (-delta if delta < 0 else delta) + incl_off             # <<<<<<<<<<<<<<
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:
*/
    __pyx_t_22 = (__pyx_v_delta < 0);
    if (__pyx_t_22) {
      __pyx_t_7 = (-__pyx_v_delta);
    } else {
      __pyx_t_7 = __pyx_v_delta;
    }
    __pyx_v_delta = (__pyx_t_7 + __pyx_v_incl_off);

    /* "cytimes/pydt.py":3163
 *         # Adjust for inclusivity
 *         # . absolute = True
 *         if absolute:             # <<<<<<<<<<<<<<
 *             delta = (-delta if delta < 0 else delta) + incl_off
 *         # . absolute = False & inclusive offset
*/
    goto __pyx_L44;
  }

  /* "cytimes/pydt.py":3166
 *             delta = (-delta if delta < 0 else delta) + incl_off
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:             # <<<<<<<<<<<<<<
 *             delta = delta - incl_off if delta < 0 else delta + incl_off
 * 
*/
  __pyx_t_22 = (__pyx_v_incl_off != 0);
  if (__pyx_t_22) {

    /* "cytimes/pydt.py":3167
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:
 *             delta = delta - incl_off if delta < 0 else delta + incl_off             # <<<<<<<<<<<<<<
 * 
 *         # Finished
*/
    __pyx_t_22 = (__pyx_v_delta < 0);
    if (__pyx_t_22) {
      __pyx_t_7 = (__pyx_v_delta - __pyx_v_incl_off);
    } else {
      __pyx_t_7 = (__pyx_v_delta + __pyx_v_incl_off);
    }
    __pyx_v_delta = __pyx_t_7;

    /* "cytimes/pydt.py":3166
 *             delta = (-delta if delta < 0 else delta) + incl_off
 *         # . absolute = False & inclusive offset
 *         elif incl_off != 0:             # <<<<<<<<<<<<<<
 *             delta = delta - incl_off if delta < 0 else delta + incl_off
 * 
*/
  }
  __pyx_L44:;

  /* "cytimes/pydt.py":3170
 * 
 *         # Finished
 *         return delta             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, o: object) -> Self:
*/
  __pyx_r = __pyx_v_delta;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/

  /* 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_23);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_my_tz);
  __Pyx_XDECREF(__pyx_v_dt_tz);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_247diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_246diff, "Compute the delta difference between the instance and another datetime `<'int'>`.\n\n        The delta is computed in the specified datetime 'unit' and\n        adjusted based on the `inclusive` argument to determine the\n        inclusivity of the start and end times.\n\n        :param dtobj `<'object'>`: A datetime-like object, supports:\n\n            - `<'str'>`                 \342\206\222 parses into datetime.\n            - `<'datetime.datetime'>`   \342\206\222 accepts `as-is`.\n            - `<'datetime.date'>`       \342\206\222 converts to timezone-naive datetime with the same date fields.\n            - `<'int/float'>`           \342\206\222 interprets as `seconds since Unix epoch` and converts to timezone-naive datetime\n                                          (fractional seconds as microseconds).\n            - `<'np.datetime64'>`       \342\206\222 converts to timezone-naive datetime; resolution finer than microseconds is truncated.\n\n        :param unit `<'str'>`: The unit to compute the delta difference.\n            Supports: `'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us'`.\n\n        :param absolute `<'bool'>`: If 'True', compute the absolute difference. Defaults to `False`.\n\n        :param inclusive `<'str'>`: Specifies the inclusivity of the start and end times. Defaults to `'one'`.\n\n            - `'one'`     \342\206\222 Include either the start or end time \342\206\222 `(a - b)`\n            - `'both'`:   \342\206\222 Include both the start and end times \342\206\222 `(a - b) + 1 (offset)`\n            - `'neither'` \342\206\222 Exclude both the start and end times \342\206\222 `(a - b) - 1 (offset)`\n\n        :returns `<'int'>`: The delta difference between the instance and `dtobj`\n            in the specified `unit`, adjusted for inclusivity.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_247diff = {"diff", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_247diff, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_246diff};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_247diff(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_dtobj = 0;
  PyObject *__pyx_v_unit = 0;
  int __pyx_v_absolute;
  PyObject *__pyx_v_inclusive = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("diff (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dtobj,&__pyx_mstate_global->__pyx_n_u_unit,&__pyx_mstate_global->__pyx_n_u_absolute,&__pyx_mstate_global->__pyx_n_u_inclusive,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3054, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "diff", 0) < (0)) __PYX_ERR(0, 3054, __pyx_L3_error)
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_n_u_one));
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("diff", 0, 2, 4, i); __PYX_ERR(0, 3054, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3054, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3054, __pyx_L3_error)
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3054, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_n_u_one));
    }
    __pyx_v_dtobj = values[0];
    __pyx_v_unit = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_absolute = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_absolute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
    } else {

      /* "cytimes/pydt.py":3059
 *         dtobj: object,
 *         unit: str,
 *         absolute: cython.bint = False,             # <<<<<<<<<<<<<<
 *         inclusive: str = "one",
 *     ) -> cython.longlong:
*/
      __pyx_v_absolute = ((int)0);
    }
    __pyx_v_inclusive = ((PyObject*)values[3]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("diff", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3054, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_unit), (&PyUnicode_Type), 0, "unit", 2))) __PYX_ERR(0, 3058, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inclusive), (&PyUnicode_Type), 0, "inclusive", 2))) __PYX_ERR(0, 3060, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_246diff(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_dtobj, __pyx_v_unit, __pyx_v_absolute, __pyx_v_inclusive);

  /* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_246diff(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_dtobj, PyObject *__pyx_v_unit, int __pyx_v_absolute, PyObject *__pyx_v_inclusive) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PY_LONG_LONG __pyx_t_1;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("diff", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.absolute = __pyx_v_absolute;
  __pyx_t_2.inclusive = __pyx_v_inclusive;
  __pyx_t_1 = __pyx_vtabptr_7cytimes_4pydt__Pydt->diff(__pyx_v_self, __pyx_v_dtobj, __pyx_v_unit, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3054, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3172
 *         return delta
 * 
 *     def __add__(self, o: object) -> Self:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_249__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_249__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_248__add__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), ((PyObject *)__pyx_v_o));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_248__add__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);
  __Pyx_INCREF(__pyx_v_o);

  /* "cytimes/pydt.py":3174
 *     def __add__(self, o: object) -> Self:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3174, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3175
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3180
 *                 datetime.timedelta_seconds(o),
 *                 datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # np.timedelta64
*/
    __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":3175
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = __pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o);
    __pyx_t_4.seconds = __pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o);
    __pyx_t_4.microseconds = __pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o);
    __pyx_t_4.dtclass = __pyx_t_2;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __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;

    /* "cytimes/pydt.py":3174
 *     def __add__(self, o: object) -> Self:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  }

  /* "cytimes/pydt.py":3183
 *             )
 *         # np.timedelta64
 *         if utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td64(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3183, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3184
 *         # np.timedelta64
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td64_to_td(__pyx_v_o, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/pydt.py":3185
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3190
 *                 datetime.timedelta_seconds(o),
 *                 datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # unsupported
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cytimes/pydt.py":3185
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = __pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o);
    __pyx_t_4.seconds = __pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o);
    __pyx_t_4.microseconds = __pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o);
    __pyx_t_4.dtclass = __pyx_t_3;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __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;

    /* "cytimes/pydt.py":3183
 *             )
 *         # np.timedelta64
 *         if utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  }

  /* "cytimes/pydt.py":3193
 *             )
 *         # unsupported
 *         return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __radd__(self, o: object) -> Self:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_builtin_NotImplemented);
  __pyx_r = __pyx_builtin_NotImplemented;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3172
 *         return delta
 * 
 *     def __add__(self, o: object) -> Self:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3195
 *         return NotImplemented
 * 
 *     def __radd__(self, o: object) -> Self:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_251__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_251__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_250__radd__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), ((PyObject *)__pyx_v_o));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_250__radd__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__radd__", 0);
  __Pyx_INCREF(__pyx_v_o);

  /* "cytimes/pydt.py":3197
 *     def __radd__(self, o: object) -> Self:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3197, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3198
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3203
 *                 datetime.timedelta_seconds(o),
 *                 datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # np.timedelta64
*/
    __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":3198
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = __pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o);
    __pyx_t_4.seconds = __pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o);
    __pyx_t_4.microseconds = __pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o);
    __pyx_t_4.dtclass = __pyx_t_2;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3198, __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;

    /* "cytimes/pydt.py":3197
 *     def __radd__(self, o: object) -> Self:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  }

  /* "cytimes/pydt.py":3206
 *             )
 *         # np.timedelta64
 *         if utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td64(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3206, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3207
 *         # np.timedelta64
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td64_to_td(__pyx_v_o, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/pydt.py":3208
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3213
 *                 datetime.timedelta_seconds(o),
 *                 datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # unsupported
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cytimes/pydt.py":3208
 *         if utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = __pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o);
    __pyx_t_4.seconds = __pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o);
    __pyx_t_4.microseconds = __pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o);
    __pyx_t_4.dtclass = __pyx_t_3;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3208, __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;

    /* "cytimes/pydt.py":3206
 *             )
 *         # np.timedelta64
 *         if utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  }

  /* "cytimes/pydt.py":3216
 *             )
 *         # unsupported
 *         return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, o: object) -> Self | datetime.timedelta:
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_builtin_NotImplemented);
  __pyx_r = __pyx_builtin_NotImplemented;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3195
 *         return NotImplemented
 * 
 *     def __radd__(self, o: object) -> Self:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3218
 *         return NotImplemented
 * 
 *     def __sub__(self, o: object) -> Self | datetime.timedelta:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_253__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_o); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_253__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_o) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_252__sub__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), ((PyObject *)__pyx_v_o));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_252__sub__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_v_m_tz = NULL;
  PyObject *__pyx_v_o_tz = NULL;
  int __pyx_v_m_aware;
  int __pyx_v_o_aware;
  PY_LONG_LONG __pyx_v_m_us;
  PY_LONG_LONG __pyx_v_o_us;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_4;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_date __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_6parser_parse_obj __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt64_to_dt __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16[8];
  PyObject *__pyx_t_17 = NULL;
  struct __pyx_opt_args_7cytimes_6errors_raise_error __pyx_t_18;
  PY_LONG_LONG __pyx_t_19;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_us __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);
  __Pyx_INCREF(__pyx_v_o);

  /* "cytimes/pydt.py":3220
 *     def __sub__(self, o: object) -> Self | datetime.timedelta:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3220, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3221
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 -datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3226
 *                 -datetime.timedelta_seconds(o),
 *                 -datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # np.timedelta64
*/
    __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cytimes/pydt.py":3221
 *         # timedelta
 *         if utils.is_td(o):
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 -datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = (-__pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o));
    __pyx_t_4.seconds = (-__pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o));
    __pyx_t_4.microseconds = (-__pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o));
    __pyx_t_4.dtclass = __pyx_t_2;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __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;

    /* "cytimes/pydt.py":3220
 *     def __sub__(self, o: object) -> Self | datetime.timedelta:
 *         # timedelta
 *         if utils.is_td(o):             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
  }

  /* "cytimes/pydt.py":3229
 *             )
 *         # np.timedelta64
 *         elif utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_td64(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3229, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3230
 *         # np.timedelta64
 *         elif utils.is_td64(o):
 *             o = utils.td64_to_td(o)             # <<<<<<<<<<<<<<
 *             return utils.dt_add(
 *                 self,
*/
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td64_to_td(__pyx_v_o, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/pydt.py":3231
 *         elif utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 -datetime.timedelta_days(o),
*/
    __Pyx_XDECREF(__pyx_r);

    /* "cytimes/pydt.py":3236
 *                 -datetime.timedelta_seconds(o),
 *                 -datetime.timedelta_microseconds(o),
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *             )
 *         # datetime
*/
    __pyx_t_3 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cytimes/pydt.py":3231
 *         elif utils.is_td64(o):
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(             # <<<<<<<<<<<<<<
 *                 self,
 *                 -datetime.timedelta_days(o),
*/
    __pyx_t_4.__pyx_n = 4;
    __pyx_t_4.days = (-__pyx_f_7cpython_8datetime_timedelta_days(__pyx_v_o));
    __pyx_t_4.seconds = (-__pyx_f_7cpython_8datetime_timedelta_seconds(__pyx_v_o));
    __pyx_t_4.microseconds = (-__pyx_f_7cpython_8datetime_timedelta_microseconds(__pyx_v_o));
    __pyx_t_4.dtclass = __pyx_t_3;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3231, __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;

    /* "cytimes/pydt.py":3229
 *             )
 *         # np.timedelta64
 *         elif utils.is_td64(o):             # <<<<<<<<<<<<<<
 *             o = utils.td64_to_td(o)
 *             return utils.dt_add(
*/
  }

  /* "cytimes/pydt.py":3239
 *             )
 *         # datetime
 *         elif utils.is_dt(o):             # <<<<<<<<<<<<<<
 *             pass
 *         # date
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3239, __pyx_L1_error)
  if (__pyx_t_1) {
    goto __pyx_L3;
  }

  /* "cytimes/pydt.py":3242
 *             pass
 *         # date
 *         elif utils.is_date(o):             # <<<<<<<<<<<<<<
 *             o = utils.dt_fr_date(o, None, None)
 *         # str
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3242, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3243
 *         # date
 *         elif utils.is_date(o):
 *             o = utils.dt_fr_date(o, None, None)             # <<<<<<<<<<<<<<
 *         # str
 *         elif isinstance(o, str):
*/
    if (!(likely(((__pyx_v_o) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_o, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 3243, __pyx_L1_error)
    __pyx_t_5.__pyx_n = 2;
    __pyx_t_5.tzinfo = Py_None;
    __pyx_t_5.dtclass = Py_None;
    __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_date(((PyDateTime_Date *)__pyx_v_o), &__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cytimes/pydt.py":3242
 *             pass
 *         # date
 *         elif utils.is_date(o):             # <<<<<<<<<<<<<<
 *             o = utils.dt_fr_date(o, None, None)
 *         # str
*/
    goto __pyx_L3;
  }

  /* "cytimes/pydt.py":3245
 *             o = utils.dt_fr_date(o, None, None)
 *         # str
 *         elif isinstance(o, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_o); 
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3246
 *         # str
 *         elif isinstance(o, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
 *             except Exception:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "cytimes/pydt.py":3247
 *         elif isinstance(o, str):
 *             try:
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)             # <<<<<<<<<<<<<<
 *             except Exception:
 *                 return NotImplemented
*/
        __pyx_t_9.__pyx_n = 7;
        __pyx_t_9.__pyx_default = Py_None;
        __pyx_t_9.yearfirst = Py_True;
        __pyx_t_9.dayfirst = Py_False;
        __pyx_t_9.ignoretz = 0;
        __pyx_t_9.isoformat = 1;
        __pyx_t_9.cfg = ((struct __pyx_obj_7cytimes_6parser_Configs *)Py_None);
        __pyx_t_9.dtclass = Py_None;
        __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_6parser_parse_obj(__pyx_v_o, 0, &__pyx_t_9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3247, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "cytimes/pydt.py":3246
 *         # str
 *         elif isinstance(o, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
 *             except Exception:
*/
      }
      __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;
      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;

      /* "cytimes/pydt.py":3248
 *             try:
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
 *             except Exception:             # <<<<<<<<<<<<<<
 *                 return NotImplemented
 *         # np.datetime64
*/
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_10) {
        __Pyx_AddTraceback("cytimes.pydt._Pydt.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) __PYX_ERR(0, 3248, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_11);

        /* "cytimes/pydt.py":3249
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
 *             except Exception:
 *                 return NotImplemented             # <<<<<<<<<<<<<<
 *         # np.datetime64
 *         elif utils.is_dt64(o):
*/
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_builtin_NotImplemented);
        __pyx_r = __pyx_builtin_NotImplemented;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;

      /* "cytimes/pydt.py":3246
 *         # str
 *         elif isinstance(o, str):
 *             try:             # <<<<<<<<<<<<<<
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
 *             except Exception:
*/
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "cytimes/pydt.py":3245
 *             o = utils.dt_fr_date(o, None, None)
 *         # str
 *         elif isinstance(o, str):             # <<<<<<<<<<<<<<
 *             try:
 *                 o = _parse_obj(o, None, True, False, False, True, None, None)
*/
    goto __pyx_L3;
  }

  /* "cytimes/pydt.py":3251
 *                 return NotImplemented
 *         # np.datetime64
 *         elif utils.is_dt64(o):             # <<<<<<<<<<<<<<
 *             o = utils.dt64_to_dt(o, None, None)
 *         # unsupported
*/
  __pyx_t_1 = __pyx_f_7cytimes_5utils_is_dt64(__pyx_v_o); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3251, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3252
 *         # np.datetime64
 *         elif utils.is_dt64(o):
 *             o = utils.dt64_to_dt(o, None, None)             # <<<<<<<<<<<<<<
 *         # unsupported
 *         else:
*/
    __pyx_t_12.__pyx_n = 2;
    __pyx_t_12.tzinfo = Py_None;
    __pyx_t_12.dtclass = Py_None;
    __pyx_t_11 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64_to_dt(__pyx_v_o, &__pyx_t_12)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cytimes/pydt.py":3251
 *                 return NotImplemented
 *         # np.datetime64
 *         elif utils.is_dt64(o):             # <<<<<<<<<<<<<<
 *             o = utils.dt64_to_dt(o, None, None)
 *         # unsupported
*/
    goto __pyx_L3;
  }

  /* "cytimes/pydt.py":3255
 *         # unsupported
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         #: from here on, 'o' is datetime
 * 
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "cytimes/pydt.py":3259
 * 
 *         # Check timezone parity
 *         m_tz = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         o_tz = datetime.datetime_tzinfo(o)
 *         m_aware: cython.bint = m_tz is not None
*/
  __pyx_t_11 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_m_tz = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cytimes/pydt.py":3260
 *         # Check timezone parity
 *         m_tz = self.access_tzinfo()
 *         o_tz = datetime.datetime_tzinfo(o)             # <<<<<<<<<<<<<<
 *         m_aware: cython.bint = m_tz is not None
 *         o_aware: cython.bint = o_tz is not None
*/
  __pyx_t_11 = __pyx_f_7cpython_8datetime_datetime_tzinfo(__pyx_v_o); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_v_o_tz = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "cytimes/pydt.py":3261
 *         m_tz = self.access_tzinfo()
 *         o_tz = datetime.datetime_tzinfo(o)
 *         m_aware: cython.bint = m_tz is not None             # <<<<<<<<<<<<<<
 *         o_aware: cython.bint = o_tz is not None
 *         if m_aware != o_aware:
*/
  __pyx_t_1 = (__pyx_v_m_tz != Py_None);
  __pyx_v_m_aware = __pyx_t_1;

  /* "cytimes/pydt.py":3262
 *         o_tz = datetime.datetime_tzinfo(o)
 *         m_aware: cython.bint = m_tz is not None
 *         o_aware: cython.bint = o_tz is not None             # <<<<<<<<<<<<<<
 *         if m_aware != o_aware:
 *             errors.raise_error(
*/
  __pyx_t_1 = (__pyx_v_o_tz != Py_None);
  __pyx_v_o_aware = __pyx_t_1;

  /* "cytimes/pydt.py":3263
 *         m_aware: cython.bint = m_tz is not None
 *         o_aware: cython.bint = o_tz is not None
 *         if m_aware != o_aware:             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  __pyx_t_1 = (__pyx_v_m_aware != __pyx_v_o_aware);
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3265
 *         if m_aware != o_aware:
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,             # <<<<<<<<<<<<<<
 *                 self._cls(),
 *                 "diff(dtobj, ...)",
*/
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MixedTimezoneError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cytimes/pydt.py":3266
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
 *                 self._cls(),             # <<<<<<<<<<<<<<
 *                 "diff(dtobj, ...)",
 *                 "Cannot subtract naive and aware datetimes:\n"
*/
    __pyx_t_11 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "cytimes/pydt.py":3270
 *                 "Cannot subtract naive and aware datetimes:\n"
 *                 "  - datetime1: '%s' %s\n"
 *                 "  - datetime2: '%s' %s" % (self, type(self), o, type(o)),             # <<<<<<<<<<<<<<
 *             )
 * 
*/
    __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)__pyx_v_self)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_o), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_o))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_subtract_naive_and_aware;
    __pyx_t_16[1] = __pyx_t_2;
    __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_16[3] = __pyx_t_13;
    __pyx_t_16[4] = __pyx_mstate_global->__pyx_kp_u_datetime2;
    __pyx_t_16[5] = __pyx_t_14;
    __pyx_t_16[6] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_16[7] = __pyx_t_15;

    /* "cytimes/pydt.py":3268
 *                 self._cls(),
 *                 "diff(dtobj, ...)",
 *                 "Cannot subtract naive and aware datetimes:\n"             # <<<<<<<<<<<<<<
 *                 "  - datetime1: '%s' %s\n"
 *                 "  - datetime2: '%s' %s" % (self, type(self), o, type(o)),
*/
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 8, 59 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15));
    if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "cytimes/pydt.py":3264
 *         o_aware: cython.bint = o_tz is not None
 *         if m_aware != o_aware:
 *             errors.raise_error(             # <<<<<<<<<<<<<<
 *                 errors.MixedTimezoneError,
 *                 self._cls(),
*/
    __pyx_t_18.__pyx_n = 3;
    __pyx_t_18.cls = __pyx_t_11;
    __pyx_t_18.input_msg = __pyx_mstate_global->__pyx_kp_u_diff_dtobj;
    __pyx_t_18.error_msg = ((PyObject*)__pyx_t_17);
    __pyx_f_7cytimes_6errors_raise_error(__pyx_t_3, 0, &__pyx_t_18); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3264, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

    /* "cytimes/pydt.py":3263
 *         m_aware: cython.bint = m_tz is not None
 *         o_aware: cython.bint = o_tz is not None
 *         if m_aware != o_aware:             # <<<<<<<<<<<<<<
 *             errors.raise_error(
 *                 errors.MixedTimezoneError,
*/
  }

  /* "cytimes/pydt.py":3274
 * 
 *         # Compute delta
 *         m_us: cython.longlong = utils.dt_to_us(self, m_aware)             # <<<<<<<<<<<<<<
 *         o_us: cython.longlong = utils.dt_to_us(o, o_aware)
 *         return utils.td_fr_us(m_us - o_us, None)
*/
  __pyx_t_20.__pyx_n = 1;
  __pyx_t_20.utc = __pyx_v_m_aware;
  __pyx_t_19 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_self), &__pyx_t_20); if (unlikely(__pyx_t_19 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3274, __pyx_L1_error)
  __pyx_v_m_us = __pyx_t_19;

  /* "cytimes/pydt.py":3275
 *         # Compute delta
 *         m_us: cython.longlong = utils.dt_to_us(self, m_aware)
 *         o_us: cython.longlong = utils.dt_to_us(o, o_aware)             # <<<<<<<<<<<<<<
 *         return utils.td_fr_us(m_us - o_us, None)
 * 
*/
  if (!(likely(((__pyx_v_o) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_o, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 3275, __pyx_L1_error)
  __pyx_t_20.__pyx_n = 1;
  __pyx_t_20.utc = __pyx_v_o_aware;
  __pyx_t_19 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_o), &__pyx_t_20); if (unlikely(__pyx_t_19 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 3275, __pyx_L1_error)
  __pyx_v_o_us = __pyx_t_19;

  /* "cytimes/pydt.py":3276
 *         m_us: cython.longlong = utils.dt_to_us(self, m_aware)
 *         o_us: cython.longlong = utils.dt_to_us(o, o_aware)
 *         return utils.td_fr_us(m_us - o_us, None)             # <<<<<<<<<<<<<<
 * 
 *     # Comparison ---------------------------------------------------------------------------
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_21.__pyx_n = 1;
  __pyx_t_21.tdclass = Py_None;
  __pyx_t_17 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us((__pyx_v_m_us - __pyx_v_o_us), &__pyx_t_21)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_r = __pyx_t_17;
  __pyx_t_17 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3218
 *         return NotImplemented
 * 
 *     def __sub__(self, o: object) -> Self | datetime.timedelta:             # <<<<<<<<<<<<<<
 *         # timedelta
 *         if utils.is_td(o):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m_tz);
  __Pyx_XDECREF(__pyx_v_o_tz);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3279
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_past(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_255is_past(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_past(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_past", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_past); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_255is_past)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3279, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3279, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":3287
 *         >>> self < datetime.datetime.now(self.tzinfo)
 *         """
 *         return self < utils.dt_now(self.access_tzinfo())             # <<<<<<<<<<<<<<
 * 
 *     @cython.ccall
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.tzinfo = __pyx_t_1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
  __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, 3287, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3279
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_past(self) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_past", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_255is_past(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_254is_past, "Check whether is in the past `<'bool'>`.\n\n        ## Equivalent\n        >>> self < datetime.datetime.now(self.tzinfo)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_255is_past = {"is_past", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_255is_past, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_254is_past};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_255is_past(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_past (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_past", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_past", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_254is_past(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_254is_past(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("is_past", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_past(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3279, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_past", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3289
 *         return self < utils.dt_now(self.access_tzinfo())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_future(self) -> cython.bint:
*/

static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_257is_future(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static int __pyx_f_7cytimes_4pydt_5_Pydt_is_future(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, int __pyx_skip_dispatch) {
  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;
  size_t __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_future", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (
  #if !CYTHON_USE_TYPE_SLOTS
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt &&
  __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
  #else
  unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
  #endif
  ) {
    #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_is_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7cytimes_4pydt_5_Pydt_257is_future)) {
        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; 
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3289, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3289, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __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_typedict_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
  }

  /* "cytimes/pydt.py":3297
 *         >>> self > datetime.datetime.now(self.tzinfo)
 *         """
 *         return self > utils.dt_now(self.access_tzinfo())             # <<<<<<<<<<<<<<
 * 
 *     # Representation -----------------------------------------------------------------------
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.tzinfo = __pyx_t_1;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __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, 3297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3289
 *         return self < utils.dt_now(self.access_tzinfo())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_future(self) -> cython.bint:
*/

  /* 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("cytimes.pydt._Pydt.is_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_257is_future(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_5_Pydt_256is_future, "Check whether is in the future `<'bool'>`.\n\n        ## Equivalent\n        >>> self > datetime.datetime.now(self.tzinfo)\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_257is_future = {"is_future", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_257is_future, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_256is_future};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_257is_future(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_future (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_future", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_future", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_256is_future(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_256is_future(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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("is_future", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt_is_future(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3289, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.is_future", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3300
 * 
 *     # Representation -----------------------------------------------------------------------
 *     def __repr__(self) -> str:             # <<<<<<<<<<<<<<
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_259__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_259__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_258__repr__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_258__repr__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  int __pyx_v_yy;
  int __pyx_v_mm;
  int __pyx_v_dd;
  int __pyx_v_hh;
  int __pyx_v_mi;
  int __pyx_v_ss;
  int __pyx_v_us;
  PyObject *__pyx_v_tz = 0;
  int __pyx_v_fd;
  PyObject *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8[11];
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[13];
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cytimes/pydt.py":3301
 *     # Representation -----------------------------------------------------------------------
 *     def __repr__(self) -> str:
 *         yy: cython.int = self.access_year()             # <<<<<<<<<<<<<<
 *         mm: cython.int = self.access_month()
 *         dd: cython.int = self.access_day()
*/
  __pyx_v_yy = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3302
 *     def __repr__(self) -> str:
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()             # <<<<<<<<<<<<<<
 *         dd: cython.int = self.access_day()
 *         hh: cython.int = self.access_hour()
*/
  __pyx_v_mm = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3303
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
 *         dd: cython.int = self.access_day()             # <<<<<<<<<<<<<<
 *         hh: cython.int = self.access_hour()
 *         mi: cython.int = self.access_minute()
*/
  __pyx_v_dd = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3304
 *         mm: cython.int = self.access_month()
 *         dd: cython.int = self.access_day()
 *         hh: cython.int = self.access_hour()             # <<<<<<<<<<<<<<
 *         mi: cython.int = self.access_minute()
 *         ss: cython.int = self.access_second()
*/
  __pyx_v_hh = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3305
 *         dd: cython.int = self.access_day()
 *         hh: cython.int = self.access_hour()
 *         mi: cython.int = self.access_minute()             # <<<<<<<<<<<<<<
 *         ss: cython.int = self.access_second()
 *         us: cython.int = self.access_microsecond()
*/
  __pyx_v_mi = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3306
 *         hh: cython.int = self.access_hour()
 *         mi: cython.int = self.access_minute()
 *         ss: cython.int = self.access_second()             # <<<<<<<<<<<<<<
 *         us: cython.int = self.access_microsecond()
 *         tz: object = self.access_tzinfo()
*/
  __pyx_v_ss = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3307
 *         mi: cython.int = self.access_minute()
 *         ss: cython.int = self.access_second()
 *         us: cython.int = self.access_microsecond()             # <<<<<<<<<<<<<<
 *         tz: object = self.access_tzinfo()
 *         fd: cython.int = self.access_fold()
*/
  __pyx_v_us = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3308
 *         ss: cython.int = self.access_second()
 *         us: cython.int = self.access_microsecond()
 *         tz: object = self.access_tzinfo()             # <<<<<<<<<<<<<<
 *         fd: cython.int = self.access_fold()
 * 
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/pydt.py":3309
 *         us: cython.int = self.access_microsecond()
 *         tz: object = self.access_tzinfo()
 *         fd: cython.int = self.access_fold()             # <<<<<<<<<<<<<<
 * 
 *         r: str
*/
  __pyx_v_fd = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);

  /* "cytimes/pydt.py":3312
 * 
 *         r: str
 *         if us == 0:             # <<<<<<<<<<<<<<
 *             r = "%d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss)
 *         else:
*/
  __pyx_t_2 = (__pyx_v_us == 0);
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":3313
 *         r: str
 *         if us == 0:
 *             r = "%d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss)             # <<<<<<<<<<<<<<
 *         else:
 *             r = "%d, %d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss, us)
*/
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8[0] = __pyx_t_1;
    __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_8[2] = __pyx_t_3;
    __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_8[4] = __pyx_t_4;
    __pyx_t_8[5] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_8[6] = __pyx_t_5;
    __pyx_t_8[7] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_8[8] = __pyx_t_6;
    __pyx_t_8[9] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_8[10] = __pyx_t_7;
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 11, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 * 5 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127);
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __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;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_r = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "cytimes/pydt.py":3312
 * 
 *         r: str
 *         if us == 0:             # <<<<<<<<<<<<<<
 *             r = "%d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss)
 *         else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/pydt.py":3315
 *             r = "%d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss)
 *         else:
 *             r = "%d, %d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss, us)             # <<<<<<<<<<<<<<
 *         if tz is not None:
 *             r += ", tzinfo=%r" % tz
*/
  /*else*/ {
    __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_us, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10[0] = __pyx_t_9;
    __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[2] = __pyx_t_7;
    __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[4] = __pyx_t_6;
    __pyx_t_10[5] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[6] = __pyx_t_5;
    __pyx_t_10[7] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[8] = __pyx_t_4;
    __pyx_t_10[9] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[10] = __pyx_t_3;
    __pyx_t_10[11] = __pyx_mstate_global->__pyx_kp_u__3;
    __pyx_t_10[12] = __pyx_t_1;
    __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 2 * 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_r = ((PyObject*)__pyx_t_11);
    __pyx_t_11 = 0;
  }
  __pyx_L3:;

  /* "cytimes/pydt.py":3316
 *         else:
 *             r = "%d, %d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss, us)
 *         if tz is not None:             # <<<<<<<<<<<<<<
 *             r += ", tzinfo=%r" % tz
 *         if fd == 1:
*/
  __pyx_t_2 = (__pyx_v_tz != Py_None);
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":3317
 *             r = "%d, %d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss, us)
 *         if tz is not None:
 *             r += ", tzinfo=%r" % tz             # <<<<<<<<<<<<<<
 *         if fd == 1:
 *             r += ", fold=1"
*/
    __pyx_t_11 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_tzinfo_r, __pyx_v_tz); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_r, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_r, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":3316
 *         else:
 *             r = "%d, %d, %d, %d, %d, %d, %d" % (yy, mm, dd, hh, mi, ss, us)
 *         if tz is not None:             # <<<<<<<<<<<<<<
 *             r += ", tzinfo=%r" % tz
 *         if fd == 1:
*/
  }

  /* "cytimes/pydt.py":3318
 *         if tz is not None:
 *             r += ", tzinfo=%r" % tz
 *         if fd == 1:             # <<<<<<<<<<<<<<
 *             r += ", fold=1"
 * 
*/
  __pyx_t_2 = (__pyx_v_fd == 1);
  if (__pyx_t_2) {

    /* "cytimes/pydt.py":3319
 *             r += ", tzinfo=%r" % tz
 *         if fd == 1:
 *             r += ", fold=1"             # <<<<<<<<<<<<<<
 * 
 *         return "%s(%s)" % (self._cls().__name__, r)
*/
    __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_r, __pyx_mstate_global->__pyx_kp_u_fold_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_r, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cytimes/pydt.py":3318
 *         if tz is not None:
 *             r += ", tzinfo=%r" % tz
 *         if fd == 1:             # <<<<<<<<<<<<<<
 *             r += ", fold=1"
 * 
*/
  }

  /* "cytimes/pydt.py":3321
 *             r += ", fold=1"
 * 
 *         return "%s(%s)" % (self._cls().__name__, r)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self) -> str:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_11), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_12[0] = __pyx_t_1;
  __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__13;
  __pyx_t_12[2] = __pyx_v_r;
  __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u_;
  __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_12, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_r), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_r));
  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3300
 * 
 *     # Representation -----------------------------------------------------------------------
 *     def __repr__(self) -> str:             # <<<<<<<<<<<<<<
 *         yy: cython.int = self.access_year()
 *         mm: cython.int = self.access_month()
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3323
 *         return "%s(%s)" % (self._cls().__name__, r)
 * 
 *     def __str__(self) -> str:             # <<<<<<<<<<<<<<
 *         return self.isoformat(" ")
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_261__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_261__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_260__str__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

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

  /* "cytimes/pydt.py":3324
 * 
 *     def __str__(self) -> str:
 *         return self.isoformat(" ")             # <<<<<<<<<<<<<<
 * 
 *     def __format__(self, fmt: str) -> str:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.sep = __pyx_mstate_global->__pyx_kp_u__8;
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->isoformat(__pyx_v_self, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3323
 *         return "%s(%s)" % (self._cls().__name__, r)
 * 
 *     def __str__(self) -> str:             # <<<<<<<<<<<<<<
 *         return self.isoformat(" ")
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3326
 *         return self.isoformat(" ")
 * 
 *     def __format__(self, fmt: str) -> str:             # <<<<<<<<<<<<<<
 *         if fmt is None or str_len(fmt) == 0:
 *             return self.isoformat(" ")
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_263__format__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_263__format__ = {"__format__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_263__format__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_263__format__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_fmt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__format__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fmt,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3326, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3326, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__format__", 0) < (0)) __PYX_ERR(0, 3326, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__format__", 1, 1, 1, i); __PYX_ERR(0, 3326, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3326, __pyx_L3_error)
    }
    __pyx_v_fmt = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__format__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3326, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__format__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fmt), (&PyUnicode_Type), 0, "fmt", 2))) __PYX_ERR(0, 3326, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_262__format__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v_fmt);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_262__format__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__format__", 0);

  /* "cytimes/pydt.py":3327
 * 
 *     def __format__(self, fmt: str) -> str:
 *         if fmt is None or str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *             return self.isoformat(" ")
 *         else:
*/
  __pyx_t_2 = (__pyx_v_fmt == ((PyObject*)Py_None));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (PyUnicode_GET_LENGTH(__pyx_v_fmt) == 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/pydt.py":3328
 *     def __format__(self, fmt: str) -> str:
 *         if fmt is None or str_len(fmt) == 0:
 *             return self.isoformat(" ")             # <<<<<<<<<<<<<<
 *         else:
 *             return self.strftime(fmt)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4.__pyx_n = 1;
    __pyx_t_4.sep = __pyx_mstate_global->__pyx_kp_u__8;
    __pyx_t_3 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->isoformat(__pyx_v_self, 0, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytimes/pydt.py":3327
 * 
 *     def __format__(self, fmt: str) -> str:
 *         if fmt is None or str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *             return self.isoformat(" ")
 *         else:
*/
  }

  /* "cytimes/pydt.py":3330
 *             return self.isoformat(" ")
 *         else:
 *             return self.strftime(fmt)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self) -> int:
*/
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->strftime(__pyx_v_self, __pyx_v_fmt, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "cytimes/pydt.py":3326
 *         return self.isoformat(" ")
 * 
 *     def __format__(self, fmt: str) -> str:             # <<<<<<<<<<<<<<
 *         if fmt is None or str_len(fmt) == 0:
 *             return self.isoformat(" ")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__format__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3332
 *             return self.strftime(fmt)
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__hash__(self)
 * 
*/

/* Python wrapper */
static Py_hash_t __pyx_pw_7cytimes_4pydt_5_Pydt_265__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_7cytimes_4pydt_5_Pydt_265__hash__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_264__hash__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

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

  /* "cytimes/pydt.py":3333
 * 
 *     def __hash__(self) -> int:
 *         return datetime.datetime.__hash__(self)             # <<<<<<<<<<<<<<
 * 
 *     def __copy__(self) -> Self:
*/
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hash, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3332
 *             return self.strftime(fmt)
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__hash__(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__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;
}

/* "cytimes/pydt.py":3335
 *         return datetime.datetime.__hash__(self)
 * 
 *     def __copy__(self) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_267__copy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_267__copy__ = {"__copy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_267__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_267__copy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__copy__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__copy__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_266__copy__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_266__copy__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  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_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__copy__", 0);

  /* "cytimes/pydt.py":3336
 * 
 *     def __copy__(self) -> Self:
 *         return utils.dt_new(             # <<<<<<<<<<<<<<
 *             self.access_year(),
 *             self.access_month(),
*/
  __Pyx_XDECREF(__pyx_r);

  /* "cytimes/pydt.py":3344
 *             self.access_second(),
 *             self.access_microsecond(),
 *             self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *             self.access_fold(),
 *             self._cls(),
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":3346
 *             self.access_tzinfo(),
 *             self.access_fold(),
 *             self._cls(),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":3336
 * 
 *     def __copy__(self) -> Self:
 *         return utils.dt_new(             # <<<<<<<<<<<<<<
 *             self.access_year(),
 *             self.access_month(),
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);
  __pyx_t_4.month = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);
  __pyx_t_4.day = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  __pyx_t_4.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
  __pyx_t_4.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
  __pyx_t_4.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
  __pyx_t_4.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
  __pyx_t_4.tzinfo = __pyx_t_1;
  __pyx_t_4.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
  __pyx_t_4.dtclass = __pyx_t_2;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3336, __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;

  /* "cytimes/pydt.py":3335
 *         return datetime.datetime.__hash__(self)
 * 
 *     def __copy__(self) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3349
 *         )
 * 
 *     def __deepcopy__(self, _: dict) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_269__deepcopy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_269__deepcopy__ = {"__deepcopy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_269__deepcopy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_269__deepcopy__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v__ = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u__14,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3349, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3349, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__deepcopy__", 0) < (0)) __PYX_ERR(0, 3349, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 1, 1, i); __PYX_ERR(0, 3349, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3349, __pyx_L3_error)
    }
    __pyx_v__ = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3349, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__), (&PyDict_Type), 0, "_", 2))) __PYX_ERR(0, 3349, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_268__deepcopy__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), __pyx_v__);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_268__deepcopy__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v__) {
  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_7cytimes_5utils_dt_new __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__deepcopy__", 0);

  /* "cytimes/pydt.py":3350
 * 
 *     def __deepcopy__(self, _: dict) -> Self:
 *         return utils.dt_new(             # <<<<<<<<<<<<<<
 *             self.access_year(),
 *             self.access_month(),
*/
  __Pyx_XDECREF(__pyx_r);

  /* "cytimes/pydt.py":3358
 *             self.access_second(),
 *             self.access_microsecond(),
 *             self.access_tzinfo(),             # <<<<<<<<<<<<<<
 *             self.access_fold(),
 *             self._cls(),
*/
  __pyx_t_1 = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_tzinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/pydt.py":3360
 *             self.access_tzinfo(),
 *             self.access_fold(),
 *             self._cls(),             # <<<<<<<<<<<<<<
 *         )
 * 
*/
  __pyx_t_2 = __pyx_f_7cytimes_4pydt_5_Pydt__cls(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cytimes/pydt.py":3350
 * 
 *     def __deepcopy__(self, _: dict) -> Self:
 *         return utils.dt_new(             # <<<<<<<<<<<<<<
 *             self.access_year(),
 *             self.access_month(),
*/
  __pyx_t_4.__pyx_n = 10;
  __pyx_t_4.year = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_year(__pyx_v_self, 0);
  __pyx_t_4.month = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_month(__pyx_v_self, 0);
  __pyx_t_4.day = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_day(__pyx_v_self, 0);
  __pyx_t_4.hour = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_hour(__pyx_v_self, 0);
  __pyx_t_4.minute = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_minute(__pyx_v_self, 0);
  __pyx_t_4.second = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_second(__pyx_v_self, 0);
  __pyx_t_4.microsecond = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_microsecond(__pyx_v_self, 0);
  __pyx_t_4.tzinfo = __pyx_t_1;
  __pyx_t_4.fold = ((struct __pyx_vtabstruct_7cytimes_4pydt__Pydt *)__pyx_v_self->__pyx_vtab)->access_fold(__pyx_v_self, 0);
  __pyx_t_4.dtclass = __pyx_t_2;
  __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3350, __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;

  /* "cytimes/pydt.py":3349
 *         )
 * 
 *     def __deepcopy__(self, _: dict) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3364
 * 
 *     # Pickle -------------------------------------------------------------------------------
 *     def __reduce__(self) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce__(self)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_271__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_271__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_271__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_271__reduce__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_270__reduce__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_270__reduce__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "cytimes/pydt.py":3365
 *     # Pickle -------------------------------------------------------------------------------
 *     def __reduce__(self) -> str | tuple:
 *         return datetime.datetime.__reduce__(self)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce_ex__(self, protocol: object, /) -> str | tuple:
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reduce, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3364
 * 
 *     # Pickle -------------------------------------------------------------------------------
 *     def __reduce__(self) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce__(self)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3367
 *         return datetime.datetime.__reduce__(self)
 * 
 *     def __reduce_ex__(self, protocol: object, /) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce_ex__(self, protocol)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_273__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_4pydt_5_Pydt_273__reduce_ex__ = {"__reduce_ex__", (PyCFunction)__pyx_pw_7cytimes_4pydt_5_Pydt_273__reduce_ex__, METH_O, 0};
static PyObject *__pyx_pw_7cytimes_4pydt_5_Pydt_273__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_ex__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_4pydt_5_Pydt_272__reduce_ex__(((struct __pyx_obj_7cytimes_4pydt__Pydt *)__pyx_v_self), ((PyObject *)__pyx_v_protocol));

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

static PyObject *__pyx_pf_7cytimes_4pydt_5_Pydt_272__reduce_ex__(struct __pyx_obj_7cytimes_4pydt__Pydt *__pyx_v_self, PyObject *__pyx_v_protocol) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_ex__", 0);

  /* "cytimes/pydt.py":3368
 * 
 *     def __reduce_ex__(self, protocol: object, /) -> str | tuple:
 *         return datetime.datetime.__reduce_ex__(self, protocol)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_protocol};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reduce_ex, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3367
 *         return datetime.datetime.__reduce__(self)
 * 
 *     def __reduce_ex__(self, protocol: object, /) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce_ex__(self, protocol)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cytimes.pydt._Pydt.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/pydt.py":3381
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         year: int = 1,
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_4pydt_4Pydt_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_4pydt_4Pydt___new__, "A drop-in replacement for the standard `<'datetime.datetime'>`\n        class, providing additional functionalities for more convenient\n        datetime operations:\n\n        - 1. rich calendar arithmetic (to_month, to_start_of, to_first_of, etc.)\n        - 2. powerful parsing (parse, ISO, ordinal, isoweek, etc.)\n        - 3. explicit, safe timezone conversion with fold & DST normalization.\n\n        :param year `<'int'>`: Year value (1-9999). Defaults to `1`.\n        :param month `<'int'>`: Month value (1-12). Defaults to `1`.\n        :param day `<'int'>`: Day value (1-31). Defaults to `1`.\n        :param hour `<'int'>`: Hour value (0-23). Defaults to `0`.\n        :param minute `<'int'>`: Minute value (0-59). Defaults to `0`.\n        :param second `<'int'>`: Second value (0-59). Defaults to `0`.\n        :param microsecond `<'int'>`: Microsecond value (0-999999). Defaults to `0`.\n        :param tzinfo `<'tzinfo/str/None'>`: The timezone. Defaults to `None`.\n\n            - `<'None'>` Timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :param fold `<'int'>`: Fold value (0 or 1) for ambiguous times. Defaults to `1`.\n        ");
static PyMethodDef __pyx_mdef_7cytimes_4pydt_4Pydt_1__new__ = {"__new__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_4Pydt_1__new__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_4Pydt___new__};
static PyObject *__pyx_pw_7cytimes_4pydt_4Pydt_1__new__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_year = 0;
  PyObject *__pyx_v_month = 0;
  PyObject *__pyx_v_day = 0;
  PyObject *__pyx_v_hour = 0;
  PyObject *__pyx_v_minute = 0;
  PyObject *__pyx_v_second = 0;
  PyObject *__pyx_v_microsecond = 0;
  PyObject *__pyx_v_tzinfo = 0;
  PyObject *__pyx_v_fold = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_year,&__pyx_mstate_global->__pyx_n_u_month,&__pyx_mstate_global->__pyx_n_u_day,&__pyx_mstate_global->__pyx_n_u_hour,&__pyx_mstate_global->__pyx_n_u_minute,&__pyx_mstate_global->__pyx_n_u_second,&__pyx_mstate_global->__pyx_n_u_microsecond,&__pyx_mstate_global->__pyx_n_u_tzinfo,&__pyx_mstate_global->__pyx_n_u_fold,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3381, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__new__", 0) < (0)) __PYX_ERR(0, 3381, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));

      /* "cytimes/pydt.py":3390
 *         second: int = 0,
 *         microsecond: int = 0,
 *         tzinfo: datetime.tzinfo | str | None = None,             # <<<<<<<<<<<<<<
 *         *,
 *         fold: int = 1,
*/
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 9, i); __PYX_ERR(0, 3381, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  9:
        values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  8:
        values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  7:
        values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  6:
        values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  5:
        values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3381, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3381, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[2]) values[2] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
      if (!values[4]) values[4] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[5]) values[5] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[6]) values[6] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[7]) values[7] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_0)));
      if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
      if (!values[9]) values[9] = __Pyx_NewRef(((PyObject*)((PyObject*)__pyx_mstate_global->__pyx_int_1)));
    }
    __pyx_v_cls = values[0];
    if (__Pyx_PyInt_FromNumber(&values[1], "year", 0) < (0)) __PYX_ERR(0, 3383, __pyx_L3_error)
    __pyx_v_year = ((PyObject*)values[1]);
    if (__Pyx_PyInt_FromNumber(&values[2], "month", 0) < (0)) __PYX_ERR(0, 3384, __pyx_L3_error)
    __pyx_v_month = ((PyObject*)values[2]);
    if (__Pyx_PyInt_FromNumber(&values[3], "day", 0) < (0)) __PYX_ERR(0, 3385, __pyx_L3_error)
    __pyx_v_day = ((PyObject*)values[3]);
    if (__Pyx_PyInt_FromNumber(&values[4], "hour", 0) < (0)) __PYX_ERR(0, 3386, __pyx_L3_error)
    __pyx_v_hour = ((PyObject*)values[4]);
    if (__Pyx_PyInt_FromNumber(&values[5], "minute", 0) < (0)) __PYX_ERR(0, 3387, __pyx_L3_error)
    __pyx_v_minute = ((PyObject*)values[5]);
    if (__Pyx_PyInt_FromNumber(&values[6], "second", 0) < (0)) __PYX_ERR(0, 3388, __pyx_L3_error)
    __pyx_v_second = ((PyObject*)values[6]);
    if (__Pyx_PyInt_FromNumber(&values[7], "microsecond", 0) < (0)) __PYX_ERR(0, 3389, __pyx_L3_error)
    __pyx_v_microsecond = ((PyObject*)values[7]);
    __pyx_v_tzinfo = values[8];
    if (__Pyx_PyInt_FromNumber(&values[9], "fold", 0) < (0)) __PYX_ERR(0, 3392, __pyx_L3_error)
    __pyx_v_fold = ((PyObject*)values[9]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 9, __pyx_nargs); __PYX_ERR(0, 3381, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("cytimes.pydt.Pydt.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_year), (&PyLong_Type), 0, "year", 2))) __PYX_ERR(0, 3383, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_month), (&PyLong_Type), 0, "month", 2))) __PYX_ERR(0, 3384, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_day), (&PyLong_Type), 0, "day", 2))) __PYX_ERR(0, 3385, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hour), (&PyLong_Type), 0, "hour", 2))) __PYX_ERR(0, 3386, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_minute), (&PyLong_Type), 0, "minute", 2))) __PYX_ERR(0, 3387, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_second), (&PyLong_Type), 0, "second", 2))) __PYX_ERR(0, 3388, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_microsecond), (&PyLong_Type), 0, "microsecond", 2))) __PYX_ERR(0, 3389, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fold), (&PyLong_Type), 0, "fold", 2))) __PYX_ERR(0, 3392, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_4pydt_4Pydt___new__(__pyx_self, __pyx_v_cls, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_tzinfo, __pyx_v_fold);

  /* "cytimes/pydt.py":3381
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         year: int = 1,
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  goto __pyx_L7_cleaned_up;
  __pyx_L0:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __pyx_L7_cleaned_up:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7cytimes_4pydt_4Pydt___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_microsecond, PyObject *__pyx_v_tzinfo, PyObject *__pyx_v_fold) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "cytimes/pydt.py":3417
 *         :param fold `<'int'>`: Fold value (0 or 1) for ambiguous times. Defaults to `1`.
 *         """
 *         return cls._new(             # <<<<<<<<<<<<<<
 *             year=year,
 *             month=month,
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_v_cls;
  __Pyx_INCREF(__pyx_t_2);

  /* "cytimes/pydt.py":3426
 *             microsecond=microsecond,
 *             tzinfo=tzinfo,
 *             fold=fold,             # <<<<<<<<<<<<<<
 *         )
*/
  __pyx_t_3 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_year, __pyx_v_year, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_month, __pyx_v_month, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_day, __pyx_v_day, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_v_hour, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_v_minute, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_v_second, __pyx_t_4, __pyx_callargs+1, 5) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_v_microsecond, __pyx_t_4, __pyx_callargs+1, 6) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tzinfo, __pyx_t_4, __pyx_callargs+1, 7) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_v_fold, __pyx_t_4, __pyx_callargs+1, 8) < (0)) __PYX_ERR(0, 3417, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_new_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cytimes/pydt.py":3381
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         year: int = 1,
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.pydt.Pydt.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */
static struct __pyx_vtabstruct_7cytimes_4pydt__Pydt __pyx_vtable_7cytimes_4pydt__Pydt;

static PyObject *__pyx_tp_new_7cytimes_4pydt__Pydt(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *p;
  PyObject *o = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime, tp_new, newfunc)(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7cytimes_4pydt__Pydt *)o);
  p->__pyx_vtab = __pyx_vtabptr_7cytimes_4pydt__Pydt;
  p->_Pydt__cls = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7cytimes_4pydt__Pydt(PyObject *o) {
  struct __pyx_obj_7cytimes_4pydt__Pydt *p = (struct __pyx_obj_7cytimes_4pydt__Pydt *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7cytimes_4pydt__Pydt) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_Pydt__cls);
  if (PyType_IS_GC(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime)) PyObject_GC_Track(o);
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime)) __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime, tp_dealloc, destructor)(o); else
  #endif
  __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_7cytimes_4pydt__Pydt);
}

static int __pyx_tp_traverse_7cytimes_4pydt__Pydt(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7cytimes_4pydt__Pydt *p = (struct __pyx_obj_7cytimes_4pydt__Pydt *)o;
  #if !CYTHON_USE_MODULE_STATE
  e = 0;
  if (likely(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime)) {
    traverseproc traverse = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime, tp_traverse, traverseproc);
    if (traverse) { e = traverse(o, v, a); }
  } else
  #endif
  { e = __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_7cytimes_4pydt__Pydt); }
  if (e) return e;
  {
    e = __Pyx_call_type_traverse(o, 0, v, a);
    if (e) return e;
  }
  if (p->_Pydt__cls) {
    e = (*v)(p->_Pydt__cls, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7cytimes_4pydt__Pydt(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7cytimes_4pydt__Pydt *p = (struct __pyx_obj_7cytimes_4pydt__Pydt *)o;
  #if !CYTHON_USE_MODULE_STATE
  if (likely(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime)) {
    inquiry clear = __Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime, tp_clear, inquiry);
    if (clear) clear(o);
  } else
  #endif
  { __Pyx_call_next_tp_clear(o, __pyx_tp_clear_7cytimes_4pydt__Pydt); }
  tmp = ((PyObject*)p->_Pydt__cls);
  p->_Pydt__cls = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static CYTHON_INLINE PyObject *__pyx_nb_add_7cytimes_4pydt__Pydt_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_add_7cytimes_4pydt__Pydt(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_7cytimes_4pydt__Pydt)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_7cytimes_4pydt_5_Pydt_249__add__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_7cytimes_4pydt__Pydt)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    if (maybe_self_is_right) {
        return __pyx_pw_7cytimes_4pydt_5_Pydt_251__radd__(right, left);
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static CYTHON_INLINE PyObject *__pyx_nb_subtract_7cytimes_4pydt__Pydt_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) {
    binaryfunc slot;
#if CYTHON_USE_TYPE_SLOTS
    slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL;
#else
    slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract);
#endif
    return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented);
}
static PyObject *__pyx_nb_subtract_7cytimes_4pydt__Pydt(PyObject *left, PyObject *right ) {
    int maybe_self_is_left, maybe_self_is_right = 0;
    maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_7cytimes_4pydt__Pydt)
#endif
            || __Pyx_TypeCheck(left, __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    if (maybe_self_is_left) {
        PyObject *res;
        res = __pyx_pw_7cytimes_4pydt_5_Pydt_253__sub__(left, right);
        if (res != Py_NotImplemented) return res;
        Py_DECREF(res);
    }
    maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right)
#if CYTHON_USE_TYPE_SLOTS
            || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_7cytimes_4pydt__Pydt)
#endif
            || PyType_IsSubtype(Py_TYPE(right), __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt);
    if (maybe_self_is_right) {
        return __pyx_nb_subtract_7cytimes_4pydt__Pydt_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, tp_base, PyTypeObject*), left, right );
    }
    return __Pyx_NewRef(Py_NotImplemented);
}



static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_year(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_4year_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_quarter(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_7quarter_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_month(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_5month_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_weekday(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_7weekday_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_day(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_3day_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_hour(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_4hour_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_minute(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_6minute_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_second(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_6second_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_millisecond(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_11millisecond_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_microsecond(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_11microsecond_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_tz_available(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_12tz_available_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_tz(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_2tz_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_tzinfo(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_6tzinfo_1__get__(o);
}

static PyObject *__pyx_getprop_7cytimes_4pydt_5_Pydt_fold(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7cytimes_4pydt_5_Pydt_4fold_1__get__(o);
}

static PyMethodDef __pyx_methods_7cytimes_4pydt__Pydt[] = {
  {"_new", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_1_new, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt__new},
  {"parse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_3parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_2parse},
  {"now", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_5now, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_4now},
  {"utcnow", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_7utcnow, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_6utcnow},
  {"today", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_9today, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_8today},
  {"combine", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_11combine, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_10combine},
  {"fromordinal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_13fromordinal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_12fromordinal},
  {"fromseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_15fromseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_14fromseconds},
  {"frommicroseconds", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_17frommicroseconds, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_16frommicroseconds},
  {"fromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_19fromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_18fromtimestamp},
  {"utcfromtimestamp", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_21utcfromtimestamp, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_20utcfromtimestamp},
  {"fromisoformat", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_23fromisoformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_22fromisoformat},
  {"fromisocalendar", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_25fromisocalendar, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_24fromisocalendar},
  {"fromdayofyear", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_27fromdayofyear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_26fromdayofyear},
  {"fromdate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_29fromdate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_28fromdate},
  {"fromdatetime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_31fromdatetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_30fromdatetime},
  {"fromdatetime64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_33fromdatetime64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_32fromdatetime64},
  {"strptime", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_35strptime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_4pydt_5_Pydt_34strptime},
  {"__add__", (PyCFunction)__pyx_pw_7cytimes_4pydt_5_Pydt_249__add__, METH_O|METH_COEXIST, 0},
  {"__radd__", (PyCFunction)__pyx_pw_7cytimes_4pydt_5_Pydt_251__radd__, METH_O|METH_COEXIST, 0},
  {"__sub__", (PyCFunction)__pyx_pw_7cytimes_4pydt_5_Pydt_253__sub__, METH_O|METH_COEXIST, 0},
  {"__format__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_263__format__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__copy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_267__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__deepcopy__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_269__deepcopy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_4pydt_5_Pydt_271__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
  {"__reduce_ex__", (PyCFunction)__pyx_pw_7cytimes_4pydt_5_Pydt_273__reduce_ex__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7cytimes_4pydt__Pydt[] = {
  {"year", __pyx_getprop_7cytimes_4pydt_5_Pydt_year, 0, PyDoc_STR("The year (1-9999) `<'int'>`."), 0},
  {"quarter", __pyx_getprop_7cytimes_4pydt_5_Pydt_quarter, 0, PyDoc_STR("The quarter (1-4) `<'int'>`."), 0},
  {"month", __pyx_getprop_7cytimes_4pydt_5_Pydt_month, 0, PyDoc_STR("The month (1-12) `<'int'>`."), 0},
  {"weekday", __pyx_getprop_7cytimes_4pydt_5_Pydt_weekday, 0, PyDoc_STR("The weekday (0=Mon...6=Sun) `<'int'>`."), 0},
  {"day", __pyx_getprop_7cytimes_4pydt_5_Pydt_day, 0, PyDoc_STR("The day (1-31) `<'int'>`."), 0},
  {"hour", __pyx_getprop_7cytimes_4pydt_5_Pydt_hour, 0, PyDoc_STR("The hour (0-23) `<'int'>`."), 0},
  {"minute", __pyx_getprop_7cytimes_4pydt_5_Pydt_minute, 0, PyDoc_STR("The minute (0-59) `<'int'>`."), 0},
  {"second", __pyx_getprop_7cytimes_4pydt_5_Pydt_second, 0, PyDoc_STR("The second (0-59) `<'int'>`."), 0},
  {"millisecond", __pyx_getprop_7cytimes_4pydt_5_Pydt_millisecond, 0, PyDoc_STR("The millisecond (0-999) part from microsecond `<'int'>`."), 0},
  {"microsecond", __pyx_getprop_7cytimes_4pydt_5_Pydt_microsecond, 0, PyDoc_STR("The microsecond (0-999999) `<'int'>`."), 0},
  {"tz_available", __pyx_getprop_7cytimes_4pydt_5_Pydt_tz_available, 0, PyDoc_STR("The available timezone names `<'set[str]'>`.\n\n        ## Equivalent\n        >>> zoneinfo.available_timezones()\n        "), 0},
  {"tz", __pyx_getprop_7cytimes_4pydt_5_Pydt_tz, 0, PyDoc_STR("The timezone information `<'tzinfo/None'>`.\n\n        - Alias of `tzinfo`\n        "), 0},
  {"tzinfo", __pyx_getprop_7cytimes_4pydt_5_Pydt_tzinfo, 0, PyDoc_STR("The timezone information `<'tzinfo/None'>`."), 0},
  {"fold", __pyx_getprop_7cytimes_4pydt_5_Pydt_fold, 0, PyDoc_STR("The fold value (0 or 1) for ambiguous times `<'int'>`.\n\n        - Use to disambiguates local times during\n          daylight saving time (DST) transitions.\n        "), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7cytimes_4pydt__Pydt_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7cytimes_4pydt__Pydt},
  {Py_tp_repr, (void *)__pyx_pw_7cytimes_4pydt_5_Pydt_259__repr__},
  {Py_nb_add, (void *)__pyx_nb_add_7cytimes_4pydt__Pydt},
  {Py_nb_subtract, (void *)__pyx_nb_subtract_7cytimes_4pydt__Pydt},
  {Py_tp_hash, (void *)__pyx_pw_7cytimes_4pydt_5_Pydt_265__hash__},
  {Py_tp_str, (void *)__pyx_pw_7cytimes_4pydt_5_Pydt_261__str__},
  {Py_tp_doc, (void *)PyDoc_STR("The base class for `<'Pydt'>`, a subclass of the cpython `<'datetime.datetime'>`.\n\n    - Do `NOT` instantiate the base class directly.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7cytimes_4pydt__Pydt},
  {Py_tp_clear, (void *)__pyx_tp_clear_7cytimes_4pydt__Pydt},
  {Py_tp_methods, (void *)__pyx_methods_7cytimes_4pydt__Pydt},
  {Py_tp_getset, (void *)__pyx_getsets_7cytimes_4pydt__Pydt},
  {Py_tp_new, (void *)__pyx_tp_new_7cytimes_4pydt__Pydt},
  {0, 0},
};
static PyType_Spec __pyx_type_7cytimes_4pydt__Pydt_spec = {
  "cytimes.pydt._Pydt",
  sizeof(struct __pyx_obj_7cytimes_4pydt__Pydt),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_7cytimes_4pydt__Pydt_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number__Pydt = {
  __pyx_nb_add_7cytimes_4pydt__Pydt, /*nb_add*/
  __pyx_nb_subtract_7cytimes_4pydt__Pydt, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_bool*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_int*/
  0, /*nb_long (reserved)*/
  0, /*nb_float*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  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*/
  0, /*nb_matrix_multiply*/
  0, /*nb_inplace_matrix_multiply*/
};

static PyTypeObject __pyx_type_7cytimes_4pydt__Pydt = {
  PyVarObject_HEAD_INIT(0, 0)
  "cytimes.pydt.""_Pydt", /*tp_name*/
  sizeof(struct __pyx_obj_7cytimes_4pydt__Pydt), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7cytimes_4pydt__Pydt, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  __pyx_pw_7cytimes_4pydt_5_Pydt_259__repr__, /*tp_repr*/
  &__pyx_tp_as_number__Pydt, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_7cytimes_4pydt_5_Pydt_265__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7cytimes_4pydt_5_Pydt_261__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("The base class for `<'Pydt'>`, a subclass of the cpython `<'datetime.datetime'>`.\n\n    - Do `NOT` instantiate the base class directly.\n    "), /*tp_doc*/
  __pyx_tp_traverse_7cytimes_4pydt__Pydt, /*tp_traverse*/
  __pyx_tp_clear_7cytimes_4pydt__Pydt, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7cytimes_4pydt__Pydt, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7cytimes_4pydt__Pydt, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7cytimes_4pydt__Pydt, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  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("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_t_1 = PyImport_ImportModule("datetime"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "datetime",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #else
  sizeof(PyDateTime_DateTime), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_DateTime),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_datetime) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_4pydt__Pydt = &__pyx_vtable_7cytimes_4pydt__Pydt;
  __pyx_vtable_7cytimes_4pydt__Pydt.ctime = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_ctime;
  __pyx_vtable_7cytimes_4pydt__Pydt.strftime = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_strftime;
  __pyx_vtable_7cytimes_4pydt__Pydt.isoformat = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_isoformat *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_isoformat;
  __pyx_vtable_7cytimes_4pydt__Pydt.timedict = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_timedict;
  __pyx_vtable_7cytimes_4pydt__Pydt.utctimedict = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_utctimedict;
  __pyx_vtable_7cytimes_4pydt__Pydt.timetuple = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_timetuple;
  __pyx_vtable_7cytimes_4pydt__Pydt.utctimetuple = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_utctimetuple;
  __pyx_vtable_7cytimes_4pydt__Pydt.toordinal = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_toordinal;
  __pyx_vtable_7cytimes_4pydt__Pydt.toseconds = (double (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_toseconds *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_toseconds;
  __pyx_vtable_7cytimes_4pydt__Pydt.tomicroseconds = (PY_LONG_LONG (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tomicroseconds *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_tomicroseconds;
  __pyx_vtable_7cytimes_4pydt__Pydt.timestamp = (double (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_timestamp;
  __pyx_vtable_7cytimes_4pydt__Pydt.date = (PyDateTime_Date *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_date;
  __pyx_vtable_7cytimes_4pydt__Pydt.time = (PyDateTime_Time *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_time;
  __pyx_vtable_7cytimes_4pydt__Pydt.timetz = (PyDateTime_Time *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_timetz;
  __pyx_vtable_7cytimes_4pydt__Pydt._cls = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *))__pyx_f_7cytimes_4pydt_5_Pydt__cls;
  __pyx_vtable_7cytimes_4pydt__Pydt.replace = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_replace *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_replace;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_curr_year = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_year *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_prev_year = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_year *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_next_year = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_year *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_next_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_year = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_year *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_curr_quarter = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_quarter *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_prev_quarter = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_quarter *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_next_quarter = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_quarter *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_next_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_quarter = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_quarter *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_curr_month = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_month *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_prev_month = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_month *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_next_month = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_month *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_next_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_month = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_month *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_monday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_monday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_tuesday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_tuesday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_wednesday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_wednesday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_thursday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_thursday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_friday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_friday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_saturday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_saturday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_sunday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_sunday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_curr_weekday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_curr_weekday *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_curr_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_prev_weekday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_prev_weekday *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_prev_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_next_weekday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_next_weekday *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_next_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_weekday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_weekday *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt._to_curr_weekday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int))__pyx_f_7cytimes_4pydt_5_Pydt__to_curr_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_yesterday = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_yesterday;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_tomorrow = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_tomorrow;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_day = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_day;
  __pyx_vtable_7cytimes_4pydt__Pydt.normalize = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_normalize;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_datetime = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_datetime *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_datetime;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_date = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_date *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_date;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_time = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_to_time *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_to_time;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_first_of = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_first_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_last_of = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_last_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_start_of = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_start_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.to_end_of = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_to_end_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_first_of = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_first_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_last_of = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_last_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_start_of = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_start_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_end_of = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_end_of;
  __pyx_vtable_7cytimes_4pydt__Pydt.round = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_round;
  __pyx_vtable_7cytimes_4pydt__Pydt.ceil = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_ceil;
  __pyx_vtable_7cytimes_4pydt__Pydt.floor = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_floor;
  __pyx_vtable_7cytimes_4pydt__Pydt.fsp = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_fsp;
  __pyx_vtable_7cytimes_4pydt__Pydt.isocalendar = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_isocalendar;
  __pyx_vtable_7cytimes_4pydt__Pydt.isoyear = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_isoyear;
  __pyx_vtable_7cytimes_4pydt__Pydt.isoweek = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_isoweek;
  __pyx_vtable_7cytimes_4pydt__Pydt.isoweekday = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_isoweekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_leap_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_leap_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_long_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_long_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.leap_bt_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_leap_bt_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_in_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_in_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_bf_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.day_of_year = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_day_of_year;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_quarter = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_quarter = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_in_quarter = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_in_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_bf_quarter = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.day_of_quarter = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_day_of_quarter;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_month = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_month = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_in_month = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_in_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.days_bf_month = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_days_bf_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.day_of_month = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_day_of_month;
  __pyx_vtable_7cytimes_4pydt__Pydt.month_name = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_month_name *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_month_name;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_weekday = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_weekday = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_weekday;
  __pyx_vtable_7cytimes_4pydt__Pydt.weekday_name = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_weekday_name *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_weekday_name;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_day = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_day;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_day = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_day;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_hour = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_hour;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_minute = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_minute;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_second = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_second;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_millisecond = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_millisecond;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_microsecond = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_microsecond;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_tzinfo = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_tzinfo;
  __pyx_vtable_7cytimes_4pydt__Pydt.access_fold = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_access_fold;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_local = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_local;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_utc = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_utc;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_dst = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_dst;
  __pyx_vtable_7cytimes_4pydt__Pydt.tzname = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_tzname;
  __pyx_vtable_7cytimes_4pydt__Pydt.utcoffset = (PyDateTime_Delta *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset;
  __pyx_vtable_7cytimes_4pydt__Pydt.utcoffset_seconds = (PyObject *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_utcoffset_seconds;
  __pyx_vtable_7cytimes_4pydt__Pydt.dst = (PyDateTime_Delta *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_dst;
  __pyx_vtable_7cytimes_4pydt__Pydt.astimezone = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_astimezone *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_astimezone;
  __pyx_vtable_7cytimes_4pydt__Pydt.tz_localize = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_tz_localize;
  __pyx_vtable_7cytimes_4pydt__Pydt.tz_convert = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_tz_convert;
  __pyx_vtable_7cytimes_4pydt__Pydt.tz_switch = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_tz_switch *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_tz_switch;
  __pyx_vtable_7cytimes_4pydt__Pydt.add = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_add *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_add;
  __pyx_vtable_7cytimes_4pydt__Pydt.sub = (struct __pyx_obj_7cytimes_4pydt__Pydt *(*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_sub *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_sub;
  __pyx_vtable_7cytimes_4pydt__Pydt.diff = (PY_LONG_LONG (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_4pydt_5_Pydt_diff *__pyx_optional_args))__pyx_f_7cytimes_4pydt_5_Pydt_diff;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_past = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_past;
  __pyx_vtable_7cytimes_4pydt__Pydt.is_future = (int (*)(struct __pyx_obj_7cytimes_4pydt__Pydt *, int __pyx_skip_dispatch))__pyx_f_7cytimes_4pydt_5_Pydt_is_future;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7cytimes_4pydt__Pydt_spec, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt)) __PYX_ERR(0, 98, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7cytimes_4pydt__Pydt_spec, __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt = &__pyx_type_7cytimes_4pydt__Pydt;
  #endif
  if (sizeof(struct __pyx_obj_7cytimes_4pydt__Pydt) != sizeof(PyDateTime_DateTime)) {
    if (__Pyx_validate_extern_base(__pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  }
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt->tp_base = __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt->tp_dictoffset && __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_vtabptr_7cytimes_4pydt__Pydt) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt) < (0)) __PYX_ERR(0, 98, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Pydt, (PyObject *) __pyx_mstate->__pyx_ptype_7cytimes_4pydt__Pydt) < (0)) __PYX_ERR(0, 98, __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_XDECREF(__pyx_t_2);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyTypeObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(7, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyLongObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyLongObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(8, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_2_1(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyComplexObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  0, 0,
  #else
  sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyComplexObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(9, 16, __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(2, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_date = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "date",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #else
  sizeof(PyDateTime_Date), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Date),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_date) __PYX_ERR(2, 43, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_time = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "time",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #else
  sizeof(PyDateTime_Time), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Time),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_time) __PYX_ERR(2, 56, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "timedelta",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #else
  sizeof(PyDateTime_Delta), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_Delta),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_timedelta) __PYX_ERR(2, 120, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo = __Pyx_ImportType_3_2_1(__pyx_t_1, "datetime", "tzinfo",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #else
  sizeof(PyDateTime_TZInfo), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyDateTime_TZInfo),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cpython_8datetime_tzinfo) __PYX_ERR(2, 133, __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, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "dtype",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #else
  sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArray_Descr),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 228, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "flatiter",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #else
  sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayIterObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 273, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "broadcast",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #else
  sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayMultiIterObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 277, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "ndarray",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #else
  sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyArrayObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 316, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_generic = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "generic",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_generic) __PYX_ERR(3, 825, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_number = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "number",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_number) __PYX_ERR(3, 827, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_integer = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "integer",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_integer) __PYX_ERR(3, 829, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "signedinteger",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_signedinteger) __PYX_ERR(3, 831, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "unsignedinteger",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(3, 833, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "inexact",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_inexact) __PYX_ERR(3, 835, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_floating = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "floating",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_floating) __PYX_ERR(3, 837, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "complexfloating",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_complexfloating) __PYX_ERR(3, 839, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "flexible",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_flexible) __PYX_ERR(3, 841, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_character = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "character",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #else
  sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_character) __PYX_ERR(3, 843, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_2_1(__pyx_t_1, "numpy", "ufunc",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #else
  sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(PyUFuncObject),
  #endif
  __Pyx_ImportType_CheckSize_Ignore_3_2_1); if (!__pyx_mstate->__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Configs",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Configs), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Configs),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs) __PYX_ERR(6, 246, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Configs = (struct __pyx_vtabstruct_7cytimes_6parser_Configs*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Configs); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Configs)) __PYX_ERR(6, 246, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Result = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Result",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Result), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Result),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Result) __PYX_ERR(6, 326, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Result = (struct __pyx_vtabstruct_7cytimes_6parser_Result*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Result); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Result)) __PYX_ERR(6, 326, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser = __Pyx_ImportType_3_2_1(__pyx_t_1, "cytimes.parser", "Parser",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #else
  sizeof(struct __pyx_obj_7cytimes_6parser_Parser), __PYX_GET_STRUCT_ALIGNMENT_3_2_1(struct __pyx_obj_7cytimes_6parser_Parser),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_1); if (!__pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser) __PYX_ERR(6, 374, __pyx_L1_error)
  __pyx_vtabptr_7cytimes_6parser_Parser = (struct __pyx_vtabstruct_7cytimes_6parser_Parser*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_7cytimes_6parser_Parser); if (unlikely(!__pyx_vtabptr_7cytimes_6parser_Parser)) __PYX_ERR(6, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  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("cytimes.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 185;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_7cytimes_5utils_DT64_NS_DD_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_DD_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_HH_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_HH_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MI_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MI_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MM_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MM_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_MS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_NS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_NS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_SS_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_SS_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_US_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_US_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_WW_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_WW_MIN, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_YY_MAX, (void **)&__pyx_vp_7cytimes_5utils_DT64_NS_YY_MIN, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C100, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C4, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_C400, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_CBASE, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_DAY, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_HOUR, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_MONTH, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_SECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_YEAR, (void **)&__pyx_vp_7cytimes_5utils_MS_DAY, (void **)&__pyx_vp_7cytimes_5utils_MS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_MS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_MS_SECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_DAY, (void **)&__pyx_vp_7cytimes_5utils_NS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_NS_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_NS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_NS_SECOND, (void **)&__pyx_vp_7cytimes_5utils_SS_DAY, (void **)&__pyx_vp_7cytimes_5utils_SS_HOUR, (void **)&__pyx_vp_7cytimes_5utils_SS_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_NANOSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_SECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_MICROSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_NANOSECOND, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_SECOND, (void **)&__pyx_vp_7cytimes_5utils_US_DAY, (void **)&__pyx_vp_7cytimes_5utils_US_HOUR, (void **)&__pyx_vp_7cytimes_5utils_US_MILLISECOND, (void **)&__pyx_vp_7cytimes_5utils_US_MINUTE, (void **)&__pyx_vp_7cytimes_5utils_US_SECOND, (void **)&__pyx_vp_7cytimes_5utils_EPOCH_DT, (void **)&__pyx_vp_7cytimes_5utils_UTC, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_AS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_DD, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_FS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_HH, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MI, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MM, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_MS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_NS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_PS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_SS, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_US, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_WW, (void **)&__pyx_vp_7cytimes_5utils_DT64_DTYPE_YY, (void **)&__pyx_vp_7cytimes_5utils_NAT, (void **)&__pyx_vp_7cytimes_5utils_T_TIMEZONE, (void **)&__pyx_vp_7cytimes_5utils_T_ZONEINFO, (void **)&__pyx_vp_7cytimes_5utils__LOCAL_TIMEZONE, (void **)&__pyx_vp_7cytimes_5utils__UTC_ALIASES, (void **)&__pyx_vp_7cytimes_5utils_TD64_MM_DAY, (void **)&__pyx_vp_7cytimes_5utils_TD64_YY_DAY, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_AS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_DD, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_FS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_HH, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MI, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MM, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_MS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_NS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_PS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_SS, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_US, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_WW, (void **)&__pyx_vp_7cytimes_5utils_DT_NPY_UNIT_YY, (void **)&__pyx_vp_7cytimes_5utils_NULL_TZOFFSET, (void **)&__pyx_vp_7cytimes_5utils_ORDINAL_MAX, (void **)&__pyx_vp_7cytimes_5utils_DAYS_BR_MONTH, (void **)&__pyx_vp_7cytimes_5utils_DAYS_IN_MONTH, (void **)&__pyx_vp_7cytimes_5utils_DAYS_BR_QUARTER, (void **)&__pyx_vp_7cytimes_5utils_DAYS_IN_QUARTER, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_struct___pyx_obj_7cytim);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 105;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_7cytimes_6parser__DEFAULT_AMPM, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_HMS, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_JUMP, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_MONTH, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_PERTAIN, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_TZ, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_UTC, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_WEEKDAY, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_CONFIGS, (void **)&__pyx_vp_7cytimes_6parser__DEFAULT_PARSER, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __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(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.utils"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_tz_parse);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 23;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_5utils_tz_parse, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.parser"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyDateTime_DateTime_PyObject_int);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 362;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_6parser_parse_obj, (void (**)(void))&__pyx_f_7cytimes_6parser_parse_month, (void (**)(void))&__pyx_f_7cytimes_6parser_parse_weekday, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  {
    __pyx_t_1 = PyImport_ImportModule("cytimes.errors"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_int_PyObject_int___pyx_skip_disp);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 227;
    void (**const __pyx_import_pointers[])(void) = {(void (**)(void))&__pyx_f_7cytimes_6errors_raise_error, (void (**)(void))&__pyx_f_7cytimes_6errors_raise_argument_error, (void (**)(void)) NULL};
    void (**const *__pyx_import_pointer)(void) = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportFunction_3_2_1(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __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;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_pydt(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_pydt},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, Py_MOD_GIL_USED},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "pydt",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit_pydt(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_pydt(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_pydt(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'pydt' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pydt" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
    PyErr_Clear();
    __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
    if (!__Pyx_RefNanny)
        Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  
__Pyx_RefNannySetupContext("PyInit_pydt", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_cytimes__pydt) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cytimes.pydt")) {
      if (unlikely((PyDict_SetItemString(modules, "cytimes.pydt", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/

  /* "utils.pxd":1438
 * 
 * # . parse and convert
 * cpdef inline long long parse_to_int(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `long long` `<'int'>`.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_1parse_to_int, 0, __pyx_mstate_global->__pyx_n_u_parse_to_int, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_to_int, __pyx_t_2) < (0)) __PYX_ERR(5, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "utils.pxd":1527
 *     return -out if neg else out
 * 
 * cpdef inline double parse_to_float(str token) except *:             # <<<<<<<<<<<<<<
 *     """Parse the first numeric token from a string into a `double` `<'float'>`.
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_3parse_to_float, 0, __pyx_mstate_global->__pyx_n_u_parse_to_float, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_to_float, __pyx_t_2) < (0)) __PYX_ERR(5, 1527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":21
 * from cython.cimports.cytimes import errors, utils  # type: ignore
 * 
 * np.import_array()             # <<<<<<<<<<<<<<
 * np.import_umath()
 * datetime.import_datetime()
*/
  __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 21, __pyx_L1_error)

  /* "cytimes/pydt.py":22
 * 
 * np.import_array()
 * np.import_umath()             # <<<<<<<<<<<<<<
 * datetime.import_datetime()
 * 
*/
  __pyx_t_3 = __pyx_f_5numpy_import_umath(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 22, __pyx_L1_error)

  /* "cytimes/pydt.py":23
 * np.import_array()
 * np.import_umath()
 * datetime.import_datetime()             # <<<<<<<<<<<<<<
 * 
 * # Python imports
*/
  __pyx_f_7cpython_8datetime_import_datetime();

  /* "cytimes/pydt.py":26
 * 
 * # Python imports
 * from time import struct_time             # <<<<<<<<<<<<<<
 * from typing_extensions import Self
 * import datetime
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_struct_time};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_struct_time};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 26, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":27
 * # Python imports
 * from time import struct_time
 * from typing_extensions import Self             # <<<<<<<<<<<<<<
 * import datetime
 * import numpy as np
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Self};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing_extensions, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Self};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":28
 * from time import struct_time
 * from typing_extensions import Self
 * import datetime             # <<<<<<<<<<<<<<
 * import numpy as np
 * from babel.dates import format_date as _format_date
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":29
 * from typing_extensions import Self
 * import datetime
 * import numpy as np             # <<<<<<<<<<<<<<
 * from babel.dates import format_date as _format_date
 * from zoneinfo import available_timezones as _available_timezones
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":30
 * import datetime
 * import numpy as np
 * from babel.dates import format_date as _format_date             # <<<<<<<<<<<<<<
 * from zoneinfo import available_timezones as _available_timezones
 * from cytimes.parser import (
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_format_date_2};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_babel_dates, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_format_date_2};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_format_date, __pyx_t_5) < (0)) __PYX_ERR(0, 30, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":31
 * import numpy as np
 * from babel.dates import format_date as _format_date
 * from zoneinfo import available_timezones as _available_timezones             # <<<<<<<<<<<<<<
 * from cytimes.parser import (
 *     Configs,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_available_timezones_2};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zoneinfo, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_available_timezones_2};
    __pyx_t_4 = 0; {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_available_timezones, __pyx_t_5) < (0)) __PYX_ERR(0, 31, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":32
 * from babel.dates import format_date as _format_date
 * from zoneinfo import available_timezones as _available_timezones
 * from cytimes.parser import (             # <<<<<<<<<<<<<<
 *     Configs,
 *     parse_obj as _parse_obj,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Configs,__pyx_mstate_global->__pyx_n_u_parse_obj,__pyx_mstate_global->__pyx_n_u_parse_month,__pyx_mstate_global->__pyx_n_u_parse_weekday};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes_parser, __pyx_imported_names, 4, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_parse_obj,__pyx_mstate_global->__pyx_n_u_parse_month,__pyx_mstate_global->__pyx_n_u_parse_weekday};
    for (__pyx_t_4=0; __pyx_t_4 < 3; __pyx_t_4++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      switch (__pyx_t_4) {
        case 0:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_obj, __pyx_t_5) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
        break;
        case 1:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_month, __pyx_t_5) < (0)) __PYX_ERR(0, 35, __pyx_L1_error)
        break;
        case 2:
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_weekday, __pyx_t_5) < (0)) __PYX_ERR(0, 36, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":38
 *     parse_weekday as _parse_weekday,
 * )
 * from cytimes import errors, utils             # <<<<<<<<<<<<<<
 * 
 * __all__ = ["Pydt"]
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors,__pyx_mstate_global->__pyx_n_u_utils};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors,__pyx_mstate_global->__pyx_n_u_utils};
    for (__pyx_t_4=0; __pyx_t_4 < 2; __pyx_t_4++) {
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_4]); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_4], __pyx_t_5) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":40
 * from cytimes import errors, utils
 * 
 * __all__ = ["Pydt"]             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Pydt_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_2) < (0)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":107
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_1_new, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt__new, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_new_2, __pyx_t_5) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_new_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_new_2, __pyx_t_2) < (0)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":153
 *         return pt
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dtobj, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_default, __pyx_mstate_global->__pyx_kp_u_object_None) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_yearfirst, __pyx_mstate_global->__pyx_kp_u_bool_None) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dayfirst, __pyx_mstate_global->__pyx_kp_u_bool_None) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ignoretz, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_isoformat, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cfg, __pyx_mstate_global->__pyx_n_u_Configs) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_3parse, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_parse, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_parse, __pyx_t_5) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_parse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_parse, __pyx_t_2) < (0)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":215
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 215, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 215, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_5now, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_now, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_now, __pyx_t_5) < (0)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_now); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_now, __pyx_t_2) < (0)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":230
 *         return utils.dt_now(tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcnow(cls) -> Self:
 *         """Construct a current `UTC` datetime (timezone-aware) `<'Pydt'>`."""
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 230, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_7utcnow, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utcnow, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcnow, __pyx_t_5) < (0)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcnow); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcnow, __pyx_t_2) < (0)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":235
 *         return utils.dt_now(utils.UTC, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def today(cls) -> Self:
 *         """Construct a current `local` datetime (timezone-naive) `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 235, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_9today, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_today, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_today, __pyx_t_5) < (0)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_today); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_today, __pyx_t_2) < (0)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":244
 *         return utils.dt_now(None, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date, __pyx_mstate_global->__pyx_kp_u_datetime_date_str_None) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_time, __pyx_mstate_global->__pyx_kp_u_datetime_time_str_None) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_11combine, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_combine, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_5) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_combine); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_combine, __pyx_t_2) < (0)) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":298
 *         return utils.dt_combine(date, time, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromordinal(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ordinal, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_13fromordinal, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromordinal, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromordinal, __pyx_t_5) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromordinal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromordinal, __pyx_t_2) < (0)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":321
 *             errors.raise_argument_error(cls, "fromordinal(ordinal, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromseconds(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 321, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 321, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 321, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_15fromseconds, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromseconds, __pyx_t_5) < (0)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromseconds, __pyx_t_2) < (0)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":349
 *             errors.raise_argument_error(cls, "fromseconds(seconds, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def frommicroseconds(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_kp_u_cython_longlong) < (0)) __PYX_ERR(0, 349, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 349, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 349, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_17frommicroseconds, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_frommicroseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_frommicroseconds, __pyx_t_5) < (0)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_frommicroseconds); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_frommicroseconds, __pyx_t_2) < (0)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":377
 *             errors.raise_argument_error(cls, "frommicroseconds(us, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromtimestamp(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ts, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 377, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 377, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_19fromtimestamp, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromtimestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_t_5) < (0)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromtimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_t_2) < (0)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":403
 *             errors.raise_argument_error(cls, "fromtimestamp(ts, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def utcfromtimestamp(cls, ts: int | float) -> Self:
 *         """Construct a UTC-aware datetime from a POSIX timestamp (timezone-aware) `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ts, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 403, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 403, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_21utcfromtimestamp, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utcfromtimestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcfromtimestamp, __pyx_t_5) < (0)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcfromtimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcfromtimestamp, __pyx_t_2) < (0)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":418
 *             errors.raise_argument_error(cls, "utcfromtimestamp(ts)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisoformat(cls, dtstr: str) -> Self:
 *         """Construct a datetime from an ISO format string `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dtstr, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 418, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 418, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_23fromisoformat, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromisoformat, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisoformat, __pyx_t_5) < (0)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisoformat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisoformat, __pyx_t_2) < (0)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":432
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromisocalendar(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_week, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_25fromisocalendar, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromisocalendar, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisocalendar_2, __pyx_t_5) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisocalendar_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromisocalendar_2, __pyx_t_2) < (0)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":461
 *             errors.raise_argument_error(cls, "fromisocalendar(...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdayofyear(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_doy, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_27fromdayofyear, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromdayofyear, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdayofyear, __pyx_t_5) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdayofyear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdayofyear, __pyx_t_2) < (0)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":487
 *             errors.raise_argument_error(cls, "fromdayofyear(year, doy)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdate(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_date, __pyx_mstate_global->__pyx_kp_u_datetime_date) < (0)) __PYX_ERR(0, 487, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 487, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 487, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_29fromdate, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromdate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdate, __pyx_t_5) < (0)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdate, __pyx_t_2) < (0)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":507
 *         return utils.dt_fr_date(date, tz, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dt, __pyx_mstate_global->__pyx_kp_u_datetime_datetime) < (0)) __PYX_ERR(0, 507, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 507, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 507, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_31fromdatetime, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromdatetime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime, __pyx_t_5) < (0)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime, __pyx_t_2) < (0)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":541
 *         return utils.dt_fr_dt(dt, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def fromdatetime64(
 *         cls,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dt64, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_33fromdatetime64, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fromdatetime64, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime64, __pyx_t_5) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fromdatetime64, __pyx_t_2) < (0)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":565
 *             errors.raise_argument_error(cls, "fromdatetime64(dt64, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def strptime(cls, dtstr: str, fmt: str) -> Self:
 *         """Construct a datetime parsed from a datetime-string `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dtstr, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fmt, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_35strptime, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_strptime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_strptime, __pyx_t_5) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_strptime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_strptime, __pyx_t_2) < (0)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":581
 * 
 *     # Convertor ----------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ctime(self) -> str:
 *         """Return ctime-style string `<'str'>`
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_37ctime, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_ctime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_ctime, __pyx_t_2) < (0)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":589
 *         return utils.dt_to_ctime(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def strftime(self, fmt: str) -> str:
 *         """Format to string according to the given format `<'str'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fmt, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 589, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_39strftime, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_strftime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_strftime, __pyx_t_5) < (0)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":598
 *         return utils.dt_strformat(self, fmt)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isoformat(self, sep: str = "T") -> str:
 *         """Return the date and time formatted according to ISO format `<'str'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sep, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 598, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_41isoformat, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_isoformat, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_isoformat, __pyx_t_2) < (0)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":618
 *         return utils.dt_isoformat(self, sep, True)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timedict(self) -> dict[str, int]:
 *         """Return `local` time dictionary compatible with `time.localtime()` `<'dict'>`.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_43timedict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_timedict, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_timedict, __pyx_t_2) < (0)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":649
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimedict(self) -> dict[str, int]:
 *         """Return `UTC` time dictionary compatible with `time.gmtime()` `<'dict'>`.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_45utctimedict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utctimedict, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utctimedict, __pyx_t_2) < (0)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":680
 *         }
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetuple(self) -> object:
 *         """Return `local` time tuple compatible with `time.localtime()` `<'struct_time'>`.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_47timetuple, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_timetuple, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_timetuple, __pyx_t_2) < (0)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":713
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utctimetuple(self) -> object:
 *         """Return `UTC` time tuple compatible with `time.gmtime()` `<'struct_time'>`.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_49utctimetuple, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utctimetuple, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utctimetuple, __pyx_t_2) < (0)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":746
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def toordinal(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_51toordinal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_toordinal, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_toordinal, __pyx_t_2) < (0)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_utc, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 756, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_53toseconds, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_toseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_toseconds, __pyx_t_5) < (0)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":781
 *         return utils.dt_to_sec(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tomicroseconds(self, utc: cython.bint = False) -> cython.longlong:
 *         """Return total microseconds since epoch `<'int'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_utc, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_55tomicroseconds, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_tomicroseconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_tomicroseconds, __pyx_t_2) < (0)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":805
 *         return utils.dt_to_us(self, utc)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timestamp(self) -> cython.double:
 *         """Return as a POSIX timestamp `<'float'>`."""
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_57timestamp, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_timestamp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_timestamp, __pyx_t_2) < (0)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":810
 *         return utils.dt_to_ts(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def date(self) -> datetime.date:
 *         """Return the date part `<'datetime.date'>`."""
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_59date, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_date, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_date, __pyx_t_2) < (0)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":815
 *         return utils.date_fr_dt(self, None)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def time(self) -> datetime.time:
 *         """Return the time part (without timezone information) `<'datetime.time'>`."""
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_61time, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_time, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_2) < (0)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":827
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def timetz(self) -> datetime.time:
 *         """Return the time part (with the same timezone information) `<'datetime.time'>`."""
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_63timetz, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_timetz, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_timetz, __pyx_t_2) < (0)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":842
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def replace(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_65replace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_replace, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_replace, __pyx_t_5) < (0)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_67to_curr_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_curr_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_curr_year, __pyx_t_2) < (0)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":947
 *             errors.raise_argument_error(self._cls(), "to_curr_year(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_year(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 947, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_69to_prev_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_prev_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_prev_year, __pyx_t_5) < (0)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":972
 *         return self.to_year(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_year(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 972, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 972, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_71to_next_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_next_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_next_year, __pyx_t_2) < (0)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":997
 *         return self.to_year(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_year(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 997, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 997, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 997, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_73to_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_year, __pyx_t_5) < (0)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1055
 * 
 *     # . quarter
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_quarter(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_75to_curr_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_curr_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_curr_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1107
 *             errors.raise_argument_error(self._cls(), "to_curr_quarter(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_quarter(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_77to_prev_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_prev_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_prev_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1128
 *         return self.to_quarter(-1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_quarter(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_79to_next_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_next_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_next_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1149
 *         return self.to_quarter(1, month, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_quarter(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_81to_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1204
 * 
 *     # . month
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the current month `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_83to_curr_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_curr_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_curr_month, __pyx_t_2) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1245
 *             errors.raise_argument_error(self._cls(), "to_curr_month(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the previous month `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_85to_prev_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_prev_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_prev_month, __pyx_t_5) < (0)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1259
 *         return self.to_month(-1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the next month `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_87to_next_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_next_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_next_month, __pyx_t_2) < (0)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1273
 *         return self.to_month(1, day)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_month(self, offset: cython.int, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the month (+/-) offset `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1273, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_89to_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_month, __pyx_t_5) < (0)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1318
 * 
 *     # . weekday
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_monday(self) -> _Pydt:
 *         """Adjust the date to the `Monday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_91to_monday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_monday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_monday, __pyx_t_5) < (0)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1323
 *         return self._to_curr_weekday(0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tuesday(self) -> _Pydt:
 *         """Adjust the date to the `Tuesday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_93to_tuesday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_tuesday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_tuesday, __pyx_t_5) < (0)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1328
 *         return self._to_curr_weekday(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_wednesday(self) -> _Pydt:
 *         """Adjust the date to the `Wednesday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_95to_wednesday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_wednesday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_wednesday, __pyx_t_5) < (0)) __PYX_ERR(0, 1328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1333
 *         return self._to_curr_weekday(2)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_thursday(self) -> _Pydt:
 *         """Adjust the date to the `Thursday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_97to_thursday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_thursday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_thursday, __pyx_t_5) < (0)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1338
 *         return self._to_curr_weekday(3)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_friday(self) -> _Pydt:
 *         """Adjust the date to the `Friday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_99to_friday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_friday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_friday, __pyx_t_5) < (0)) __PYX_ERR(0, 1338, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1343
 *         return self._to_curr_weekday(4)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_saturday(self) -> _Pydt:
 *         """Adjust the date to the `Saturday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_101to_saturday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_saturday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_saturday, __pyx_t_5) < (0)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1348
 *         return self._to_curr_weekday(5)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_sunday(self) -> _Pydt:
 *         """Adjust the date to the `Sunday` of the current week `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_103to_sunday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_sunday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_sunday, __pyx_t_5) < (0)) __PYX_ERR(0, 1348, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1353
 *         return self._to_curr_weekday(6)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the current week `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_105to_curr_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_curr_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_curr_weekday, __pyx_t_2) < (0)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1371
 *         return self._to_curr_weekday(_parse_weekday(weekday, None, True))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_prev_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the previous week `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_107to_prev_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_prev_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_prev_weekday, __pyx_t_5) < (0)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1389
 *         return self.to_weekday(-1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_next_weekday(self, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the next week `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_109to_next_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_next_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_next_weekday, __pyx_t_2) < (0)) __PYX_ERR(0, 1389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1407
 *         return self.to_weekday(1, weekday)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_weekday(self, offset: cython.int, weekday: int | str | None = None) -> _Pydt:
 *         """Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1407, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str_None) < (0)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_111to_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_weekday, __pyx_t_5) < (0)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1455
 * 
 *     # . day
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_yesterday(self) -> _Pydt:
 *         """Adjust the date to `Yesterday` `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_113to_yesterday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_yesterday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_yesterday, __pyx_t_5) < (0)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1460
 *         return self.to_day(-1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_tomorrow(self) -> _Pydt:
 *         """Adjust the date to `Tomorrow` `<'Pydt'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_115to_tomorrow, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_tomorrow, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_tomorrow, __pyx_t_5) < (0)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1465
 *         return self.to_day(1)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_day(self, offset: cython.int) -> _Pydt:
 *         """Adjust the date to day (+/-) offset `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_offset, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_117to_day, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_day, __pyx_t_2) < (0)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1487
 * 
 *     # . date&time
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def normalize(self) -> _Pydt:
 *         """Set the time fields to midnight (00:00:00) `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_119normalize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_normalize, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_normalize, __pyx_t_2) < (0)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1496
 *         return self.to_time(0, 0, 0, 0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_datetime(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_121to_datetime, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_datetime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_datetime, __pyx_t_5) < (0)) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1547
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_date(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1547, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1547, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_123to_date, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_date, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_date, __pyx_t_2) < (0)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1574
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_time(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_125to_time, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_time, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_time, __pyx_t_5) < (0)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1609
 *             errors.raise_argument_error(self._cls(), "to_time(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_first_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the first day of the specified datetime unit,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_127to_first_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_first_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_first_of, __pyx_t_2) < (0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1662
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_last_of(self, unit: str) -> _Pydt:
 *         """Adjust the date fields to the last day of the specified datetime unit,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_129to_last_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_last_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_last_of, __pyx_t_5) < (0)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1715
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_start_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the start of the specified datetime unit `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_131to_start_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_start_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_start_of, __pyx_t_2) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1830
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_end_of(self, unit: str) -> _Pydt:
 *         """Adjust the date & time fields to the end of the specified datetime unit `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_133to_end_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_to_end_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_to_end_of, __pyx_t_5) < (0)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":1945
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_first_of(self, unit: str) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_135is_first_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_first_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_first_of, __pyx_t_2) < (0)) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1991
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_last_of(self, unit: str) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_137is_last_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_last_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_last_of, __pyx_t_5) < (0)) __PYX_ERR(0, 1991, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2037
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_start_of(self, unit: str) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_139is_start_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_start_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_start_of, __pyx_t_2) < (0)) __PYX_ERR(0, 2037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2133
 *         return False
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_end_of(self, unit: str) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_141is_end_of, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_end_of, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_end_of, __pyx_t_5) < (0)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2231
 * 
 *     # . round / ceil / floor
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def round(self, unit: str) -> _Pydt:
 *         """Perform round operation to the specified datetime unit `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_143round, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_round, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_round, __pyx_t_2) < (0)) __PYX_ERR(0, 2231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2267
 *             errors.raise_argument_error(self._cls(), "round(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def ceil(self, unit: str) -> _Pydt:
 *         """Perform ceil operation to the specified datetime unit `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_145ceil, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_ceil, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_ceil, __pyx_t_5) < (0)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2295
 *             errors.raise_argument_error(self._cls(), "ceil(unit)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def floor(self, unit: str) -> _Pydt:
 *         """Perform floor operation to the specified datetime unit `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_147floor, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_floor, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_floor, __pyx_t_2) < (0)) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2324
 * 
 *     # . fsp (fractional seconds precision)
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def fsp(self, precision: cython.int) -> _Pydt:
 *         """Adjust to the specified fractional seconds precision `<'Pydt'>`.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_precision, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_149fsp, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_fsp, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_fsp, __pyx_t_5) < (0)) __PYX_ERR(0, 2324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2359
 *     # Calendar -----------------------------------------------------------------------------
 *     # . iso
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isocalendar(self) -> dict[str, int]:
 *         """Return the ISO calendar `<'dict'>`.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_151isocalendar, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_isocalendar, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_isocalendar, __pyx_t_5) < (0)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2372
 *         return {"year": _iso.year, "week": _iso.week, "weekday": _iso.weekday}
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoyear(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_153isoyear, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_isoyear, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_isoyear, __pyx_t_5) < (0)) __PYX_ERR(0, 2372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2380
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweek(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_155isoweek, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_isoweek, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_isoweek, __pyx_t_5) < (0)) __PYX_ERR(0, 2380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2388
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def isoweekday(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_157isoweekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_isoweekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_isoweekday, __pyx_t_5) < (0)) __PYX_ERR(0, 2388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2402
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_year(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_159access_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_year, __pyx_t_5) < (0)) __PYX_ERR(0, 2402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2408
 *         return datetime.datetime_year(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_year(self, year: cython.int) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2408, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_161is_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_year, __pyx_t_2) < (0)) __PYX_ERR(0, 2408, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2414
 *         return self.access_year() == year
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_leap_year(self) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_163is_leap_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_leap_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_leap_year, __pyx_t_2) < (0)) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2420
 *         return utils.is_leap_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_long_year(self) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_165is_long_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_long_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_long_year, __pyx_t_2) < (0)) __PYX_ERR(0, 2420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2429
 *         return utils.is_long_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def leap_bt_year(self, year: cython.int) -> cython.int:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_167leap_bt_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_leap_bt_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_leap_bt_year, __pyx_t_5) < (0)) __PYX_ERR(0, 2429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2435
 *         return utils.leaps_bt_years(self.access_year(), year)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_year(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_169days_in_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_in_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_in_year, __pyx_t_5) < (0)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2441
 *         return utils.days_in_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_year(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_171days_bf_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_bf_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_bf_year, __pyx_t_5) < (0)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2447
 *         return utils.days_bf_year(self.access_year())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_year(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_173day_of_year, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_day_of_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_day_of_year, __pyx_t_5) < (0)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2461
 *         return self.access_quarter()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_quarter(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_175access_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 2461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2467
 *         return utils.quarter_of_month(self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_quarter(self, quarter: cython.int) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_quarter, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_177is_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 2467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2473
 *         return self.access_quarter() == quarter
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_quarter(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_179days_in_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_in_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_in_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 2473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2479
 *         return utils.days_in_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_quarter(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_181days_bf_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_bf_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_bf_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 2479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2487
 *         return utils.days_bf_quarter(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_quarter(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_183day_of_quarter, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_day_of_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_day_of_quarter, __pyx_t_2) < (0)) __PYX_ERR(0, 2487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2501
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_month(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_185access_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_month, __pyx_t_2) < (0)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2507
 *         return datetime.datetime_month(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_month(self, month: int | str) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_kp_u_int_str) < (0)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_187is_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_month, __pyx_t_5) < (0)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2522
 *         return self.access_month() == _parse_month(month, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_in_month(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_189days_in_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_in_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_in_month, __pyx_t_5) < (0)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2528
 *         return utils.days_in_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def days_bf_month(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_191days_bf_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_days_bf_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_days_bf_month, __pyx_t_5) < (0)) __PYX_ERR(0, 2528, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2536
 *         return utils.days_bf_month(self.access_year(), self.access_month())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def day_of_month(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_193day_of_month, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_day_of_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_day_of_month, __pyx_t_5) < (0)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2546
 *         return self.access_day()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def month_name(self, locale: object = None) -> str:
 *         """Return the month name with specified locale `<'str'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_locale, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_195month_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_month_name, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_month_name, __pyx_t_2) < (0)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2572
 *         return self.access_weekday()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_weekday(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_197access_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_weekday, __pyx_t_2) < (0)) __PYX_ERR(0, 2572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2580
 *         )
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_weekday(self, weekday: int | str) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weekday, __pyx_mstate_global->__pyx_kp_u_int_str) < (0)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_199is_weekday, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_weekday, __pyx_t_5) < (0)) __PYX_ERR(0, 2580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2595
 *         return self.access_weekday() == _parse_weekday(weekday, None, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def weekday_name(self, locale: object = None) -> str:
 *         """Return the weekday name with specified locale `<'str'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_locale, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_201weekday_name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_weekday_name, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_weekday_name, __pyx_t_2) < (0)) __PYX_ERR(0, 2595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2621
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_day(self) -> cython.int:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_203access_day, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_day, __pyx_t_2) < (0)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2627
 *         return datetime.datetime_day(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def is_day(self, day: cython.int) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_205is_day, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_day, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_day, __pyx_t_5) < (0)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2639
 *         return datetime.datetime_hour(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_hour(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_207access_hour, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_hour, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_hour, __pyx_t_5) < (0)) __PYX_ERR(0, 2639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2650
 *         return datetime.datetime_minute(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_minute(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_209access_minute, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_minute, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_minute, __pyx_t_5) < (0)) __PYX_ERR(0, 2650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2661
 *         return datetime.datetime_second(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_second(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_211access_second, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_second, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_second, __pyx_t_5) < (0)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2672
 *         return self.access_millisecond()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_millisecond(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_213access_millisecond, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_millisecond, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_millisecond, __pyx_t_5) < (0)) __PYX_ERR(0, 2672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2683
 *         return datetime.datetime_microsecond(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_microsecond(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_215access_microsecond, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_microsecond, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_microsecond, __pyx_t_5) < (0)) __PYX_ERR(0, 2683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2712
 *         return datetime.datetime_tzinfo(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def access_tzinfo(self) -> object:
 *         """Return the timezone information `<'tzinfo/None'>`."""
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_217access_tzinfo, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_tzinfo, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_tzinfo, __pyx_t_5) < (0)) __PYX_ERR(0, 2712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2726
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(check=False)
 *     def access_fold(self) -> cython.int:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_219access_fold, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_access_fold, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_access_fold, __pyx_t_5) < (0)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2736
 *         return datetime.datetime_fold(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_local(self) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_221is_local, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_local, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_local, __pyx_t_5) < (0)) __PYX_ERR(0, 2736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2745
 *         return self.access_tzinfo() is utils.tz_local()
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_utc(self) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_223is_utc, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_utc, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_utc, __pyx_t_5) < (0)) __PYX_ERR(0, 2745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2754
 *         return self.access_tzinfo() is utils.UTC
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_dst(self) -> cython.bint:
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_225is_dst, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_dst, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_dst, __pyx_t_5) < (0)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2764
 *         return False if dst is None else bool(utils.td_to_us(dst))
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tzname(self) -> str:
 *         """Return the timezone name `<'str/None'>`.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_227tzname, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_tzname, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2764, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_tzname, __pyx_t_5) < (0)) __PYX_ERR(0, 2764, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2772
 *         return utils.dt_tzname(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset(self) -> datetime.timedelta:
 *         """Return the UTC offset `<'datetime.timedelta/None'>`.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_229utcoffset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utcoffset, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcoffset, __pyx_t_5) < (0)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2783
 *         return utils.dt_utcoffset(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def utcoffset_seconds(self) -> object:
 *         """Return the UTC offset in seconds `<'int/None'>`.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_231utcoffset_seconds, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_utcoffset_seconds, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_utcoffset_seconds, __pyx_t_5) < (0)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2798
 *         return None if ss == utils.NULL_TZOFFSET else ss
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def dst(self) -> datetime.timedelta:
 *         """Return the Daylight Saving Time (DST) offset `<'datetime.timedelta/None'>`.
*/
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_233dst, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_dst, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_dst, __pyx_t_5) < (0)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2808
 *         return utils.dt_dst(self)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def astimezone(self, tz: datetime.tzinfo | str | None = None) -> _Pydt:
 *         """Convert to another timezone `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_235astimezone, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_astimezone, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_astimezone, __pyx_t_2) < (0)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2825
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_localize(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Localize timezone-naive datetime to the target timezone;
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2825, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_237tz_localize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_tz_localize, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_tz_localize, __pyx_t_5) < (0)) __PYX_ERR(0, 2825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2863
 *         return utils.dt_replace_tz(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_convert(self, tz: datetime.tzinfo | str | None) -> _Pydt:
 *         """Convert timezone-aware datetime to another timezone `<'Pydt'>`.
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_239tz_convert, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_tz_convert, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_tz_convert, __pyx_t_2) < (0)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_targ_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2900, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_base_tz, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 2900, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_naive, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_241tz_switch, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_tz_switch, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_tz_switch, __pyx_t_5) < (0)) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":2976
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def add(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_years, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_quarters, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_months, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_weeks, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_days, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_microseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_243add, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_add, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_add, __pyx_t_2) < (0)) __PYX_ERR(0, 2976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3015
 *             errors.raise_argument_error(self._cls(), "add(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def sub(
 *         self,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_years, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_quarters, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_months, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_weeks, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_days, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_seconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_microseconds, __pyx_mstate_global->__pyx_kp_u_cython_int) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_245sub, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_sub, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_sub, __pyx_t_5) < (0)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtobj, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_unit, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_absolute, __pyx_mstate_global->__pyx_kp_u_cython_bint) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_inclusive, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_247diff, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_diff, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_diff, __pyx_t_2) < (0)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3279
 * 
 *     # Comparison ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_past(self) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_255is_past, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_past, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_past, __pyx_t_2) < (0)) __PYX_ERR(0, 3279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3289
 *         return self < utils.dt_now(self.access_tzinfo())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     @cython.exceptval(-1, check=False)
 *     def is_future(self) -> cython.bint:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_257is_future, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt_is_future, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_is_future, __pyx_t_2) < (0)) __PYX_ERR(0, 3289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3326
 *         return self.isoformat(" ")
 * 
 *     def __format__(self, fmt: str) -> str:             # <<<<<<<<<<<<<<
 *         if fmt is None or str_len(fmt) == 0:
 *             return self.isoformat(" ")
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fmt, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3326, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_263__format__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt___format, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_format_2, __pyx_t_5) < (0)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":3335
 *         return datetime.datetime.__hash__(self)
 * 
 *     def __copy__(self) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_267__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt___copy, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_copy, __pyx_t_2) < (0)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3349
 *         )
 * 
 *     def __deepcopy__(self, _: dict) -> Self:             # <<<<<<<<<<<<<<
 *         return utils.dt_new(
 *             self.access_year(),
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u__14, __pyx_mstate_global->__pyx_n_u_dict_2) < (0)) __PYX_ERR(0, 3349, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Self) < (0)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_269__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt___deepcopy, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_deepcopy, __pyx_t_5) < (0)) __PYX_ERR(0, 3349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":3364
 * 
 *     # Pickle -------------------------------------------------------------------------------
 *     def __reduce__(self) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce__(self)
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_str_tuple) < (0)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_271__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 3364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":3367
 *         return datetime.datetime.__reduce__(self)
 * 
 *     def __reduce_ex__(self, protocol: object, /) -> str | tuple:             # <<<<<<<<<<<<<<
 *         return datetime.datetime.__reduce_ex__(self, protocol)
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_protocol, __pyx_mstate_global->__pyx_n_u_object) < (0)) __PYX_ERR(0, 3367, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_str_tuple) < (0)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_5_Pydt_273__reduce_ex__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Pydt___reduce_ex, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt, __pyx_mstate_global->__pyx_n_u_reduce_ex, __pyx_t_5) < (0)) __PYX_ERR(0, 3367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":3371
 * 
 * 
 * class Pydt(_Pydt):             # <<<<<<<<<<<<<<
 *     """A drop-in replacement for the standard `<'datetime.datetime'>`
 *     class, providing additional functionalities for more convenient
*/
  __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7cytimes_4pydt__Pydt)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Pydt_2, __pyx_mstate_global->__pyx_n_u_Pydt_2, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_kp_u_A_drop_in_replacement_for_the_st); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_2 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 3371, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/pydt.py":3381
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         year: int = 1,
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_fold, ((PyObject*)__pyx_mstate_global->__pyx_int_1)) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_year, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_month, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_day, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_mstate_global->__pyx_kp_u_datetime_tzinfo_str_None) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_Pydt_2) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_4pydt_4Pydt_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Pydt___new, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_pydt, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_9, __pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__Pyx_SetNewInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_new, __pyx_t_9) < (0)) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/pydt.py":3371
 * 
 * 
 * class Pydt(_Pydt):             # <<<<<<<<<<<<<<
 *     """A drop-in replacement for the standard `<'datetime.datetime'>`
 *     class, providing additional functionalities for more convenient
*/
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Pydt_2, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Pydt_2, __pyx_t_9) < (0)) __PYX_ERR(0, 3371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/pydt.py":1
 * # cython: language_level=3             # <<<<<<<<<<<<<<
 * # cython: wraparound=False
 * # cython: boundscheck=False
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(37); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_today_line_235, __pyx_mstate_global->__pyx_kp_u_Construct_a_current_local_dateti) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_utcfromtimestamp_line_403, __pyx_mstate_global->__pyx_kp_u_Construct_a_UTC_aware_datetime_f) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_timedict_line_618, __pyx_mstate_global->__pyx_kp_u_Return_local_time_dictionary_com) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_utctimedict_line_649, __pyx_mstate_global->__pyx_kp_u_Return_UTC_time_dictionary_compa) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_timetuple_line_680, __pyx_mstate_global->__pyx_kp_u_Return_local_time_tuple_compatib) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_utctimetuple_line_713, __pyx_mstate_global->__pyx_kp_u_Return_UTC_time_tuple_compatible) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_curr_year_line_896, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_prev_year_line_947, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_next_year_line_972, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_year_line_997, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_curr_quarter_line_1055, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_prev_quarter_line_1107, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_6) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_next_quarter_line_1128, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_7) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_quarter_line_1149, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_8) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_curr_month_line_1204, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_9) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_prev_month_line_1245, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_10) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_next_month_line_1259, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_11) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_month_line_1273, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specified_12) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_curr_weekday_line_1353, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_prev_weekday_line_1371, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_next_weekday_line_1389, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_weekday_line_1407, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_the_specific_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_day_line_1465, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_to_day_offset_Py) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_datetime_line_1496, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_and_time_fields) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_date_line_1547, __pyx_mstate_global->__pyx_kp_u_Adjust_the_date_with_new_values) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_to_time_line_1574, __pyx_mstate_global->__pyx_kp_u_Adjust_the_time_fields_with_new) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_round_line_2231, __pyx_mstate_global->__pyx_kp_u_Perform_round_operation_to_the_s) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_ceil_line_2267, __pyx_mstate_global->__pyx_kp_u_Perform_ceil_operation_to_the_sp) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_floor_line_2295, __pyx_mstate_global->__pyx_kp_u_Perform_floor_operation_to_the_s) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_fsp_line_2324, __pyx_mstate_global->__pyx_kp_u_Adjust_to_the_specified_fraction) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_isocalendar_line_2359, __pyx_mstate_global->__pyx_kp_u_Return_the_ISO_calendar_dict_Exa) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_day_of_month_line_2536, __pyx_mstate_global->__pyx_kp_u_Return_the_number_of_days_since) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_tz_available___get___line, __pyx_mstate_global->__pyx_kp_u_The_available_timezone_names_set) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_tz_localize_line_2825, __pyx_mstate_global->__pyx_kp_u_Localize_timezone_naive_datetime) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_tz_convert_line_2863, __pyx_mstate_global->__pyx_kp_u_Convert_timezone_aware_datetime) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_is_past_line_3279, __pyx_mstate_global->__pyx_kp_u_Check_whether_is_in_the_past_boo) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Pydt_is_future_line_3289, __pyx_mstate_global->__pyx_kp_u_Check_whether_is_in_the_future_b) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init cytimes.pydt", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cytimes.pydt");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 3193, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cytimes/pydt.py":107
 * 
 *     # Constructor --------------------------------------------------------------------------
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def _new(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(9, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, Py_None, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "cytimes/pydt.py":153
 *         return pt
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def parse(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_True, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "cytimes/pydt.py":215
 *             errors.raise_argument_error(cls, "parse(dtobj, ...)", None, err)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def now(cls, tz: datetime.tzinfo | str | None = None) -> Self:
 *         """Contruct a current datetime with optional timezone `<'Pydt'>`.
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "cytimes/pydt.py":244
 *         return utils.dt_now(None, cls)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def combine(
 *         cls,
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "cytimes/pydt.py":598
 *         return utils.dt_strformat(self, fmt)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def isoformat(self, sep: str = "T") -> str:
 *         """Return the date and time formatted according to ISO format `<'str'>`.
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_T); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "cytimes/pydt.py":756
 *         return utils.dt_to_ord(self, False)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def toseconds(self, utc: cython.bint = False) -> cython.double:
 *         """Return total seconds since epoch `<'float'>`.
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "cytimes/pydt.py":842
 * 
 *     # Manipulator --------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def replace(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(9, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "cytimes/pydt.py":896
 * 
 *     # . year
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_year(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "cytimes/pydt.py":1055
 * 
 *     # . quarter
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_quarter(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "cytimes/pydt.py":1204
 * 
 *     # . month
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_curr_month(self, day: cython.int = -1) -> _Pydt:
 *         """Adjust the date to the specified day of the current month `<'Pydt'>`.
*/
  __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);

  /* "cytimes/pydt.py":1496
 *         return self.to_time(0, 0, 0, 0)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_datetime(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 1496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "cytimes/pydt.py":1547
 *             errors.raise_argument_error(self._cls(), "to_datetime(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_date(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "cytimes/pydt.py":1574
 *             errors.raise_argument_error(self._cls(), "to_date(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def to_time(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);

  /* "cytimes/pydt.py":2900
 *         return utils.dt_astimezone(self, tz, self._cls())
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def tz_switch(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 2900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "cytimes/pydt.py":2976
 * 
 *     # Arithmetic ---------------------------------------------------------------------------
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def add(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(10, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 2976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "cytimes/pydt.py":3054
 *             errors.raise_argument_error(self._cls(), "sub(...)", None, err)
 * 
 *     @cython.ccall             # <<<<<<<<<<<<<<
 *     def diff(
 *         self,
*/
  __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(2, Py_False, __pyx_mstate_global->__pyx_n_u_one); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "cytimes/pydt.py":3381
 *     """
 * 
 *     def __new__(             # <<<<<<<<<<<<<<
 *         cls,
 *         year: int = 1,
*/
  __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(8, ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_int_0), ((PyObject*)__pyx_mstate_global->__pyx_int_0), Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 3381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<17; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 11; } index[] = {{1},{3},{9},{15},{20},{19},{14},{9},{3},{4},{3},{2},{4},{376},{12},{62},{1594},{270},{625},{629},{613},{763},{934},{490},{474},{543},{959},{939},{926},{877},{882},{862},{876},{486},{724},{1031},{404},{30},{93},{58},{65},{16},{15},{37},{23},{80},{59},{41},{46},{41},{47},{14},{65},{65},{70},{65},{61},{68},{44},{61},{68},{67},{72},{67},{63},{46},{63},{77},{83},{80},{59},{128},{126},{263},{124},{61},{573},{8},{118},{129},{173},{28},{39},{54},{55},{53},{81},{54},{79},{88},{52},{54},{29},{67},{607},{8},{4},{179},{77},{304},{307},{303},{22},{30},{23},{21},{27},{25},{29},{23},{25},{26},{31},{33},{33},{29},{25},{29},{24},{26},{31},{33},{33},{29},{31},{33},{33},{29},{28},{25},{28},{24},{22},{38},{28},{29},{33},{28},{29},{433},{424},{436},{428},{146},{118},{38},{53},{53},{93},{93},{53},{53},{47},{119},{51},{16},{49},{55},{79},{53},{22},{8},{8},{1},{5},{1},{1},{1},{1},{2},{1},{0},{1},{1},{1},{2},{8},{8},{18},{31},{35},{31},{35},{31},{35},{32},{36},{32},{36},{29},{33},{26},{14},{11},{10},{18},{18},{11},{10},{15},{17},{13},{26},{17},{26},{28},{16},{20},{15},{7},{35},{34},{6},{11},{8},{34},{7},{8},{25},{24},{20},{20},{25},{25},{25},{22},{14},{2},{8},{11},{9},{16},{9},{14},{8},{32},{51},{32},{51},{32},{51},{33},{52},{33},{52},{30},{49},{27},{51},{10},{109},{18},{9},{7},{39},{34},{13},{68},{69},{19},{17},{38},{36},{12},{30},{22},{11},{8},{10},{15},{21},{6},{37},{51},{53},{39},{35},{49},{51},{37},{19},{21},{11},{20},{8},{82},{26},{77},{50},{39},{34},{5},{18},{20},{17},{12},{16},{16},{11},{15},{17},{40},{12},{13},{42},{16},{13},{53},{15},{17},{12},{51},{12},{11},{14},{15},{14},{11},{17},{9},{20},{20},{18},{3},{3},{7},{1},{3},{4},{3},{3},{3},{3},{3},{1},{4},{3},{3},{18},{3},{14},{3},{3},{5},{4},{14},{18},{16},{12},{16},{19},{10},{16},{17},{17},{24},{24},{19},{18},{20},{19},{19},{20},{17},{9},{16},{10},{13},{11},{10},{18},{20},{17},{19},{21},{18},{19},{21},{18},{10},{9},{11},{14},{18},{20},{19},{21},{19},{22},{17},{17},{19},{9},{12},{12},{15},{17},{15},{16},{18},{14},{18},{14},{13},{16},{17},{12},{16},{13},{17},{15},{13},{16},{13},{18},{16},{15},{9},{11},{13},{11},{14},{14},{9},{10},{14},{15},{15},{12},{19},{21},{21},{18},{13},{17},{12},{15},{17},{15},{16},{15},{14},{19},{21},{21},{18},{19},{21},{21},{18},{16},{17},{17},{15},{17},{13},{17},{16},{18},{16},{13},{18},{11},{20},{15},{15},{16},{17},{15},{12},{22},{12},{15},{23},{17},{18},{18},{20},{3},{4},{3},{3},{1},{3},{3},{1},{3},{1},{1},{8},{10},{11},{11},{18},{18},{13},{12},{14},{13},{13},{14},{11},{3},{7},{2},{10},{6},{18},{20},{19},{11},{7},{4},{4},{3},{9},{18},{3},{7},{8},{5},{7},{14},{12},{13},{1},{4},{8},{3},{12},{14},{11},{8},{4},{13},{15},{12},{13},{15},{12},{12},{7},{8},{4},{4},{7},{3},{3},{2},{4},{7},{5},{5},{5},{5},{3},{6},{5},{3},{4},{6},{10},{12},{11},{8},{12},{14},{13},{15},{13},{16},{11},{11},{13},{7},{2},{3},{8},{1},{8},{4},{5},{8},{9},{3},{13},{6},{6},{9},{11},{9},{10},{12},{8},{12},{8},{7},{10},{11},{6},{10},{7},{11},{9},{7},{10},{7},{5},{12},{6},{1},{8},{13},{11},{12},{12},{3},{6},{7},{10},{5},{10},{6},{15},{2},{5},{8},{7},{7},{4},{9},{3},{2},{2},{5},{6},{6},{3},{7},{5},{11},{9},{14},{12},{13},{3},{9},{11},{8},{2},{2},{14},{12},{7},{8},{10},{13},{7},{6},{5},{1},{6},{7},{4},{3},{12},{10},{3},{8},{8},{11},{3},{7},{8},{4},{8},{9},{9},{6},{7},{8},{7},{6},{6},{6},{7},{7},{7},{13},{15},{15},{12},{7},{11},{6},{9},{11},{9},{10},{9},{8},{13},{15},{15},{12},{13},{15},{15},{12},{10},{11},{11},{9},{11},{7},{11},{10},{12},{10},{7},{12},{5},{5},{14},{9},{9},{2},{17},{2},{10},{11},{9},{6},{6},{4},{2},{3},{16},{6},{9},{17},{11},{12},{5},{6},{4},{7},{12},{5},{4},{9},{5},{8},{1511},{397},{31},{252},{259},{336},{505},{20},{322},{231},{118},{64},{91},{68},{68},{73},{64},{39},{64},{67},{209},{49},{224},{296},{20},{210},{31},{31},{50},{31},{110},{187},{183},{504},{156},{654},{674},{216},{216},{92},{71},{69},{67},{81},{13},{14},{24},{24},{35},{69},{52},{83},{140},{107},{90},{58},{161},{141},{13},{18},{16},{13},{477},{13},{18},{15},{13},{30},{18},{13},{17},{17},{23},{23},{20},{30},{241},{279},{31},{31},{13},{13},{18},{135},{53},{106},{13},{14},{14},{182},{129},{129},{150},{22},{22},{15},{15},{21},{28},{16},{29},{20},{22},{18},{28},{13},{22},{22},{18},{18},{18},{24},{37},{62},{16},{46},{83},{50},{85},{20},{485}};
    #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (11281 bytes) */
const char* const cstring = "BZh91AY&SY\362\2242\344\000\025d\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\301`PD\300@@@@@@@U\000@\000`7\211\316\333|k\354\263A@\0066\357\263\247N\355\257\273P\004\216\362\017\257is\331\367\316\207\333\354g\032\214\300}\353\r\357;\326\225V/w\333w\231\247\036\372\365cn\353\276\360=\006\363\347\016\336\357g\316dv\311h\r\005W\243O\240\372t\004BJ\016\203B\366;\347\203\202\250Me\3662\225\010\004h\003\353\241\274\357\257l\213\326o+q\244\035@\002\017\2735m\365\270$\210\211\240\t\231\024\364jm\002\236J~Q\351\211\251\350\311<A\246\t\210\3210\215)\275\02356j\032\236\232jz\243\312=F\236\243\311\032\0000i\242\r&\202i'\224\306T\323F\232<\247\242z\215\032i\211\240\000\320\000\006\206\215\0004\000\000\000\001\247\250\000\224\320\022\205)\247\350\246\236\247\211\r4z\236\223G\2414\320d\332\232z\2323I\260i\223I4\000\000\323L@\000\031\000\320i\223A&\242\020\220\23244\206\241<\243\331\023(=FOH\317T\001\246\203#j\0364\324\364Hz@\000\000dz\203\324\320\006\215\000\211D\232&\251\223\324\366\250\365=O\324\236j\237\252\031\017)\352h\32356\217P\217SM2d\r\006@\321\241\241\240\000\006\230\232z!\246\215\000\004I\020\010\020\004\304\r\021\246\206\204d&\247\211\265OS\364\232\215\3525\036\243\322\017S&\201\240\000\000\000\000\032\000g\373\033~\000~\277\332\317T\223R\325\230\201\316e\231\247z\355\232R\276q\010d\344|\022*\376\374\244\221\"\030,\341\r\376\325\004\354!g\203 \260\245\333b\243\240\304\005\310\014\232\223d\026\300\354\344\273\007\266VF<M\261}\367\014\345p\314\301\256\313\025`P\231\231\310+\020\245\010N\021\004\341\276\205\252\357\024P\233\263\314B\306\022\230\030\020\207\330\355\202\206/\313\364\017o\363<\177A\307\321\375\033\207\227\227\036\322\252\252\252\253\356\347\207\2168\270q\277u\343\256\035\233{g#s\274Jw\205\016D}\016a1[\256ZP\\<S\304\364\314\225\317\344\233.\36359V\347\031\273d<\316kz\355\357\262\342\276@\276\237\257\357\270\274\345;\207q\227\234\004@X\032\202f\377\334\254Q\223\005P\201\232\206\014B-QZf\031\032\004\325P\030\201'{\025\311\246\356""\016f\265\260\303\003\n\030)\212c\005\300uu?\362\377\353\330\024j\210TTS\256\033;&\316\312;.\303\3000,df0?t\320ps\014\363)O\377\n.Z\201e0\300\340\340\375F\206\210f\347\271\325G\200\234`\213$\202F+\006\013\025P\005\202\305D\024 \253\016\t\000\374a\246\231\206g\021L\221\210\006p\025r1\035\\}\302l\234\237\005Q;\334'\315\300\252!a\t\t\t# \306A!\020Q\213\026(\"\211?\256\317\232\352\252'\240\372\013\365j\225\376\305\305Z\342\251n\251n\251\\U5MQ\2314(^c\250\200\331\337D\352I'\347G\334\347kT\205\246Y\226$\002\000\231\216e\234\253@?B\037LT\216A\317\231\265\204\353\362\007\233\311\3745\003\322\371\274L\221\037\0235\363\236q<T\361\200@\220bEF\"\020\220\210\310\n \262A\031\0060\202\220F\010\2048 2H\213\252\001\220\233\257\260\021q\252a\001\327\030\030\232\236\367\341\000\33123\002.\314\2554]\000\3217&\356\033\2778h\232\244\010147\240@\200,d$\025\372\216\001\200\341\020\t\024x\301\001\204E$Y$\006\210\221\202G\341ix\216\214D\204\014\315!d\205\014\210?\260\030d\3038\225=\273\316<g6\355y\304\371\253\016\251\251&\323s\325/\003\312`\271\231\310\231i\265\215\355\212\245\272\020d\006\324P\364J\205\313\323V\246e\022\214\314\301\243\"\223\"\245\341\216\0131\347x<\000\036;\303\"\033\362Cq\273s\374WG\241\346\027]R!\021:\nJ\0006\r\216`9\205\336\273\316o\310\357\0249A\234\001\343\304\336\234\022@\t\305h\030\301\t\3048\242q\016 \361\007\210\034\263\034\262\301^\t\276nD\334\033\267\237\307MM7\232\273\371\265\014\224:\004\334\233\340_{\266=6l\211\315\2717\0173\271\307Q6N\2607m\314\315\302ofic\232\345\325\014$\222<\341\316\034\271r\374\234\343\304\340\234\003rD6\200\224\350h`\376\2019\263\267#\213\374\210&\301\261\\]w\275{\033\033/~\355v5\326\217\344\346\006h\365_2\236jBv\277\256\361\343\307T<6\345N\304&\3418\207\022\2071\314&!b\004\t\276\272\1771\275w\344\346b\357\360\247\270\214!\304\333\273\210q\315\353?i\334\333b\365\33742\320\306\202\210\032a\2460`\000\260\010(\021\212\244B\222\004\022\200i\213|4K\200\334bm\327\235\245\244T\243\257\025\22470u<{km\033\343V(_\213U\327\266\333,\350\\\250H\026U""H\006\337\017\006\254f4\305\"\222\352\032>f\245\206\362\276\003`(\211\254\003/\273\367\260\373\363d\343A\2500-\323\033!\373'@\272\337\020\330\033X\306\277N\273z{\3623B\267\034\240\3340\336\032\010)zJ\305\333\345\330\305\221\277VJ\315s\331\212\003\363\230CE\310\373\031\256\375\262\310K_\367}d\204\226Y\323\252\213Q\225J\022\366u\272\024D\226\273bY\252\242\273\0065\003\313Zs\\\274/\324A~\231\207\366\002\233\027\276\237\315\230\003\200!\275\020\353\3249k<V\260\027\333\234\343+\200,\330\317\372\247<x\260\245\016A\333\3648\337\253\240\334\005\316\000\220R\003\004\210F\215\003\211\237\370xp\344\006i\275\310\\\014 <\213\001q\351\023\325\344{9\334\234\323,xK>-\262\006h~V\323\\q\300\335\314$\242\311\034\202A\2401\267#d\004\203\350K\272\037\3648\000\231\2206\3541\271mC\306\347\242c\205xa\205\3201\301\342;\323Y\204\010q\306I$\247\3270\277\024\352\323\376~\274\363\327\207`P6\336w\024\320\210PIq\241q\240\010\360[\360\330\256\"Z'HV\002\260\005\221+\003\312\275D\034\216\t\241D;7\002wA2\310\035\346\202X\320F%24\236o\361v;\365\310\224. j\027\010\020#QdC0\317d\023\026\020q\312\t\250r%\362\364\320(\n\252@\236\340\"\270\356\363\363\n5\247o\355\032\001s,\374\371Wn\373p\231\220\003!\341RD\221\337b\265sv\250\313L\242\001\031\032\324\351X[~u\262H\235\360\n\241\025\031\257\n/\017Rr#\330;5\314\325\025\230G\006+\rU\267\206\314V\032\253m\344\361\275\312P\206\201\20648\007\013\003\216\204\261\225\301\300\017\340\207\356n\014\263\321\036[\342N\n\t\\\247Ab&9\216\005R\322\253\0046\016\003\010K\264U\202<B8\320`.^\006\306x\216Xi\250p\335\273g.!\202BY\375\275\330['\376]m\264\223\317\250\330B\356o\223\212\361\336\031\006ZD\260\030\0259o\013\201\357\301\\\202\005\352{\366\313\004\347NHt\345\266=\t\347\201\332d\005\327\211\001\353:\r\306\236P\346\000\337\323\235\356\334&\007Vn'\226\375G<.\241\321\303@\273\013\343RHJJ-\t\271\363\206\034\261y\354n\033\t\273v{\027B\304=\277\233\220a\314n\304\030<+(\034\005\366R\310\204\236\220\347\242V\211\342ftp\230\340\344\276@ \300%\346\240n\256\313\003a\214K\250N`l\024""\014`\306.\240\312`\306,\n,\t\224/\0341\304/\217S\342u\232\374Y\334\337\206\033\216\202\250\347>\241v\372X\256\226\227\033\325\340\350,\353\031\207RQ\330\274\222d\004\010sC8\301g\203\032!\234\030\273@\276\375J\264&C\265\020\270\004\226\252\014\360\317Lz\017\016\254\316\313\251\265\312(\270Y\206\220\277\017F\205X\rpx[\220:@xh\320Ky\035^F$4\205PQX\007\312\027\346\r\357\244\262b\034\251\242I\274\320,\313B\264-b\324d\367p\004^\tj\342\003\322)9\016\242\352\233F\302\222\301\353;=@\354\267k\2257a\335r\302\017\270x\307\\\351t\216>\306cc\001\256\010\201\020\357\247}\222OU@\2511H\201\301\3040P(\255\310,\230\273\312t\311[|\223\021\344\006\361\313\r\357\350\014[\227Qt\223\332VN/_\203\276\n\316%\261\\S\236\312\306\362\0207+1\366\372\324+1\353^\247\010&A\367/O\225L\331\310A\213y\"\362\311W\231^\037\372\217\033\026 _J\372W\3278\373L\245\\\257\2003s\306\315{EdV\002\266\024\327\016\237'\267~\014\231\201\240\315\276;\343\355\214,\347B_\346\211\317&%\244h\337\347*\204\227n\341\231+\245\005K\252\2526\002\254\375/\0333l\203ps\212K\264\272D\206\356\344d=C\016cW\204\031\004\006ZBo,U\2548\\\247\370\013\311\225\321\017\225yk\227\200\016\027\030M\215\341 \202\002\030\025\200\234\036I\251\366\274\204\352\245I\2545\2557\252\324\206E\322\311\300q9\332\227\017\237X~\352mN\375\313\234D\020\355\026]\320\024Q\371fh\302\242,\t\010\201c\025\240[\205N+\374\320.\305)\003\323@\0043\353P\030d[y\025+\"*,d\206(\220\233\027!l\"\226\220\365\222\334\260\224\314 \311\023\344\204\302J\006\244\022\310\274\276\3747;p9fO)V\220\035A\336\352&\343q\260Cs\234\017\356Y\316Y\314\345.O\177\316.\320hcX\225)\351\303\245\223\010\212~\300\355\214S g@\207\220\327\302\206\337\263\203\316q&\333\241\227{\271\366\252\031\231\221@\320\217\031\264\016:\231X\31286\264\231\347\234\247\206\231\337\036\356\340\354\362~.\305nj\337L\032\247\277\345&~\031\242n\354*N\272z\347$9\0019)\004\244\t\315\361\202\250n\257\035u<T\256\266f\300!\332B\315\260\262\265\267=\222<\354\013\340:\241/\010\022\360\023Qyg-~\233=\035\235\tg\313\253\010\322nY""\236gZ\022\241\203\250\205\035Ls\002\254\354\253\273\340j\030.1\021\220\3035\262\376\336\252K'+B\264\335\003I2F\2702&&\3742\376?zq\037\334zMu\262#\310\373\026J)\231&9\204\313\314\313Qy u2f=/y\221\251\231Z\352K\370\372\375g\274|\003\357\004X\020A9eH[q\315%\276\233\031q\247a\211Z\240\330\370\216Gv\275m\347\337j\003HJb\242\250\257\311&\306\354!%]\3520c[\r\333\"\352\003_\262\363W\276V\346~\2367\275M\032\352\207E:\025\267\205:+\327J\026\030b\257\313\242\007\207kKD\364\213\325\363~&\237qu\304\225p:)\277\274F\266\206[\206h/\302\033\007\232,#\303\2123\023\n\256\314\000\353\254 \262\301m\361\354\"]\323)<*n\315\374\036\223\222\352\332i\271\203\n\252\311\341`\036\220]\004\333\3440H\262\023\206\010T%\234\037e\2272\001\013\005\010\354\035\330U\312C\221\270q\215\016n\021\307$F\300l\203\356\323x\177\017\225\243\237\344\035\353\004\366@\370+\231\t=\000;`\244@\353\017=\014\0071b\010T\022\204J\t\361X\036\024\233\365\372\335<S\334j\256\355.\334g\272\225\323\327Vi\244Vh\264\356\363\352\371M\231bI\333\010\274\325\347%\271_\220\267\226FJ\212\320\230P\215\025\200\360&Xa\210QD\3414`\337u8\022KEQ\220\220\240\364\020\251\024\302|\303\356\017\037\037\333\023\304f\223\210\311,c\225h\256\341p`{\007\335\331M\247\363o\247\035g\231+\34232\3063\023\233\273\256\033\231\222\301\201\245}!S\030\214\220cnG4\022\317^\343!B\030\263E;\306j\200\307DK\321m\256\3669\254d\003i+\265\3312eY\230\200\221\277\024I\230\344\"w\010%}\0326\032\365\353gh\304@\257\177\326',N^\235M56\t\257\373\305p\375J2 ;\336_q\364]\301\273\274\243\244\021H\322@l\2374\3759\206\025!\301\274\334s\214^\373\220\340\326 \206\001\224@\331\267;\344\301l\243\000QV\335\352\354P\300%\014\311\261B000,\325V\267\275\263\021\202j\253\343\371\334\375\023\247\257\267J\243\334\243 \314\013S\357G\264\357\361L=\264alj\260\224\025n\333\247l=\354\2202N\327\245\350\016\204zOG\350\362\036\276\235\376\336\3177\036\303\224a\224\205=\240\365Q.\372kY\255'/\204\340\247\020\224\352y\312X\003\236e[X\030+\\\235\311\261\007\221\2603\211\332\0238<\222Z\20413\347\24236""\001\322\005]\212\001\024$*\022(T#\335\361^\0266T\304+\332\304\257\237z\355\362\223\215Da\013\222\222BI/\005\t,\333\250TY-\336\247\210s\212\345z\326\343\211\244\276\254\306g\210\241\020x\300`\365!wP\300\207tJ\364QNg\250\024\033\267\203\326\225\344a\347\013\010\226v..>FY\206\345vl\023\363\350\205\021\244\363\253\211Q8,\200\240(.\031\370\365,a\267b.\313 \256fB\344\336\350ZV\225\244+S\206QR\201\354\026\255V\261$\223E\201\230,\207%\332\201dE\221X\\\373\2615\207o3\210xPs;r\205h\2055\221;\335Ew\201\005[)q\357\343\022\257\020\322J\027AtQ$\314\325\204\241 Wc\335\330\034\3367\277\373L2\031\216oa\240\030\0352H@\260s\263\370x\263\225VA\r\232R\327f:\273\033\244\230\014\013\255\361\343\235\240\",s\037\004\023\221\021\023\035\310>\000\310\014p\350\004\244\2452\371b\251\002\264Z\264\244\350\275\250c\\'L\311\000o\270\342@d\t\001\024\002\014\202c\025|\350\3709\344H\206\231Sy\210H\032\372\277\206\323\271\367\361\376dO\361\377\tz\307\344#\310\220\340\254\t}\343]\274\010\342\347\273\\5;=\207\037\244G\025\204\316\315#\007\207\335yG\001l\027\243FcS\017F\236\010LQ\000\344\250\226!l\313 \0311\366\010Cmi\310W,i\321+\033h\273c*\013\004dD%P5j/\337\332jY\304\311\371\276\277\324\334y\327G\366dG\320\201^P\273\373\343\267\353\256\353Kw\336\314\274F\244k\273?\317E\311er\342\025\305y\004\342\372\002\371\216d\240(\262\n\246 \213H?>\2708jA5\355\245\210\004F#|\241\271l\300@xar\200\207\242\026\022O8\247D\342XQ\224\203T\374\256c\262\274\315\373\"\200\211\267\363\333\021\307JF\022q\025\373\035\210\352U\232>@\262=b\375\362*u\276RN\260\016\243\250\021B(\307\342\006]\000\221d\334\021\320\234\302i\330\262Z\357\005\347\017\325\365O\221B\234\236\340Y\320n\2512S\024+\302\345.\362\227\367J\330\347\360\030\331\306\021\252\224Xf\t\326\376\207OI\377\010\036h\233\004\023\346\367\354+\315t\336d\236\007j\276\361\201\361\212\216\347\371c\013\023\024\337/\316X\367\003H?\226\367~\252\305\310\250\025.\310\244\201~\3622\321\330\262\230K\227\314W\341\353\324__\346\356>Y\324\006;\224\336\020V\347E)\303\205\031z\003\214J\227^""\236\265P\276\021\210\205i\024,\027K@\253\025\272 \210\t2C\222\274\217\3241W\030\022BH\004\200`\035\202\266\311o\273,O\014K\325\003\212$\0237q\304\250`\021\331\016\227rb\317Gi\246\201\031S@:\374\216\224\227Li\214\017\333\267\3132\326\376\313\016\t\221\033,F\303\214\267\r\211\305\210\322\377\206[\247\231\202\3344\314\317LJ\215\353P\031\005dQM\254\260ph\237'\263\356B\247\220>\327\336\253|$\277pw\r\224\272\0317\014\334\254\023g\204U\312\t\023\006\304!\330/MJ\031 \262\245\232\321\032\244B\234i_\317\317`\317\312\010\306\313\270\374\005\311\300\340\300\212^\302\335rr\335\242\277C+&\356\306iJR\224\245t\177'\321\273\351\224*\252\251R\245W\202\021\023}\033\244\"$:\020A\342\367\r\357\2167\037{y\302\024D\2233.(x\210\210\207\001C\260uy~\335\353\301\017\026\370hg23\222\302\260\206\021,\324,\214\214\354\254|\2348\274\362\373\240\t'\021\200DJ1<\201\231\345(W\354\346\215\237\233i\030BK#(\206\265P\205;\205C\261\211\220\030\253\212;\315\251\301\215\251a57\341\321\2603LX\220\304\030\220\304\016 ,\262\232\027t\014=\230\235<\363\263GE!\204\222A\231\255\031,>\201M\027b\304\231d\346\"\313\317\234\200]WP\256\313\246\005\342\356\361\\\0136\321\202\304\212!\2600\025\353\252\341_7\375q\2223\t\313\212`\230\271^\222\321i\003\234\016\034\376\244n\024\207\3301\220b>\256\321\305\363\230\356\373i\257\343\010\013\0100\241\001\335i1\013h\250\311R6~O\021o\247\341G\2727]\343\312x\267\nf\200\344?\201\25117\356\016Jan\332\3163\202\004\0242\350\306\n\250=C.\306\034-\252t\201\371\\\326\211n\212\273s\2261]\313\r\337\227iX\251\306{\361\266x\235\014\357\270\333\003\237\233\267e]DD>\247U!\253\250\033Z\366P\204\217\215\340]Z\263f\241\206\225\240\241\000w\220J\343\377\251\344\215\371\376\007}h\344\363\242<\232\210\347_U\034\365\253\022\021\035\254-h\214\212\033x\346]\240\2664\201\241w0\262M\037\t\345\001\036l\030Pd28'\350]o]\027^\363\320\360\362i\312\337@\267NU\313m6\323m\025\002\3065V$\305Ta\203\0055\235\031kH\302Ebu4i\326\322F\235:t\300\035\354\332\260G\013\340~J\365K\313\232Z\336\027\204\205oxBGh\365\034\366""\363\356\243\030h\335\370\371\3739\330\272\353A\243\237\213_\241\241\244{\265\025 \210\325\362C\212\211\302@PZ\323s\321\276\376\214{\366\350K&\005\260\321r?\204\027.0\324\302\275\340\\\310\205\210\215\303ht\366\204DDDDF\370\007F\225NF\346B\216\356\014\2530\024jX\324gPQUA\244\301\266 \325\252\235I\320D\333P\242\222\240\234\271\261\200\330\343<\271c\271\2322c7v\315I\n\254\241)BBKGww\244\206\024\023\335a\232\360gc3bR\320\210#\237\201\322KZ\004\214\216KT\310\334N}\3173\246\202\221B\334\331\\\204\311\341\335\335\336\271\006\363\325U\315\226\371\231\231E\005A\310\t,z6\303&U\306R\216P\325L\0025]\022D\345\310(\253\355\274\030\002\201\315\273X\223um\214\230\231\210\210'\n\252\251*\252\252\330\230\231\221\020 \264\025UU`%h\263\032\302n^\223\213\207v\235(\264\242p\023\227i\010\215\275\025\240\006\3143\265\016\362\222q\034\363 \267Q\014\242\370\227\234\201h\267\021B\010\203\300\213\027\341\324\250\365\364N\337\r\247\204\360\235r\244\227\236Yyy\312c\252a\r\333\254&\210\3572\267M\201.p\2441\010\237\224\355O\006\273\260\001\3209\301\363\304K\204\n>\260((\201 \304\014\305\250\025W\240$$\351\326\2001\302\332\\\266B&b\rl\004Y\005\2205\000\344\001<\352\224-\035K\252E~\264,\226Vz\023C\001\030yw)\020\016\374\272\021\362E\220\222\034\301R\221`O\023\nb\311\300<\210\022\350\360\022\304h\276rxHu\003v\363Y\007\310\017\323\373\0260\214V`\350\240~(\265\240\234\004\022\223\254\240\254\203nq|\244\002\034\272\315b\020\200\310\234{m\241\207\017?\202E!\027\342\245\3057\273\263*\020S\355\244\003\273x\027V\327`\202d\256A\0004\3177\333\321X{D\307\211\351Q8\240ts\313\376p\271\014\325\340\243\251\000\221\025\342\014D*\014`\246\332QH\202\304\212\275\337\000\233\330N&\371\262T`;\341\240\226Q\014\023\322EDH\357\321\2402a\2516*L\314\350`\231\222\001\223\"\\xv>PU\275\t\310\2429\201\334\245\310~A\301\022\020\302<\327\020\263 \027E\004^\274+\351w\000eN\2350`)\347\254{\000p\211I\\\231R\001^E\001t\236\202\355\204V\026\023\030\315PP\267\001\220\253\003\010b\001\nS\005\304^\333\341\314\363\000\34619\005\300\257""\223\263bm\372\335-\247\263/[ \017\277\314\233D5\025\232\240\233\352\200\2742\247\001_\200\361\304\237\247\273,\n\375\357#c1\350\372\016o\035\343\305\001\210\032\300 \3742G\013\007%\014\000\352C\215X\017L\272K\204\307-\300d\340\233\033J\302\t\013\2109B\266\354!\260\303L\343\214\271X\303\030\270\334c\215\014\325\232\263\2640\324\022\235\205e\301N\020\0018\014\030Y}\027\220\234\213\001\265\024\261#\024\237\020E$\244\271\363\347\264~&\346\270r\203.\202\210\327\237;_\"\332\026\003L\002\355S\234\204J\212\007\177\204D\362\277v\374\370|r!\353\305C790\023.\301\267\2368\362\"\033\301%\247]B\326\246\330\332\360`\305za}\232\262D\020\022\014\204\354z7r]\335\313\273*\252\341\020\330\361\025\362\206n\254S\331\020\324\352#\221&\204\302\362\244\344\224:*\303J\332\214\327*^*v\314i\034\214\314.Cr\000%as2J\225\331\236\025\245\227\336\301\326\250\315z\356\253\274A\"\037\000)`\312g\001\210O$5``\\\242\301\360\225\317\226\n|\374\200\334[,\264N\362\000\334\023\354\"q\020\343\211\206\003\375\352\n\223\211|\026\210H'\244 s\207-\273\256=g/\031 AHE\010(F ,X\210\304DbDdDDb\"1\021\030\210\213\010\305#\010\300I\t\016\236\2126\365k\325|1<\220\374\275z\007\223\243\334{\217p\373\203\334\276\357w\273\270\007\221\311\354\000\365G\346\007\311{,\302}\256\214\317\224\277\341\206`\032\240A E>\200\244\210@\243-\013\027\210\n\312D\311/;\266\031\026\014\305(0N\320\235\264\003\301D\032E\263\001/R\356\360\\\201\215\302d%\2410\014\001/[1\205\324>\322ml\267.\010\330\202\035Pn\305\r\rA\241M\210\272\215\365\365\336\306\265\367xo/\277m\331\240G\002\tP\315&A\002\332\301R\373\001\2436\220D\2075\016\306,-\323\236\n\225\2235\307=Q\322B</\023~+U\"\013%\304H\231\2334r\003F\345X12\247;\rw\276\210\026\rb\222\003x:\033\252\306wM.<\216\351[\335\361\241\266\333\224\241\022\353\037\215:F\202\313q\255\220@\021/q3W\034S\312\010\227\371\356\241\364\246\234\301A\251\373\300\204\321s\315\020\350\r\000\3502\025\373\320C\322\206\316\026\266K8\374B\352<\212\210\306$\031\215\254\005\266\367\312-3\r\357\252\201\351\273y\217\353V\233J""\245k\017\224\322\270\005\372pE\314H\220 )\265\367\237\\:@I\246\343t\304H\206\240\321\3317N\350W\000\024\360\347\003\240:\346\376\004]\3347\006\372\267\016\025\271\354\371\202\263r\253[k|I\200%\3735\323.)\210\267\346\221\0267\327M\307=\336i\224\266\362\300qq\003p\2478\0202\345B#j\264y\266\005\260\013\031!L\370\303\0312T\014T\254u\251\330\267\272d\033\265\307\364\311&X\364\202N<\237\272r\253\207X\246\352\n\351\353\370G\221\313\320<q\\\342\314\260j\330%\244\332A\234\3005\206\n\036\203\311M\3002\324\003\256@!#{\207\200\035\245\373L\003P\004\2204\224^\001\210\344\013n\320\277]\350\312\205:B\010q\022\362\306\336\2226\020\372\340\245\360T=}I\241\020?\\X\252N\326\210\026x\2765c\000)\322\252\252\274\3632\020\360\375\310j\007\235\013\236e\004\315\023\272\310\206`r\"<\207\273\247 \270\376\r\014e\224\221\257\232\207\261\234K|\316\223\\s\000W\221\321\337\2512Nq\024L\036\007\236\315\364\r\310;a\255T\237n\276z\255j\252\253j\255\365]}\005\254U\347\247\016\264K`J\322\335\0252\3205\233,\314Ajjjji\341\222\352\005T+\200\370\270\217a\213\2429\250V\220\262\034|\024/\231@\232'0\247\210\310\005\262I\023\024#_>\361\3479\325\347\355\024:\342\t\334\r\024H&\352JT\t\307\262\312\205\205mC\370\220\221\210@!\020$\220\220`\n\021$X\000( \"A\204\026\004\201>\242\220\367\020L\214\017\274QG\336#\321\317X\240k\255\034N?p\312\376h\235\301\000)\013J~\004\017\025\371\340a\010C\000\243\345rA,\r\225\353\225Cb\210P\032.h%\247u\210\320\"\021$\r\377\007W\323\260P\364\021Pc\026A\r\242\245$E\204\220RD\342v\037l^R\200\373\360E\303P\335\330\274\201\373 \356\003\237?\233z!\320\023b\303\321\031\023\253,\310\030\013=\275s\216\371\304\007\227\001\017\303\366c\376\251\346\272k\273\324\212|a\020\273\336vC\247\257\333\202\034\261\210\320xt\355\031\001!\0101!$\212\316\261\017\322Kvu\201\222\202\226Zz\2033\"\t\201S\211\327*G\014\310\261\211\274\275lA\254\005\200V`p\004\201\231\310\223i\246\225y~\0268\360\255\371\246^d8\214\000\333\330\225\265 pj\223\217>\204Cr\364\016~fn\240\242\246 =B\364\271\010\300\035\351*\016\002\032=""\016F\020F,=C\303\352\007D\003\224\321P\370\203\020\0140S\234\210H*\370\016\251Af\030{>_w%I\317B\024\300\321\205I\014\250\270\302K<bTb{\313\252\t\340\017\225 \027\320\321\201\023\233%\030\220\314\252&\261\375//-\216\305\3301t\323\nSr\020[;%B\263\002X.x\242\034-\304 \006\241\004<\250\230\276&\337K\241\347\261\201\002NF\276k\026\320\034\027^\231\273|\251\322\0072\022\305\251J\210$\021.\030\002t\033\2002\363|n\010q&b\350-\250\002A\220\220h\204\352\tG>\374\200'O@n@\326\272t\252\252\274\2003\200\230\034\201\274_\302\324\207\000\307n'3\004\004\006F\000,\001\030H$`\260V\t\001v\331\033\270@\360\361<7\006\344T,|\244>SW\326n\2365c\276\007*\254\214\310fX\351\267\014\307\035\213\226q\022\200\203\024`\227%\n\036@s\246\310jp\245\261\245&m\226\023\200\005\014\001>\346\305+\214\346\014\272\205\3177\033\371\003\270\270\026\035\330\352\001\000\270e\255\350\241\261\324\021\022\246d\240\251\231*\244I+)2\204\005\000\304Y`\206\001,\346\n%\202\032\"\031\360\252\264h\254\353\r\342\352\214\325KJ3~5\351\303\000d\002\004B$\220\270\033\2103\335\017\010Z\325\201\252l\231{ab\341\006\350\312\374Ab\315\200\201\026nJ\214\013N;'U{\355Z4\031\rCe\252$)\207\020\200\305\010@\0020\036e\216\023\223KE\346{\350-\016\342\030-\302\010AJ:\260@\250\203\rEf\361-\262\014\211\365V\002\247\220GA\3378un\357A\270\300I+,\003\323\272r\034\373Aw\000\331u\342[\216o\252\005\204.\376\204\253\000E\"\254D\010K\003\n\210R\212\025UU\034D\313\307\277\004\014@}\277\030\355;\2675/c\200!\330\210\301\214A\300D\214Q \324i\347F\266\245\244\260\211P\021wY\364\"v\027!\017=x\\\034V?\254A1\361}\342\231\210\365\"\006c\350\006+@\035\3562\301\252\300\331\356\014\007\261\3409d\t\307\002B\004\000\260P\224@aC@\362Q\341\035\230\207\310\034J\350a`\301\253\226\240\014\225(,P\217\254r BC\360W}\nP\204\204DT\202\301\036d\250\237(\356\207\"\207zT\016 C\221$\201\024\030E\022\255\001\222E\370\334T\320\2347\007?H\231\005\356\235\024WD\0266\217\346\262\332A\271\r\336\273\325\247\242\251s:\255\200:\r\230\001.`f\354\251\025\337\031Hx\nb\010\364Br5-\226""\275\275\326\260\300\214{D:\304<i3\013\223T\247\206\241O\235\016\271:y\303\031h\311\347\354Rw\n*Wr\215(*tLVQ\2370\262\211\034\260\032\336a\002\230\245\020\014\335\214\\\020\321y]\356\313\331\223\004\222\275\356\2724\330\306C\2357\206\205\373\356\210r\\\000-\324\036E\305\265\341\222\322\247H\022=Y\365\344\031f&DR\302d\013\247\330\262uL7\356\332\205.!#\240\274\270j\235\315\3513k\236sF\341\364\332\323Q\014@\351\330J\207p\264B\202\320(\022\r\025\215\372\007\024]SBj\315Y\265<\243\242\360\366\315\014\303\037\004h\"fr|\002S\223!\006S\031\000U\215)3\002\306\001\031M$\032\324\230\310\264jUS\310-\020\035\276\311\350\210\210\211\025aC\030\322\022\252\025B\201A\361\004\260RX\014\202 -4\2004%$:\341\363\261&L\342\022\362\332*\252\t\030\306QT\027\202\354\033j*\250\226PY\016\324*dc\214\214J\357\325k&\\*\256\020\244\025UGR\005\324\240\206+&A\364\317\234\337s\2744 \365\206I\242\247yJ\337Z*IS`6\261W\002\014!U\341\361\207\306\257\020={\336\031\360\341\274\"\016^R\320\276S\014-d\250\001\351\014}\252<p\0018\325\307\220X\205P'\252\033\272u\305\351&`\303\0238\226\021\310@\260'\247\020\023\341\342\207J\006\376m\304\366\303\331\270\301\310\340\356\340!\301\031\001\212\220F\203\324@\310\227\222K\325\224Y\010UU\207\\\232n\311\021\210\244\311\004\201\014\335\255RI$\240k\343\003\021\013\257\224\363\217\250=c\350\323/,\3529\224k\237\323\365z\277\001\352\324\020\216\365\265\313\033\330#[\206\266r\326\365\203\250\022h9\370\225\250`\232k\206@\330\307#\250\\PL\363\014B\211I\230z\237\002\305(k\366[\021\010\027\013\021mj\275\342X\252\275\233\033fqI\255\260\265\273\355\255\265\3058\207&\256\035\201\265\275p*\355\021\n\216\334\367\337\273\212Yl\230&\362\333\246S\220\363\341$XF\0244\005,PU\301E\010\212\252\247d\207\213\247\3217\235\226\033\247\025E\357\013\000\365\316\235\300. f\214\202B\306n\035g1\232<E\224\035\001M;\273\310\334\227\356\341\341\023\274\360\257\220\345\025f\017|\235\356Q\\\336\330\r\212\000\3375\302)\236b\272t@\345\232{A\3078\022\3263'D\t\200c\2616N\034\267\220\207\030[;j/\241ZJ^)\023DC""\276\375\\\302P\016\262Q\2148\t\020\372\204\222I\022\221.7\236\325\"\252\274\341r\003\016]\223\266v\211\266\372\204\340\201\271\301\206\300Z\000h\2014\r\260\203\271Z\201\277\265\320U\214x|\010\240\274TLN\321K\354\236\306Z\006p\200\033\214\022\311\247\037\014qO\035\267{\000\366#\354O`\373\003\344>C\345\346\000\365/\224\330\241\220m\305/A\177_\306'M\271f\347\221\212\304\244\315\316\222\233_\246cNy\005\220\2222\021\030\203\3227\260\343\236\344\250}\340\305\001\317\034Pm r\321\241y\005R\340\343\001\r\212\021#\300]\032\322\252\243\025x\251\237\002\2714`\016wM\002\320\256\264!L\00260\265\3121L\240n\231\006(\004\210D\320R\252\244\212nlsg\226y\271\261\266\021\275\263Cg+\257\266\323\n9M\370\206\365\243\205E\024Q\3010cx\\\017\003&\250}8\346\032\003@\322\016=\313Bo\271\310x\274\022\025\277\315L\234\213\337\033v1\21687\020E!U\010P\210\361APX\227G\211\001\220b\353t\210K\341\307\001\270\021\320\"\036\370\300j\312\322\241\234d\023\"\336\021\021:&\250\272\244\010\025(X1\t\003h\210\374i\020n\214\016J\227\246\225\017\030\n\00679\022\214$\263\354\013%\234\302&\247V\241\224\000\342m\3170\032p(0\005\006$U\017=\260\333\241j\373\336\032\201\260\223\325\004\241\220;os\\\257|\321\243\017\204\254\010\341{PD\014\234\313\027)\340yr\344n\353\205\\5\215\302s\261a:\315\247c\244Hnu=X\352F\255\013n\303\236\014\274kr\370\223b\242\252\250\243\244\004\363OP\373\372(\363h\243\267E\035\312(\354QEf\362\2306\242\215QEnMr\220\220:\264\313}$>\341\013m\r\232N\363\335\315\030K\252\315o}}\322\252\216W\247\t\247\255\302\034\314\02490\264)\205\241L-6e\256\270\274\273\264\341\247\223\3639\200\2540\220\32254\3633\302\305\371\261\r\326\353\016\320\014z\2667\333\t\333\333\216X*\345\347(K\300K\006\343h\034:\322\215@J\352`]\220\356\252J9\3344\312c\216\207\023R\004\207\003\200P\201\214\316\006\nm\241\265\264\265\033\203\020\262l\006'\202t\0269\316\215\250\010A\334\250H\nA\201\327]Y]\314\033A\002'\304+\355~\323f\300e\247\356\241\334\020A h7\217PX^\361\037\306\021\t\006\007I^c\230>\335Pj/\217\274?\227m\303\351/BJA \007""\211\331\020\370\030\037\252\031\316gY9\3005'p\275\347\241\250\220<&\334\301\324\245\2270\330\220\211\027An2\010\036*\rv\220\023av\316\321;\003\234\017\302~\005C@\327 \365\304\341\325\254\307K\333\030e\360S\3126\256\263x\261d\017\265\207N\363\004\355\000\256\260\363\371\307\350\017\037\027\347\313\332\001\262\220\010\246\251B\360\016\264\023\225\224\014C\020\300\006\202\204,\t\323\357\0348p~\2058\241\304\372\003U\331\221\207\0206^*yp\241\226JB\324\205\004m\003\340\352\367X\274G\276\362\252s\337\010\201\022\010`F\246LBV\225!\213\205\313\205\302\342\2611\004>\352\245>n\327\251[]`)\331\260l\033\032\231(\370\010xJ\212(\260\000\365/\262\364||\204\231\010!\016\322l\201\221T\374a \021V\202\003\332\022au\020/\004Ru\241p\203\016\370/\243\346\355\230%\317\236\364\030GH\206\326\246\323\027\215'|7\205n\247\014\022\201\013}>\300\013\010q\270\207`v/Xxv\\\325\027\276@\r\300\222\220;\201\013p\246\307\211\216\241\337\223j\365\331\030\225\212\313\214\335\231$\244\0230\022&LX:\272\232\204\357\347\213\374\204\234-\365\306H~E\276U\352^Ki\312\034\234y\310\264\262_&\241\361\030\252\331\335D\220\371\225\013\302Y\224[\232\254\271\255R\253\254Q:{\275l\366a\351\236\270\307\354=`\367\375\203\276zu\001`\253$`\014Pb\212\251\004R\027\316\241\342\230Z\034~\221B\217\256\014\017\201\346\302\002z,%%\010\242\225D\004d\001\204F,\022%U\014\213\026\001^ }E\330\375\tK\373\212X\243\317\006\304T\240\367I\366d\237\237\365HX\260\307\345\234\216\206Hm\232r\024\255RS\244-\030h\236%?\024\204\014`e\227h\025D\376\373\013\031!\374\264@\212`\260\240d\202Z\037\2629\034$E\006\025\n\006\037\264C\367e\020?\231Y\355\325$\203#\001\201#\016\033\024)\323!\263#\003\236\247\037\222\350\3344d \353\356\222\370iU\214\200\217V\211C\242\007\320T\335\220+J+.U=\236\030\231*%\010,\257\261\337\026\002\0202\024h\223\243\002\222%0D\212}\222\036\361\203\341~F\234\024W\217\037\275\213\365\343\370\266[7DE\222\007`\365\032\273\204V\260|b\030\370\207\024 \004\034\327:c\257\315\027E2\246(6E\306d\371%?,\365\344\267\353\343\366\356|\267N\217""\256\002\303!\220\335j\344\027vP\266\034\002\217J\033\302)r\355.\321\261\336\201x\273\314,\006\310\216\367\2037\321\2426\360\226:\3570\326\n\3260\352\252\333]\375\351S\177)\251\207\371cV`q\204\336\321v\0162\272\375\023(n?ku\234\354\035\232_\371\273\021\245jmgK[\005\214\005\377\277\231\350\376\350\034\362~i\300\006\367\236!\213*\237M=O\355\021i\326\326\027S\314\373?\315\277i\324\272\337 \r\307T\353\005f\374\302\004m\210\005~\3007\220<\301\311\335\374y\007\371^\010^\236\371\364\257\002J\n\007\3034\037\301QTS\014\245r\005F\331\016\216\307_\363vc\353\300\216\027&\032\217G\312\377\250\255Wd\355\0378E\237QN..\036\003\316\347\234\177j\214=)r\257\341\363\353<+\004&T\312\276t\375B_-[\204yM\245\320\227:4\370\374\247\223\312\177u\317{\263\345\037\020f\203\354\232+\204\r\303\376\206K\357\207\323a\\\256\313\277k\311\317\345O\253U\334\177Y\372G\323\252\367A\320oH\243\025\305ygk\333}\262\275\300\372Bs\373\263\366\017-;o=\317&\364\264\313H\362+z0>>\317\252\275\177[\376\001\364\273\177J\302\021\025\005\213&\256: c\222&\243\351\317\227\347v\264X\302\035\346C\306\r{\236={a\3444@O!6\3043\002\217\026\373b\345y\"\036\307\260\364\344\370\t\374\030=\237.|~\327\0204\324\240\207\027K!\356!\360\261.\201Uq\272\347\237\302\334\036\220\354\376\201\304\304pg\024\303\262\020\216 \342\324C\202\333\345\220H\375M\377\027\204\345\003#\262R\354v\016\321\305\241N\034AP\033\033=\r\333\215\376\001\275V\353\0108\2231\342o\366mM\211v\021\017G\n\031\237g\251\326\353n\030\340\032|\376\033,\021\3768\0104LC\244\334Y0\244\035\304 a\332\205:\217;\247\300\314&m\377M\307:\342\npP\302~\302k8X*\022\231$\236^\352;\21099\275>\236_\263\277&\370\340\307\303\030\"F\253L=,\266\305\305\374\237\272\274\036\010(o\270\366\224.\320;\237\205\310\257S:|\217\274\017'c\315:\304\210e\"\r\370t\307u\235\2359\360\221\224\211.y\300ppp\202dq\240c\320\2719R \310\031J\022\367\233\364[\233\307\037pc\267\250\362\"\n\017\364\372?i\275\332?{\001\r\036\000\364z\t K\355\032\035\266\337\335\341\336\337\010\261\315\245\301\036\337\266\232\245\232:""\2128\246\217\237\332\306\3727\370\216\026\355\234\304\216\r\3140\307\266\002\3373\333\265\365\035\316%\226\034=\301\270h\335\016o;\301\r\304v\331\227\324n\356\036\203{\202+\207\205\376\336\023w\264o}\014:\3361\330[?\257).\263\355\354\233hm\243\274\337[\365\266\272\324\230\332\370\r\216\247T\332Ub\266\323K+\273\353\352\257\037Or\033>\270\300\204\\\330<\350\352\353\370\316\232\361\375\2353\302u?\343\371\201\255\246k0k1\254\334\340\350\351/\273\3545:\377wt}N\3774\031\364z+\312\034\276\377\336wFm)\315\020\377E\313\245\237\321/\201\354\270f\361\234\216\332\r{\204\330:\r\300\231A\214\357|o(\336\000\313\264\031\272\306s/\212\302a\263O\237;\353tI\234\007c\364k~c#\334\353\373\037l6\274g\031\222m\267\210\302\266\265\017\027\354\317\325\206\263~+\205V\016\03513V\372\017xm\243\227\312S\003\344\026\rs\310\252\261K\325\256\221\3474\227$\304\311-N\247\310[\253\254\217>\375\"\254\235+=\022V\333\372M\234\203 \357p\244\351\321\264\360\200\331\217+\001\022,E@\203\014\260-S\231\n\010\241\332lB\232\233!U\026\242\226\025X\357\223\224\311\337\336\220V3\217/ZPh\266S\032\253 $b\223\351\332\302\332\014%\213\312\322\034\220\302\207)\tK!4\014\372\233\304\356\224\253\274\204\330\235\325\005\262 \307)\005\334E\010s\314\371\344\306\230\253J\r\017\261\362\007\253N\264\315B\004\030'-\025\243B\004\020\354!\324\354\016\310rK\033D\305\342J\367\225Ql\205\267\242H\t\306\350\210H9\033\t\211\317\207c\016x\275\311\2006b$)\304\262\202]\340\r\3617#\264\010\244\315\241\254i\032\006\201\240\032\312\271\2541\331\232n\310z\n\252\031\2613\004V-\244\264\\k\033U`\322^M53\210\222\305\214\337\352\235\010\220\205\320\200h\273\"\"<I\243\262\010\211\233$v\225c\004F\230\202\250\321d\313\\\304i\363AB \306\271\031\216\361$$$\300()hZ\"%\226F|\237[\252l\324\002\362\224{Z\356!\013!j\202\230\001\252\364/\232\2434\030\255\212\274.\305\023&\0012\rUW\177\202\373\324u\031\243F\321\315Xm\252\022}a(m\274\205\315?I\343\376!\327\233\354\002\003\377\003\206F\376T\022Gc\205V\373\030N\027+\225\r\361\254j\253\225\031\227\313\033\332H,S""\253\225t\315m-=\t\300YV1ba\245\335\223\255\223uI\224\n\254\322Yth\327Y\3654y\311{\325\0142\233\367\375m\037\325\361z>\367Y\342\217\210\304\261\254I%TG<\001h\022-\220\306\002\004cr\207\231*\261\023\234\033\377\027rE8P\220\362\2242\344";
    PyObject *data = __Pyx_DecompressString(cstring, 11281, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (11362 bytes) */
const char* const cstring = "x\332\355}\311w\023I\326/.\240\n(C\331\330\230\202\002*m\006\311\325\266\260<\202\253L?\201mp56\330\222\241\350jJNKi\243*Y\222\225)\203\351q\365\035\277\235\316[i\361\235\363i\251\245\226Zj\351\245\226Z\372\274\363N\257\371\023\336\2757\"##S\251\311\270\206\356\306\007\244\030o\014w\210\337\215\210L\r\216\214F\207o\302\307M30->\034Q\337\315\221\311h\323\244\337\231\304F\306\243\230\013\377 \356\233\332\010(\321t25\034K(i-\025W#\332\226\2260\224\215dZ1^i\212n\250\211\250\232\216*k\337x\242\252\241\031\261-\315g\006<\367\326\316(\360\027\211\253\272>\244\244\322\311\235X4\226\330T\324h4f\304\222\t5\256ld\022\021\026\204\024M'\302[\311\264\246D\222\211\035-\021\203\306\210\206ISI\246\264\264\2125\364\3513\2243\254\370}J:\026y\245D\324\270\206\275Q\324t\314x\265\005\345#\212\327H\206\267\222\t\343\325\220\002!\350n\332\010'7(\262\021K\353,\242\031\021\337 '6\352SR\311\327Zz#\023WRjZ\307\376z1\240\r)\013\301'CJ2\rcP\343CJL\207r\332O\366\352c>E{\223\212\307\"1cH\321\325\rM\301^\277M&\370\210\200`2\241\274\206\376\301P\343Q\345\2262\033\014)\211dz\013f\340-\r\314G\244<\2763\201HDK\031\372\264\"\005=/<C\212g\021?\236\343\307,~\274\302\217-\374\320)D\237\031\372L\350\236@\364\307\214n\020\273p\026\025\340\030uJ\331\210i\361\250\316:\223\320^+;j<\243\351C\324<\376aF2c(\352\306\206\006L\202\211@\032b<\300\362\247\273Q\003\270\354;#\352L\303T\251[\312\256\006l\200\002\261\004\346O+\201u=\031\317@\343\230\341Sf\265\r5\0237t`\203\262\026\234[\n-,\315=^S\274\211\244\022y\245&6\265A\237\240\210\177\013\033\212\236\322\"1\350qT\361n\2465\030\007\n\240\232P\326F\326\006\207P\304\266RD\356{\277\317w\027\376^\372\234}\"1p\355\024\345\374\354\275\362\217\326\366)\252\356\272\366\010\322\177\366\376l\251ob[\031\352\203N\234Mk:4\207|\246\t\251\355-H\203;W1\343H\373\013V@\333\316\200}@R\316\276\217\370|\243c.\374\215%\260/\256\014\246\254_\264\207\023.\022\250k`\003\242\256=dY\277z\017\267b\221t\262A7\245\374_\264\257w\357:u:\255\031\231tB\227\254\320\264\022\262\t\261X2\204\201\263Z'\323""\307\r\236d\275\256_W\346\2663\261\035\\H\014\221z\357\336=%j\370\370\372\347\265\215\t\377\320\246\315\340\307PM\026)\322\014[\200j2A\361f\340\177m\006\252\323\014~\270\020$I\236a_\265\331\21453\354\313\255\266`\337\214\024\266\027\034\0241\347\312\001\314@\203\345\375\335\355\341A%\271\261\241kF\303U\300*b\nR\210H\355\2329D\251\005\246\252\324\021\340\233\300\030v\236\275\001Y\211kN\206\301\032\017my\207\375#\203PL\361\2170S\247n&\353\224\244\202R\3118\nh\243\331 \010\304\204*\242 \030`c\243\364H&\235F\250\204\311\rg\311\254\307\246\351\266n\244o/\301\372J\203\177\316\363HR\035\032\207\205dr\014\200\210\311VD\345Dfk\035\024\315;2\263\010\350\302\347\233\234\tf\022\016\335\244\212\320\264\275\242\n\332\003\310/\216\200(\242\"\004\312\244R,\210*k\304\214\270F\021\257\346\333\364!0I&\020uD\001\267\001\326\332\304\360?s\377\363\317\377\376\237\377W\372\337\036\267&\371H\225\025\315Pc\t\266\016%\323\261M\204X\346\314\310S\326\262\204`\277\235lhUj\260N\2307\356%\231 \261\300v`\200ux\334\214\316@(\243\r\014\232t \2427#\324\246\300\245\322\332N,\231\321?H\334\257+q6>\264*rX\251%\221\263QoF\250\241\314\271SjS\350\022\332\233\017&\356W\0268\301\203V\205\r+\264$l\202r3\"\r\005\255\226J\233BF\362\365\236\250\203h\324\201\035\037\204\364\347\023\322Ve\322\224\244\341\321!\205\213\244\233D\262\035\027\343u\222B\365\300\234I\014h5\224L'5;\340s\2417(f\215\321\323\2213.\322Z\237hc\321\207\211c\333\024\270I\2034\035(\306\334W\251+\374\362&\207]\204\027)\347P\002\314\252\232\342\353\237\371VE\361\365\217\316\314j\221F\362\313\353\265-\275@\037%vC[Og\3244\006Al\377\371\337{\355K.\333\3319\323d\333e\326\324l\030\334\360\230\177\260}\327\026ea\203Z\024VB\211\201tf\214\344\226j\304\"j<\276\313\\Z\3400g\271m\377\205\363\231\367\367\375\341.\355\263\265\003w\261\202\227\271\253\003\363\332\372\300\020\271\2470\031\226\260\307U\020\\.\350\363\2147\256\002\332B\023~\377\240\3035\225\364\2117\261\224\334\321H\342\332m\002;^C_4\341\267\006!S\245~\265\256\245n8J\350^]\355\374\367\225;\373$""\264\205z\251\206\227$\255V\316ji7&\343\037\254\307\350:T\332\3414\001\231\377d.[\023\320\026\324l\312a\213nc\022\365\271\353B\241\035\3162\246\276'\304dD\032b\314\177?\321hU\020\030\003\021\3355\220\003\363\244\016\260\023\005\353\341;F\014h\311\313\223\277\031\255\243\000b\302\212|@b\037\220Xk+b;P\214V\262\367\204b\266\206[h\3430X\254\3656\016\017\306\032\267u8\365\245e\342\203\352~P\335\3460\247\035\265%\210\362\236j+\032m\201\376aT\2665\372\357\257\256\265\355\034NUIK\337\023\221\021\r; \373%t\375\220\252.i\272\027Uy\0304QK\3501#\266\243\r\016)\315\364\372?D\255\177F\214J\032\200\020\225\353o\035\244jj.\003\227X\251\036N%\202\010Se\225\252\257\2522\301z[\221&I\233\2426\327\316\372\244[\323\316\341\344\306\3606\014\032ol\324\331\233\344\331\276\226\227VI\313x\2279\211\241\372\302\261\2067\227\306^\256\331E\254\236H\246\353\312\2754\236\377\004/\255\036\257\332\331!\344u\314%\310Z\336\334}9\224FSbl\013\204\243\017\2555\347\276\363.57\nBy\024\315\325,\200\315uK\326\215&\215\276\267\262\t0\374A\333\376\205\\\3006\325\215\274\247\243R7g'Zk\357\360\372\326n{G\243pu[}o\215#<\373A\333\376E\274\26665\215\034\237\243\3224\271\003\255\265ux-k\247\255\243\3210\327\026\337[\273\314\344\367t\364L2\r7\337?\350\347o\372\204\300\024Wt\300\374\r\217\tj4\220y7<\251\2363f\322\007\362\243\203\355i\235\203~=\337LjA\350\\[\272\326\260\235v\316\263\354;3\377\231\207\225\2669h\313\323iz^\351~i\300\225J\213BP\227\313\316\247\263\\\236\312JB\341\264\3714\327\207\247\262\376s\236\312z\277g`H\274\336\347A\030\353\271\027\333s.\346s-\256\317\2214z\360\360}D\373\303\243i\037\036M\373\367x4\315\322\220\243z>\355\267\3668\231\023\267l\244U\376\0148oPGw>\022\243G\245\033)\275\255\224\354\016\030jz\023\334\200\206\204\275#\303\223\255<{f\347\225@\033\215h\267\0026\224\031\005\233\361\216\216\214\216\003\336\035\201\377\023C\n~\341\025\031H\032\237\230\234\272sw\320\311\345\r=\345\035#`\262\030\213\307c\\!D\323\266\342H{\330?2\354\237PFF\246\375\243\323c\343> ;22b\361$\275\231\241'\372=\272\226""\362(\0215\221H\032\312\272\246\340\321\221\357\001\213\252QX-\264\270\241\"\357\360\t\373\264\272\373\375M\035d>\230I\245\222i\234\017\020n\324Cz0\237\036;\027\217\240\263\307\321u\361\214\372+\366\334\272I<\222\334\002n\202\177\251\306v\330\303\351\352k\214\233\363\256O\237\301\323,3\352\007\352\316\232\254G|A\211\306`\365 `\005J\262i\274\322}T\037\212\370y\312\264\"\010\340\023\371\206D\220\305\035Q\242\016\014On\211^L\216\177\357(dN\213\223\364M\335C\263\226L\014'\264M\025\317\362\224\215xR5\246\261\014s\021\351\205\007\314\330$`\340\300\312-\020\253T\022D\332\327\006=0nQ\3603\r|\213B\006\254\240Y\225\254\031[\3563\364>\203\010\2100\014\306\023\24573x\224\332\202$\360\216\302\206ki\227\222\365\0132!r\224v\364\202\336\265 X\302c|\324\207\230\270v\010\210\t\325c\233\211\026\t\304\336\200\360\247\222\354\224\226\304\3670Tl\335\020\324\232\022\2605\305\270\016\340\t\227.&\010\207\255\334\362D\326\0219\327\262\266a\265\333\331\006\225\233w\0262\264M-\375>|w!q(\3167\353J\013\274\027$\016\307}\253z+\274\023\245[\346\236\226\336H\246\267\304;^`T\2077\320&\261-\304M\370V\025\365\310H\352\231u\203/\341\357E\317\244\323\326\372\365J\213\374\244\274~\245\221w\023\023[\036\033\031\200 \344&\254'\223q;\344\251\017\375t-\276\241\334Sj^\277\343K$_{1\323g\274\215%6\222\026\224\250\327~\n\2679\016\323\3727m\265\016\020\301Hg`\312Te5\364`\330>]l\235U\225\247O\202\013\337\321\242\241\033\200\237\024\257\371\336\031V~\260!04t\363F\017\231\017\302r\016\202M\220_\300\245k-\315\007R\360\341\030DK^\003\\[\343\355\214\007(z\334\247\301\334\nZ\213'#j|\315\232\014k\324$^uF\335\2447\310\t\204sV\333\200\334\036Xo#\212\307\266b\314U\312$0\260\256\031\2575-1\355\376:!\337\003\016E\354\014\261\372\014t\324\004s\334[zW\220\361\026\263\231\224\330o`\205\030\2147\251\264z\013\313\274\365$:\232DfZ\235A\035\245\211\216\275e\273\250\2669\256\177?+d\022\300+Z_\243c\270\346!:\2365zo\025\205\255\336\326\322\021\202\304\006\2134\003h@\010\000\341\266\340\232\243\304Z+\327\235\\\334Jp\005!\025\204\301|i""\323\032nq\257\235\261\277}\204\027\326\336`a\035\0263n\006\014\307\264\267\"h)|\017\230\356\013\t\3652\336\2069f\365\032o-\311\373\277\377\365\177\350\235U\263f\353\264\320\340\376p\034`bt\327!U\2763\253\270\030I\304\006=8\361\230\242\203\251\216\274\302\204-0dI\332L\216X,w\033IM\253N\326;\320\266=\333&\342.\344\255\375+e\035o\342\212t/F\3030\r\315;`\016\327\224O\373\360,\251\345\325\360ud\200\247\265CN\210\262\276+\277\226\315\336m\337,\241u\017\032\205\032\317\260N\036\240\030m+e\354*\2402@\3227\367\006\274|\320W\377\360\254\271\304\016\201\230\201\007\255F\225M\250s3:\034\205\366\022:s\245\251\204\250\005\324\260\254\232\210h\250\0355\372c'\345\251W-\221\362Y~[\033\225L\227Nr\372\276z\371\322I@*\010.\261\307\327\200\240p\201\352w\243^\037\244\252\355t\302Sg\014\244C\255\322\226\010\317\253\261\270M\254\304\372l\002F\264\264\342E|\304\254\346u\230\341\254\255\245E\247\225o\334\2060\337hcg\0137\231@\026\3712\246\214\340\243\366N\251\363=v\252Rk:\376\265\260d\311t\243\025\320\260\326\n\244\3525M\303\026([bS\020\021\307<\267\344\235\361\301_g\275|\374o\275&\232\2663Zoq8\3542'L\265s\235\303\2674\342\334.%\r\362\360\014\345\301.HA\002\355>\350[l\035\337d\251\305\231\261\214\210\r\347\247sO\207\307\357\214\023LIk?\222\036\233\023\242\321\224\254gb88\305\330Mi\272\0177\257w\223\031p\007\331\330R8qR\005\030kB\301[\0218h\017\231jr\243\302P\035f\310\003\336N\032\217[v\210\361\363j\\\327|O\022\330-\266\271\247+\262k\304 \"4\376\275\353&\337K\207\361\000\r\367=\345.WD\003C \336\337\351v~mn<A\033\rU\300,\300\204\320\261OK\231ho4\262;Cb\034\3236\351[k\374\356\314\265Cm\350\037N\210\260\247^Kv\314\371\002\337\0054\350\227\2330\326\336\277\304\214QW]\246,M\373\022\277\334\224\261\366~\223S\026\225\246\213\272)MW\230\374BR\020o<\006\326{ttrj\220\245F\325\335pr#\314\237\210f\271\023c\223<\227\311\210Y\351\356\204\231\254\247\314\304\261\321q\236\030\323\303|G\203e\215\215\336\271ke\321f\203\2311ee$\005\0160\tN\230\231l\266\315\306\307\374<\231\360\013\030P\2363\351\277#e\030\231T""\334\354\300\344\235\0213G\276\243\301s\375\243#\343\216lq;\215\025\030\231\230p\0240_\375\302\013\214M\2149\n\260\247\230(\367\316\335I+\223\026}^kb|\312\236\301\\\177\2269n\257%\232\032\237\224\372b\037\306\224\324\t\353\341y\221-\246\323qO\320,\340\037\275\343(\340\034\345\035'\005i\224w\247F\255L\353\305\014\242\365\361\tG\266\263\365\221)G\001g\353S~G\001\271uy*\235\224\307\245n\313S<1%\361\335\321\332\270\334\035\271\241\273V\272U\034d\325L}\033Vw\000\302\252\353q\315\027\016\003\320\010\207\315B\223wG\254R&*\346yw&\307\254<\341\356\231\231\243&\371\214\021\261\3551\361\022\343#cV\001\247Z\210\341\363<Y3\246\374c\203+d\200\2245@\360k\014\215bmD\331\351]v\326f\304`4\014\006\254\221!\332\244\036x\007\327\010\311A\351\332})\367\233VR\367\274\366#\316?\327\2342{\214-\232y\3174\035h\016\271\026\000!\203|\377H\235\\`\021f\373\335\263\361l\034\262'\353T\216\021\351\t\367\\\360?\352W}\315\332\255\323\347]\226;z\247\016\351\230\036\325\r(0b\313\375\253\210\3252\214\261\264\005^\261\235\3070\177K{;,\243&\034<#\372\022\311\332+\010\234\2053\300@\227\3012\376\315\270\261\2073of\3225\213n6\334q\257\025K\314L\214\270f\001\313f\356\272\346\274\246\233\337\256Y\273\354R\270;E\342\324\314H\235{\017&\237\370\346nk\252E\205\017\251]\277=\325\272\323P\265\306\033\251V=\312G\243[\376&\272%\363\254\221v9\331u\010\005\373mj\227\177\262\256z\215\337\251\253^\023S\277\274~!\320_\010>\261\366\221\332\324\032\tz:\025\307#+\211\342A\214\200\2427\302\303\\\326\376\352\326#\376\0248x\355t\243S\217\341\346\236Q\347u5\326=\246V/}\001\005\221\024\344[a\354\316\265\271\r\266\021\003_E\033\022\356x\320tT\352\376x\004m\016\202w\3625\325\241\355\336v+\221\337/U\242_\255Xn\343\247+\220\034=\236q[~\t\246{\217\216\224x\323\236\213\312\355\364\310\255\222\263%\334\205\203\302\353I\343\025\337\237\325bx\212&O)]x7q\245\274\311\0108\220\314\216f|\017\246\342e\253\022\204\265qS\315'\210\206M\242\272\244\004\364\220\004\002Q\020V\225\356+\262;Q\246\214\251\326\365\000~a\300'6\006\371#9\253\t]\334\025\223~""\t\205\034i\317\315\250\207\375\244\214\265\023\355k\267\002?;\220\253I\347a\346\34546\215\212\370=\225\027C\312\342\220\362|H\231\035R^\r)[\340\310\303'\374\317\300\377\204n#\007\252\234\332U,\377\337\273\364\364Ex6\020\232\013-,\316\255.-\204\024\r\212\014*\036\271\222U\034\267\004Q6\361\033\005\344\373\227\300&e\310\373{\337\2202|\023\004\000\357Lx}>\337 |\207\023IC3/\035\214\212K\007\020\tGc;at\335\247\001D\354\260-\357\365]\345\255\226\006.J\331\341\255L\243\"\321\344\353D\223\354&\024\264\035-\321$\273\t\005\332Lh\226\337\204\006\254\213\211H\263\374&42\251\206\231\rjo%\243.9\300I\203k\004\246&\223q\345/d#h\243\017\205a\020P\304:8^^\024\321!\005\231n\246\240\300\360\024\332-\366A\252\301\203V(\236Ll\342\177\333\335\222\321i\305\376+L\266\010\364\001L\003\357I\315}\rk\227\035\005\326\265(\333\177\267\347\30566\274Q#\271\376#\3532\305!\200\273\300\221xF\307;\013V\032\215<\032\323\321\316D\rX\325\223\270i\207\327\273\\o\237B\021hI\024\331\330\2529\206\324\022H\212m\006\022\361!\372U\245\031?\375\266\222i\235\230\031UF\320\250\372\207\370\001\020\273g\342y\311\277\361\323:`\202!M\216\263\021\261\214\335\344\006\275x\203=\355\020M\356R\272\214\030\314\262bP@\003zOi\322\335h\335\213\206\305,\314\177K\312+~S\312\3140\013\363o+\303~\253\204R\365\224W\034~\rnF\320\274\274\2423<\003\230D\367_X\220\216d\r\033\373b:\233\301\250\325k`\304 \222\300e\023\342\257\032\231\033G>\333\251\204\331\201\265\010\231\264\001F/\226\240\013c`\010'\307\207\327c\206\250R\307\3768\362\333\"Y\307 9\362\333\"Y\317B9\013\264E\264\236\311r\026h\213\250\253\r\263\345\266L\316\335\250\001\342\247\007\223\030\272\264\364\320\366\260\204\371\364\022{k\322\020\177\276@\237\001\265\240K\277\316\325\030\327\360o\244\003\346{>\345i\\S5~+\201!\3455\264\264Xi\255\356\222\313A4\203\000\004\245\303\210\211\274\344\226iL\240u\276\366&t\017\255\344\276p$\231\326|t\267\220_\361\2463g\272\366\270\205\313\267\\,\203SSS\002\014\237\0261\2706A72\006v%\215O\230\370\224En\177\330\361^|W\234H\177?|gr|d\304\347\243""\257\227\212W{c\032\313\243\240\341\243+\234\336(;\374eV\202'Y\226\232\022\302\3703x\354\202\255\307H\376\244%\234\006V\224\002\313Q\257\214\371\334\tR\365\310\314\21519\023X\210\355\337\337Fcq[\262\331\354p\202\202\310\036d\323\220y\254?#\316\367\311L{\035Q\364P\261\014@\323\031=\036\213PW3|D\362D*^\372\351\277\332B\036\254\353\021K\305=|\002\303~S\300\245\n\222\222\352\314\264R\311u\352\254b4\277\215{\314X\320F\177y\205vz\333\200\315z:r\033\300\007\256?\267S\270\215\234\332\225\223\200\345q\335\227z\023e\253\013md@0E;\026\264\024\302\332\274e\014\352\231u.)F,\362\223\356\376\010\311\241~\347\320\205\"\035V#\262\256\233\323~3\270\303a\241\022\355\r\236M\002A\340]\n\330\007Z\250i \237\353\031\274A\314\256V\332kX&D\215\243y\002`\306\n\333\213\271\301\035\254\344\261?^\214S\351|\205\221\234F\250\205' \276\241\360K\366K^\342:\215t\354d\225\3355\203\200o\302\311\r\246\240\322\317f\262\004\327\307\031b\t\260\377\261(>j\207\027u`\036<\346er\360\323</_J\021\371\226\271\017\257l\326%\001m\343s\330r_\2549h\376\220\215;E\307\234\231?\020*Z\020s\342a\367c\371j\331j\207\305\364+\244Sa\000\2133\366\233\221\216\013$\3265>\254\205\367\206\021s\317\334L{\304\2313\2378\264\225$\224\316\263 @\206\203|W\312\266\010\006\300\277\330\314$3:\272\346s\351t2\035H\245\003\231M\030\302FlS\237\235\325\"s\3607\257\255\317\247c\337\252\211o3\361o3\211E\372S\323\213\352\356\">\361`\372\365D`1\231XJ\032\013\270\233\206\017\221i\321\245\344\316\223\210A\307L\370\237\2357\205a\274\251\335p\330\214E5-eOaB/\242\t\355\265\225\227\326\242\031\260N\316\270\366F$aq\n\251\340\325\353:\312\256-\216\316\200-\001\227\r[\202\004\320\035\351\342\021;G:\302\032{\022\201\0169\205\213\226-\315\205\026\343\260-\311\344\236\234\206\222\304\023\242&\001\335\334\253\261\316\363y\210\371\222<\202\245\314\263}C\253=\345\267\245\330z\315\323\254\266q\0173\274\356\254GI\316\212\224\350\250\031K\324\324\204\244\332\232\220(\325\004\377\221\207tC\272\205\020\026W\355\255a\311n\\m\312\344\270\234\306}:+Ir\347l\211\\:E\222""\354\316Y\251\334\207\263\022jJ\010\r\025w&\304e\010\301m\014\233\243\2040\263\275\326u\nn{\035\367+D\224\333G+\256\251)i&1\005\207(\305\022\233\366|\211=\374\216\206\210\330\330\004q\323V\212\0040D\"l\023\341\230nk\3041\313\216\031\346?\253l\213H\224\222\026%\032\335\272!\321\266\220\177\230?\371\300~WYD\271\241`\260\226\335)a\350U\272`\302\202\270\024[Rd\"\031\036\313\254[\027L\354wP\254\230\304iq\262#E\337\272\\Dq\275|\342z\341\244\366\222\211\355\002I\315m\022\371\006\211\010\313\302%-\354VB:&\027\267\t\027[|\345l\373\010\254{'\256wM\\\357\227\324\336)q\271H\342zy\304\365\302H\355%\021\347\315\020\021\327UP#\271\212]\2661!c\033\254\361\n\034\017[\202<\311\006Z\203\264)l\230\300~vJ\272d\022M8S\354}\266uw\027\204I\223\373'\005k\215\221\221\264\231\"\303\221+\320G\3155\023\221\300\020\210\031\265\324\311\2114D\252P,\010\263\375~g\324\326\007\351\366G\355\215\024\226\"\003\030\\\347\337\300\377Y,\277\004\262\261\242m\004U#\250\3057\202Z*\230I\204B\2572\241\214\366\374\271\026}\021V\371\013!,0 \301\000\t\000\324.\375\265\213\276m\271\227\027z\373\022o[\334m\313\272}A\227\226r\\\304\303\340\000\300\207n\255\343\020\332M\301\347n\"\022K\302*\016\366\310\200u\\\017\273\034\317\270$\255\253\353Z\234\026y\235?q\202\207I\010\013\"\033\233\200\302\360B0~!4\200%\026\237[\324\326\325\310O\221\270n\"\006\016\325\210\035\334\265\343_\314h\246E\014\270d\206\311\367\213\312\033\3160X\031a\330\261\205\204* Hf\007W}\033\266p\240\n\031O\330\220\204\003C\330\320\203\0044\371^\010\004P\206\350\223`E8\232\214\340\307.,\272Q\003w}\001\264\342\252A;%\344\266F\221%\000\335W\203Z:\255!\352\325\t~\200\177\206\022eBW\363\333\014\340L\310A\016Cd8b\207&6P\342\200#6 \342\204 \022\370\220`\207MQ1\202\312\253#\346\000\320\220\200A\277\202\177\252\216\237\240\014\264\221\002\256M2\255\241\340\362\235$\3604\302\260v\0139d@\205A\024\001N$X\"\000\211\005Ed\020b\302\017\031x\230\220\203\203\r\013fH\000\203A\013\013Tp8!\315\217\230\033\216\027,\330\300\001C\314\320\266t\031/0\237h+\034\336\002\357\r""\270\026\006\353\243r\005\221&W\236g\311.@8\301\214\002\337\340\014\343\246i\006t\221\215\306\302!\354\247g 9\215\353\255\221\216QY\235\236\252\010s\353\306\317yM\277\007>\005n\001\303\232H%t\332\210d{\215\314\236\202\266s\226\223V2<Cm\261 \224\265o\360\311\033y,\314'(\225L\211\323\2030.\225\370J\r\014$\215d$\031O\351)\020\352\024\330\337\035\203\214\r\374\341\333pX\3179\257\314\027\326I\316\232\354\246q\210\305.8\023\304\322\3714\262O|J\030\306\020\016\343B\301\010C\210\253,h\240\t\305L\020&\335\205\301\247\257\325\364&X\272p\030\330\000]\245u\204/.B\376\305\342\302\240\027\277\333b^,\341\267`\330\255\026v[\206]c\3417V\370\355\024~\313\306\206\330\034X\315\201\322d|f\2021\013\22314&p\230\204\300\004\366\262P\227\300[&\322\262a,\007\272r\340*\031Q\331\260\224\003E9\360\223\214\234,\314$\241%\t'\t\204$a#\216\212$<d!!\031\003Y\350\207\343\036\031\361\020\326\241\275\023;\324\021 G\300\033Cg\317\263\200\310\031\354yB\0358-\320\216\204s\004\302ak4C8\270\273\222\321\301\3168A\016\2037\002\311\324@\032\t\314\3100\206\326D\366\002'\034\035\037\241\014k\350\327Aq\274d\360\221\365\364z~\363J\306\323\027\341\307O\226\036\322\307\261C\377\001j\002q\303M\233\260\031P\276\222SC\177\\\300C]L{\302\0163\276\252\245\022Mf@\367\217\035\003\365p\344\340\211\342\367\376\261\227<4\001\201\331\020\370\331K\301\360\354lx1\360\235-\272\260$\242\217\036\331r1*\345..\330r1*\347.\332s\027\355\271A{n\320\226\273d\317]\262\347\006\355\271A{\356\252=w\325\236\373\374\271-\027\243R\356\213\027\266\\\214B\356\334\323'\017\036\205\037\370GF\314\340\270\010Xi\367\003\3019\036\236\r\274\340\241GOVWxpq\341\301\312\223\340\334\203'K\263\"\345\361\343\005G\312\322j\310\244\262\370d)\364\210\207m\245^\314\005V\216\301\214a3\360Em\260\t\304\312\020\342\245\227X\221%^\204f\321\352\003E\255\016,\t\002K\202@\220\021\010r\002AQ$4\013\023D\034\265\350Yi\026Q3m)\260\344,&Gi\236\035\224(\315A\t\322\234\224 \211GWYgWygW\355\303[\025}_\r\332gs6tl5\364\200\361|6\364\342\351\\8\020\224c\263\263rl\336\226\367\350""\221\034[\\\260\305\026m1[\275%[\354\251-\026\264\305Vm\261\347\317\345\330\013\340m t,\024\306s\326?>Y\002\276\204\361kai\376\31110I\017\002\217\255\2540\0142\034x\274\000R\032\024L\300\t3\247\021\303\263\2410\236\335\342\231-\233\005+J\323`E\347\355\2714\021V\224fB\212.\332\243\366\272K\366\350S{4h\217\256\332\2434!V\024gd\3651\214\372\217O\346\347\203s\241cOVf\027\226`\032H\253\003/\202\341\373+\\\257(\266\260$\307 oy5\260\022\232[\021\271<\356j\240\275\2261f\0279\030\004\323\177\212\245\300w\321S*,^C\n\177}\010\313K\002N\003$\244\207\247\270W\026\236d\016[X B\345+Q\224\236\235\246\362\203d\270\177\206\006\331\205\326_\264I\363\331\035\367F\305<\034\223:x\314V\323\352\222\324\273\301c\000\030\250X\355\022i\357\336\372\217\265=\343\247+P\245y\331\247\364\005E\303\263s\363\201\325\307\240)\213O\027\255\330#\020o\021\371vu\361\251\025c\262&\242O\347VB\001X_DB\350\217V\030m\222\210<\237\233\373\003\352\247H\000\3735\277\360Pj\350i`%8\267rt,c>t8\255\2023\025\246H#)9\232fT\376\232\303\206\355I=:\346V\255r\354z\336\377\356\253c'O\375cg/\230\355\250\236:\267\367c\256#\327]=\241\344?\311o\027:\252'>\371\307\333lO6P=\365\331\336\366\273S\307N_\312A\261KP\344\324\305\354v\365TO\326\017\251'O\357\235\334[\315\366g\375\325Sg\367\276\313.g7s\313\325S\237\356\335\313u\347\372\253\235\347\2637\262\353\271\343\271\261\\$\337\235\277\221_\007\312\235\237\003\245\263]\331\343P\251\023\210W\273\372\262?\346;\252\275\027\252w\246K\375\007\216\264o\356\225TgZ\340A\331\177\000\304\373\217\204N_V\255\236\355\316vW;\317\"\321\257r\201jWw\365\346P\341a\321_\234+u\277\373\030'\312\330\363\363i\252v\316\224VJ\333\007'>\335\363\357=\314\336\315\005\376\021\250^\374\274\252\364\277\0339v\272so\202u\tg\350\343c\247=\371\315\302rA\305I\271\233}\000S\3279\220\367\026\372\013\223\305n\354\216\221\035\203\346\273.f\215\312\027\276B\244\330S\014\330\223s\367\n=\205\007\205t\261\267\030\252\334}\274\377`_\257\254\004\2452\335\325\336\317s\347\362\021(\026\300\340\211\334R\341z!X\354\240H\345\312""\355\202^\274^\\\206\276\234\355\332\333\255|>T\010\024\226\221\364\266\255\241mG\263\277gD\244\324+\225+T\267\265$h\357\334\305l$w>7\236{\003\"\3651\033\\\223\341\237/N\224\216\227\374,k<\233A^@\337db\231\374\203\3746N\357x\366o\371`\341xa\264\020*\366V&\036\355\037\337\037\333Wq\316;\367\356Vz\275\205\216B\267`\303\027\271\241\274\232\337)<+\372\221\025\343@\336\317\210\374\025\350\351\205\033\205Xe\352ay{\277\203\225\366A\355\276\302Nq\331Q\372\357l\242\261P\327\33660~`\244\330\001\252t\372Bv!\267\234\333\310\2030@\346\371\236j7dT?\273\232[\306\334\276\354\213\234\232\003\275\351\312\236\310.\345\373\221\352d\366b\216\346w'\033\004\251\352\272\002\214\303\211\351+\032\245\211r\307A\367\305\254\016J\324\005#\250\366*\371s\005\025\372\363\2544^\312\224\003\007\275_\344p\\\335\275\230y-\227\200)\177V\234*\365\233%\215\342d\251\267\264Z\356?\020U\237\227f\313'\313\313\250\314\235\3208*7\316\316\001(\364n\276#\337\215}\272C\3748\357\201\031\356\352\315\316\201\272w\341\277\2039\230\0326\263\254\004S$\224\032\321\355\213\245\023\245\2712j\313\331\213\331D>\220\177V\270\213\374\246\222\227iB{\013\317!\205\327\030\207.\205J\027@+E\302\353b\264t\263\204\263\372\345H\361\\I}w\031[\234\312^\317.\233\014_\316\023\207/\347zs\177\002\366\202E\352\315\275,\364c\240'w?\247\242\035\n\202\002\216q\273\243\242\001\323\263\003\240zi(\272\202<\300:\337\203@F\213\003\305\207%\222\207\261\275u0\203\235\275\331\0000\n'3T\304\221\234>\203\346\352\023\250\324\325m\376\353\315>\006\353\001_\310F\361U\351\345s\306Sy\031\230\301\003\350\300_A\216qR\013'\ns(\253\363\345\215}\264\032\327\276|7p\354tOv0\347\207\0225\302\201\223\247g=\300\205\276\337\025\374\250\317'\301\274\202\341\352\275pp\367\353\022\n\300\331K\240\373L\260\307\213\231R\2001il/\222\355\346\334\245.\345'a\362C\305\013E\225\304\363\263\256j'R<}\006\247X\264\177\032G\373i\336\237\237\007}\240\231\023\035?Y\031\376v\377V\345\3512\325?{N\324\277%\325\307y\334\314\2025\340sv\036\372~>w'?\n\2620\n\274\277_T1q07\232\373\001\330\255""\027\373\261\273Ls\242\371~SsL\322\003\316\256\235\201\201L\200\034]\206\261n7\350\036\014O\352\341\02572\223\205\013\300\377~'\221\205\375\276\375m\223\306\271\317\252\335\347\005\031\305\235L_a\027\004?\340$4W~\266\357w\016\350s7\022w\013\263`(\032\016\306\255~o\366\017\271\355\374\307\371h\241\337\311\222\232y;M\213o\264\320\337\032K\257\271\325\277\2115P-\2344\036\226w\366yO\207\240\3769$bR\032\025\224\230\\Nd?\001\233>\233?]\370\274\330\r\263\337y\026\215\310[ \177\013\364q\003\264q\262\334\207\364Pvg@\205P\356\013s\025\377C\226hJg\177\023r\325\336/s\177.\334*~R|]\332(\317\357\003\032hN\357\002\237\321\rd\010(\347U\004I}\330\3168ha\277\213U\004&,R\337O\026\330\014\200\270|6\000\n|\026\255\263\317a\274\376\n6\3619[:\230\371\352)\334G-\273\224\273\002fm\323\\\232\306\366\242\320Xgw\2667\3732\337\377[\260V\226,\177v%\347\257\302G\240z\3662,M\347`\230\325.X\342\330\307\005\034z\327\355\3026\313\000\376C\237.fc0\253\035\330\355)0\007\027@\321o\200\301zS\370\013\214\245s\250\260X\352FD\266\231[\205y<U<U:[\376n\037L\010\260r\2642z\277\334_\036/o\233\342\000\0057\020\321l\027\317\300R'\254#0\3755X\372.>\370>B\241f\342\245\334E\254\311\277\256\3456\363\313&\246\260\300\032Z\326\3570\343B\366Yn\n\204}\247\360]\361\273\322\313}oe\345y\345\371w\314\322\326)\323\177p\352\314\336 b\340\317\010\022\\\005!{7\204\002\365-,\372;y&\033]\327M\301\360\242\000\324\360\034\227(=w=\027\312_\005\251\260\226;&\001\260\330\231\202\363\353\n\203d2\254\021\335B4dd\357\200\246?\310\275\316\253\365\262GsA\364/\0206\215\202\361?\317{i\332\2273\305[\245\216:\226\264za\274\270PZF\205\224l\340C\010\314\346I[\257\241\205F]\375\0334r<\357\257\325W\350\323\3647%\364[\354K\026\255\225\210\241\325\352\005\320\371\374\037\010,\315\227o\224\265}*}\301\271\204r\270\257\274\007\334?\n\200\335&\252e\200\025\272\376\245r\344]\317=\001\303\032h%\245\305~\027\377^V\031\346\024\335\006\264\344;b\007Kr\236\036\000f\036\257L}\273\177}?\010\022\316\374\245C\372X_A\373\376C\371Xm\315\343/\344`\215\201\271\271Q""\231\\\330\357\001\357s[8X\267\200\205\333\3558X\026K\333\360\257.\177\301\326`\306tS\247\003\\\243A9\257U\256\342\202p\002\\\365\336\022\221\033\245=\r\263c\336\374n\261\003\234*\000\214\236\374\337\212\313\305W\245H\371|\331\317V$\276:\373\205\305D[\344\205\336&\300[:Q\236\333\267\343\0352\202\3050B\n\350\033\230\000_m\337,{s\246\035\245B\230\034\002\023c\027\010+\007%t\333%\207qH\255\311\361\323\264_\227l\307\001\345\214\303\222\320{\221\226\032\364%\262\241\334\227\205\016\026\2005\211\005\256\301H\244\000\205+\227\300\354\300\204[Z\201\324\276\311\247\251\317\307\213c\305H\251\247$\013j\177\2767\377\022`Y\327\345\312e\304]\263\305\217`\331\"'\300\254\332\003\211nU\255\374\007\244ZA\024\332v%^\232\322\023\225\361\207e}\177`?\320\242\344\277\311\245\241\3678\267M\244\373/\304\202\223b\n\272\353\311\367\001\0257\0201\365@\027#9Z\220\357g\243\271\333\005\224\026\300{\177\312\363\300\017\260|I\001\nW.x\013\035 R\237\335\200\264\316\256\354I\224\334\263\370\357\266\277\330\315\234\311_R\032g]s\202\240\"n9\376\374\254#\307M\032\373\300k?\201\346\r\323\322\334\307\347\301\037\254T\n\202T~\001\200\"T\351\037/\326\227\313\023\305Yp\317f\313\035M\344\262\337.\223n\325\\\363\217B&\347*\313\301J0\324\246d\236h\266\224\232\222\031\302\255C\264\215\207\224\314\236\354(\267\r<\210FA\016\022\000\007\276T\256\342^X\003\t\265C\246Z\t=\325\326j\356\004Fl\263\264\273\320\357,\210<\256o;\233\3507NwO~\216\340\267s`\263\345\373eD\203v<\365\233\030WS\351he\\\375\223\270\352w\277\273a\312\315%\006\320\245\205s\274r\2216Z\261\261+\340\025\r\344\003RC\275\331\331\334G\271\033\271$\203\253\250\241S\271\376\234\237\341\365>\233\203\354\227\235\026p\303_\221&\315\226N\342\242^w\t\356\007\250\205\373\"\202\320\005\370\300]\213\236\3547Df\023\234\264\347\216\375\031\356\312\374a\177\262\262\274\002\276\n\214\257\027\367\361s\317\362\344\304\3759\327\177@\333\256-~\324\220\200\366\331\346mg\037\251\223\031\263'\272\346}\236;\216\363\2032\3639m\031,\363H\345\"\t\006\213]\250\364\336\200\274P""\341\n\251\366K\234\213w\235\356\351\325\253\337\224\002\266}\276\232-\301\352u\\\333\0179\215\213\373\317\300zA\373]f\373(K\235\340\227\235\310/\222\355\371\242\03488\325\225=\005\266\375a\376\016m\364\376T\356-\363]\243\253@\017\367\311\231\257x\215\013\301\247\270\362\201\273\0175XG\231\021\0132P\326d\233\302F\262z\0167,\300\363W\331\007\372x\325.\334\235\307\214ww\230\327\3706\327\235\363\202\303\332y97\010\253\025i\317\231\003\276C\024\220\267(:p\267\343\273\3743\030G\246\310\221\352\373\364\345\335\377\352h\320\324\265\\4\177\035\030z\241\240\2727%mY^\255\245=$O'[pu\276\321r\256\034\005_'TY~Vy\366\274\301\204V\007P\307:\211\320\245\334\245\274\017\340t\267\253\227\216\306\003\204K\336\316\355\302>\235\377\022\267!p\016h\357\210v\207(\324\215\375\244\217>d\n~\240%\245\3118K\233\037\200|.\346:r\227af\036\201\370?/\006`\341\342\211\227h\3674P\370\241\344\007\311\354F\274\332\233\013\201UcP\343\270\265#\356\234\265\342\237\312}\345\355\243\351 n8~^\270\210\274\302\203\224\323\205k\340j\034\2523\250?\264\243\201G\003}\027I\237)>\217\223\t\036\360\001\355xL\346\373\362\254\357|\353\234o\267t\343\206\365y%\337Q\355\271\224\353fRU\355\274\221\377\266@\275\334\001\3234U\360\200'\264SZvc7\t\222\260\304\335\346YDW\366\243,|)d\004\226\245\200\271\222\235'\211\303ST\333\346\350\320h\361FQ-\276.E\3137\310\357\243s\247i:\353\352\304\311<\313-\236\034\006\343q\340\\?\357\227\007\300~\230\375\252\343\t\036\234\272\345\\a]|\3053\270V\356\202\205\005\334\010L\353.\334\"\324\016=\277]\271\035(w\227o\355\037\00716c7\312\221}\\\331\272Gp\267\2624\017\331\035\270\301\211\221\331\362\307e\325\315\034>\332\377x_\345g/\375\371\213\205\217@yh\350~\262\252\331Xn'\277\222\177]\330,\256\024\267\017\316\362E\2407;\237\033\310=\006\374\270^\374\0048\264R\262\366>\230 \340^\"\333\010yw\316\271\267(\366\256U\263\364c<\321\343k\005\355\350\325\232d\240u\345*+\315v\261;\240\374y3\332oV^\244\303\203x\021\023\3169\023\304\346\330x\376/ \341Fif\277\303\354BM\362A\377\000J\360\023r\006:ai\3570)<a""\370\243\246\203(\326\327\314\225Aa\347\226\347M\004#\016\003\277\004k3\\\000\377\376Z\345\032n\005\234.\235/\215\226\236\227\037\356\217\355\257W\236.K\273|\277\325]U\261\206\2623\004\261\032\016\330\317\020*\027\261\316'\205m\3673\320O\315c\335\276J\037#~\237\304\351\265\271\343\301\016I7A\376\266\3775\016JI\231\034rp\215\001\311\257A\376\365\274\247\320]/{=\177\034\014^\277\211\245\210\355\314\312Z\021\006\245nB,Z\030.n3\\\372\271d\250\020\342\301\260\247\263+\222E\021F\256\352\037+\322\016\361\265\\\020\024\016\215\375G\205\201B\000\267\232\244]\247\277\203\035|S\322\321\216\325\356:1\033\376\n:\340#\227\362$\341\"\320\303s{\241\3545d\203$\275~!\344'\212\004\306\336\200\335\364V\006&\021\305\035\234:\267Gl$\346.WY\264\013\357\367\320\007a:\010\261r\247\317\340u\225.\340\371MtG\350\002\014^\251\351\304\262,\332\303\267Y\331\235\035\026\202\014sF\377\216\033\200\002\235\"\327:\2305\262b\325~\350+\233\320\361\275t\326\272\217\341&\274\274\004\032\311\037\371%\006\356\265\350\331\033\331\237\362\3355n\302\021K\233\351\020T/]F\347\344W\330Y\374\241<\271\337-v=\333\352@C!kwk\223\341\211\356~\230\363\036\374 X\301\260\005F\317\342\0350\020\240G\035\354J\310T\216\035\276^\316}\005\000\266\367*@\215\257\013?\226>.\375\264\177a_u\036\276\222R\363^\365d\247\331Y\335n\376\323\302t\361\217\245?\357\337\334\337>p\240\313\373\270\362\232\322\324\307\024\034\235\255`\2766\365>\3365\373G\300\341oZ\321\001\204W\270\222Y'V: lP\272\203k_\232df\300v\214\341\032W\234*\335*w\210\372\225\236\033\314%\253z\246K\375\334\326\260\304\037\212\376\342B\351Y\331\317\326\350NF\350\036\030\005\000\256.i\013Elr\340:\216\325\310\376\036\272\020D\215\201\024\263\023,\355\034\360u\027\301\006\263]\334\364\331{\300\215a\177M*\332@\350\320\301\345/X3_\303\344\364\320\035\245S\274\353\267\330\206;\224\271r\225\225\371\306\234\017\0165\272\3662\200:\247h5\377[qY\014\305\013 F-\320=\214]\360\354\036\344\336\202\237\366\254x\267\024(a\241\253\236\374\033\340\3139\3417\014\002\367\037\026\375-x\016\225""\023\210\275O1\241\360\027\002\334\252\3405%\006\023\310\303<\007k\226\370\252t!\214\244\335\246\312\t<\233f\207\203R\361\263 g\360\365\251-\321\215\206H\345eNf\227+'\256\201\205VMct\023\214\256\207\316,u\260\\\004*\360\016C?\333H\243\313TX#\206\253\354\321v\343V>Q\3443\303.u-W\216\r\344\361\030\242\235\273\2347q\223\006\375t\351B\247\375j\347\231\246W;?\243\035\036:V\377\210\344\364\270\271\223z\340\226X\355B\237\252\301\335Ov?\223\356b\266|\247\363\367\000\322\177\256\373\242\355\321n\377\016\351\327\000Q\227\017N\323:\215\n\324q@_\247@a\357\026\036\321)\211u\301\364\377\003\210\212\330\250";
    PyObject *data = __Pyx_DecompressString(cstring, 11362, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (48422 bytes) */
const char* const bytes = ")02d-%02d%02d-%02d:%02d:%02d-%02d:%02d:%02d.%06d%02d:%02d:%02d.%06d%02d:%02d:%02d+%02d%02d04d%06d06d2d%.7fA drop-in replacement for the standard `<'datetime.datetime'>`\n    class, providing additional functionalities for more convenient\n    datetime operations:\n\n    - 1. rich calendar arithmetic (to_month, to_start_of, to_first_of, etc.)\n    - 2. powerful parsing (parse, ISO, ordinal, isoweek, etc.)\n    - 3. explicit, safe timezone conversion with fold & DST normalization.\n    '.\nAccepts: .\nAccepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'Adjust the date and time fields with new values,\n        without affecting the timezone `<'Pydt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..9999].\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :returns `<'Pydt'>`: The resulting datetime with new specified field values.\n\n        ## Equivalent\n        >>> dt.replace(\n                year=year,\n                month=mon""th,\n                day=day,\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        Adjust the date to day (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The day offset (+/-).\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_day(-10)  # 10 days ago\n        >>> dt.to_day(10)   # 10 days later\n        Adjust the date to the specific weekday of the current week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the current week.\n\n        ## Example\n        >>> dt.to_curr_weekday(0)      # The Monday of the current week\n        >>> dt.to_curr_weekday(\"Tue\")  # The Tuesday of the current week\n        Adjust the date to the specific weekday of the previous week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the previous week.\n\n        ## Example\n        >>> dt.to_prev_weekday(0)      # The Monday of the previous week\n        >>> dt.to_prev_weekday(\"Tue\")  # The Tuesday of the previous week\n        Adjust the date to the specific weekday of the next week `<'Pydt'>`.\n\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=""Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime in the next week.\n\n        ## Example\n        >>> dt.to_next_weekday(0)      # The Monday of the next week\n        >>> dt.to_next_weekday(\"Tue\")  # The Tuesday of the next week\n        Adjust the date to the specific weekday of the week (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The week offset (+/-).\n        :param weekday `<'int/str/None'>`: Weekday value. Defaults to `None`.\n\n            - `<'int'>`  Weekday number (0=Mon...6=Sun).\n            - `<'str'>`  Weekday name in lowercase, uppercase or titlecase (e.g., 'Mon', 'dienstag', '\346\230\237\346\234\237\344\270\211').\n            - `<'None'>` Retains the original weekday.\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_weekday(-2, 0)     # The Monday of the week, two weeks ago\n        >>> dt.to_weekday(2, \"Tue\")  # The Tuesday of the week, two weeks later\n        >>> dt.to_weekday(2)         # The same weekday of the week, two weeks later\n        Adjust the date to the specified month and day in the current year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current year.\n\n        ## Example\n        >>> dt.to_curr_year(month=\"Feb\", day=31)    # The la""st day of February in the current year\n        >>> dt.to_curr_year(month=11)               # The same day of November in the current year\n        >>> dt.to_curr_year(day=1)                  # The 1st day of the current month\n        Adjust the date to the specified day of the previous month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous month.\n\n        ## Example\n        >>> dt.to_prev_month(31)  # The last day of the previous month\n        >>> dt.to_prev_month(1)   # The 1st day of the previous month\n        Adjust the date to the specified day of the next month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next month.\n\n        ## Example\n        >>> dt.to_next_month(31)  # The last day of the next month\n        >>> dt.to_next_month(1)   # The 1st day of the next month\n        Adjust the date to the specified day of the month (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The month offset (+/-).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_month(-2, 31)  # The last day of the month, two months ago\n        >>> dt.to_month(2, 1)    # The 1st day of the month, two months later\n        Adjust the date to the specified month and day in the previous year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            ""- `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous year.\n\n        ## Example\n        >>> dt.to_prev_year(month=\"Feb\", day=31)    # The last day of February in the previous year\n        >>> dt.to_prev_year(month=11)               # The same day of November in the previous year\n        >>> dt.to_prev_year(day=1)                  # The 1st day of the current month in the previous year\n        Adjust the date to the specified month and day in the next year `<'Pydt'>`.\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>`  Month number (1=Jan...12=Dec).\n            - `<'str'>`  Month name in lowercase, uppercase or titlecase (e.g., 'Jan', 'februar', '\344\270\211\346\234\210').\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next year.\n\n        ## Example\n        >>> dt.to_next_year(month=\"Feb\", day=31)    # The last day of February in the next year\n        >>> dt.to_next_year(month=11)               # The same day of November in the next year\n        >>> dt.to_next_year(day=1)                  # The 1st day of the current month in the next year\n        Adjust the date to the specified month and day in the year (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The year offset (+/-).\n\n        :param month `<'int/str/None'>`: Month value. Defaults to `None`.\n\n            - `<'int'>` Month number"" (1=Jan...12=Dec).\n            - `<'str'>` Month name (case-insensitive), e.g., 'Jan', 'februar', '\344\270\211\346\234\210'.\n            - `<'None'>` Retains the original month.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_year(-2, \"Feb\", 31)  # The last day of February, two years ago\n        >>> dt.to_year(2, 11)          # The same day of November, two years later\n        >>> dt.to_year(2, day=1)       # The 1st day of the current month, two years later\n        Adjust the date to the specified month-of-quarter and day in the current quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current quarter.\n\n        ## Example\n        >>> dt.to_curr_quarter(month=1, day=31) # The last day of the 1st quarter month in the current quarter\n        >>> dt.to_curr_quarter(month=2)         # The same day of the 2nd quarter month in the current quarter\n        >>> dt.to_curr_quarter(day=1)           # The 1st day of the current month-of-quarter in the current quarter\n        Adjust the date to the specified month-of-quarter and day in the previous quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clampe""d to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the previous quarter.\n\n        ## Example\n        >>> dt.to_prev_quarter(month=1, day=31) # The last day of the 1st quarter month in the previous quarter\n        >>> dt.to_prev_quarter(month=2)         # The same day of the 2nd quarter month in the previous quarter\n        >>> dt.to_prev_quarter(day=1)           # The 1st day of the current month-of-quarter in the previous quarter\n        Adjust the date to the specified month-of-quarter and day in the next quarter. `<'Pydt'>`.\n\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the next quarter.\n\n        ## Example\n        >>> dt.to_next_quarter(month=1, day=31) # The last day of the 1st quarter month in the next quarter\n        >>> dt.to_next_quarter(month=2)         # The same day of the 2nd quarter month in the next quarter\n        >>> dt.to_next_quarter(day=1)           # The 1st day of the current month-of-quarter in the next quarter\n        Adjust the date to the specified month-of-quarter and day in the quarter (+/-) offset `<'Pydt'>`.\n\n        :param offset `<'int'>`: The quarter offset (+/-).\n        :param month `<'int'>`: Month of the quarter, automatically clamped to `[1..3]`.\n            Defaults to `SENTINEL` (retains the original month-of-quarter).\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime.\n\n        ## Example\n        >>> dt.to_quarter(-2, 1, 31)  # The last day of t""he 1st quarter month, two quarters ago\n        >>> dt.to_quarter(2, 2)       # The same day of the 2nd quarter month, two quarters later\n        >>> dt.to_quarter(2, day=1)   # The 1st day of the current month-of-quarter, two quarters later\n        Adjust the date to the specified day of the current month `<'Pydt'>`.\n\n        :param day `<'int'>`: Day value (1-31). Defaults to `SENTINEL` (no change).\n            The final day value is automatically clamped to the maximum days in the month.\n        :returns `<'Pydt'>`: The adjusted datetime in the current month.\n\n        ## Example\n        >>> dt.to_curr_month(31)  # The last day of the current month\n        >>> dt.to_curr_month(1)   # The 1st day of the current month\n        Adjust the date with new values, without affecting other fields `<'Pydt'>`.\n\n        :param year `<'int'>`: Absolute year. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..9999].\n        :param month `<'int'>`: Absolute month. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..12].\n        :param day `<'int'>`: Absolute day. Defaults to `SENTINEL` (no change).\n            If specified (greater than `0`), clamps to [1..maximum days the resulting month].\n        :returns `<'Pydt'>`: The resulting datetime with new specified date field values.\n\n        ## Equivalent\n        >>> dt.replace(year=year, month=month, day=day)\n        Adjust the time fields with new values, without affecting other fields `<'Pydt'>`.\n\n        :param hour `<'int'>`: Absolute hour. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..23].\n        :param minute `<'int'>`: Absolute minute. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..59].\n        :param second `<'int'>`: Absolute second. Defaults to `SENTINEL` (no change).\n            If speci""fied (greater than or equal to `0`), clamps to [0..59].\n        :param microsecond `<'int'>`: Absolute microsecond. Defaults to `SENTINEL` (no change).\n            If specified (greater than or equal to `0`), clamps to [0..999999].\n        :returns `<'Pydt'>`: The resulting datetime with new specified time field values.\n\n        ## Equivalent\n        >>> dt.replace(\n                hour=hour,\n                minute=minute,\n                second=second,\n                microsecond=microsecond,\n            )\n        Adjust to the specified fractional seconds precision `<'Pydt'>`.\n\n        :param precision `<'int'>`: The target fractional seconds precision (0-6).\n        :returns `<'Pydt'>`: The datetime with adjusted fractional seconds precision.\n\n        ## Example\n        >>> dt = Pydt(2024, 10, 15, 0, 12, 34, 456789)\n        >>> dt.fsp(3)  # Millisecond precision\n        >>> 2024-10-15 00:12:34.456000\n        Argument 'sep' cannot be None.Cannot add delta to ndarray[%s].\nSupported resolutions: 'ns', 'us', 'ms', 's', 'm', 'h', 'D'.Cannot compare naive and aware datetimes:\n  - datetime1: 'Cannot compare ndarrays with different lengths.\n  - arr1 length: Cannot convert 'Cannot convert Cannot convert array from datetime64[Cannot convert ndarray[Cannot convert '%s' to non-negative float: contains more than one decimal point.Cannot convert '%s' to non-negative float: no digits found.Cannot create date using custom 'dclass' Cannot create datetime using custom 'dtclass' Cannot create time using custom 'tclass' Cannot create timedelta using custom 'tdclass' Cannot parse 'Cannot parse '%s' to float: contains more than one decimal point.Cannot parse '%s' to float: contains more than one negative sign.Cannot parse '%s' to float: contains mixed positive and negative sign.Cannot parse '%s' to float: contains more than one positive sign.Cannot parse '%s' to float: negative sign found after digits.Cannot parse '%s' to float: negative sign found after decima""l point.Cannot parse '%s' to float: no digits found.Cannot parse '%s' to float: positive sign found after digits.Cannot parse '%s' to float: positive sign found after decimal point.Cannot parse '%s' to integer: contains more than one negative sign.Cannot parse '%s' to integer: contains mixed positive and negative sign.Cannot parse '%s' to integer: contains more than one positive sign.Cannot parse '%s' to integer: negative sign found after digits.Cannot parse '%s' to integer: no digits found.Cannot parse '%s' to integer: positive sign found after digits.Cannot perform addition on ndarrays with different lengths.\n  - arr1 length: Cannot perform multiplication on ndarrays with different lengths.\n  - arr1 length: Cannot perform subtraction on ndarrays with different lengths.\n  - arr1 length: Cannot subtract naive and aware datetimes:\n  - datetime1: 'Check whether is in the future `<'bool'>`.\n\n        ## Equivalent\n        >>> self > datetime.datetime.now(self.tzinfo)\n        Check whether is in the past `<'bool'>`.\n\n        ## Equivalent\n        >>> self < datetime.datetime.now(self.tzinfo)\n        Construct a UTC-aware datetime from a POSIX timestamp (timezone-aware) `<'Pydt'>`.\n\n        :param ts `<'int/float'>`: POSIX timestamp.\n        :returns `<'Pydt'>`: A UTC-aware datetime.\n\n        ## Equivalent\n        >>> Pydt.fromtimestamp(ts, tz='UTC')\n        Construct a current `local` datetime (timezone-naive) `<'Pydt'>`.\n\n        ## Equivalent\n        >>> Pydt.now(None)\n        ].\nConversion limits to units between: 's', 'ms', 'us', 'ns'.Convert timezone-aware datetime to another timezone `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Convert to UTC timezone and localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resultin""g datetime representing the `same`\n            datetime expressed in the target timezone.\n\n        ## Equivalent\n        >>> pandas.Timestamp.tz_convert(tz)\n        \342\206\222'D', Datetime '%s' is already timezone-aware.\nUse 'tz_convert()' or 'tz_switch()' method to convert to the target timezone.Datetime '%s' is timezone-naive.\nCannot convert timezone-naive datetime to the target timezone without a base timezone (base_tz).Datetime '%s' is timezone-naive.\nUse 'tz_localize()' method to localize timezone, or use 'tz_switch()' method to convert to the target timezone by providing a base timezone.Delta 'unit' cannot be None.Delta 'unit' cannot be an empty string.Expects 1-D ndarray, instead got %d-dimensional array.Expects an instance of 'datetime.tzinfo', instead got 'Expects an instance of 'np.datetime64', instead got 'Expects an instance of 'np.ndarray[datetime64[*]]', instead got 'np.ndarray[%s]'.Expects an instance of 'np.timedelta64', instead got 'Expects instance of 'np.ndarray[timedelta64[*]]', instead got 'np.ndarray[%s]'.Expects 'ndarray[datetime64[*]]' or 'ndarray[timedelta64[*]]', instead got 'ndarray[%s]'Fail to convert timestamp '%s' to UTC calendar time.Fail to convert timestamp '%s' to local calendar time.Failed: <'ndarray[datetime64[Fractional seconds precision must be between 0...6, instead got %d.Localize timezone-naive datetime to the target timezone;\n        or timezone-aware datetime to timezone naive (without moving\n        the date & time fields) `<'Pydt'>`.\n\n        :param tz `<'tzinfo/str/None'>`: Target timezone. Defaults to `None`.\n\n            - `<'None'>` Localize to timezone-naive.\n            - `<'str'>` Timezone name; or `'local'` for local timezone.\n            - `<'datetime.tzinfo'>` A subclass of `datetime.tzinfo`.\n\n        :returns `<'Pydt'>`: The resulting datetime localized to the target timezone.\n\n        ## Equivalent\n        >>> pandas.Timestamp.tz_localize(tz)\n        \342\206\222'M', NoneNote that Cytho""n is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Only supports arrays with units in ['ns', 'us', 'ms', 's'], instead got '%s'.Perform ceil operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to ceil to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pandas.Timestamp.ceil()\n        Perform floor operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to floor to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pandas.Timestamp.floor()\n        Perform round operation to the specified datetime unit `<'Pydt'>`.\n\n        :param unit `<'str'>`: The datetime unit to round to, supports:\n            `'D', 'h', 'm', 's', 'ms', 'us'`.\n        :returns `<'Pydt'>`: The resulting datetime.\n\n        ## Equivalent\n        >>> pd.Timestamp.round()\n        _Pydt.ceil (line 2267)_Pydt.day_of_month (line 2536)_Pydt.floor (line 2295)_Pydt.fsp (line 2324)_Pydt.is_future (line 3289)_Pydt.is_past (line 3279)_Pydt.isocalendar (line 2359)_Pydt.round (line 2231)_Pydt.timedict (line 618)_Pydt.timetuple (line 680)_Pydt.to_curr_month (line 1204)_Pydt.to_curr_quarter (line 1055)_Pydt.to_curr_weekday (line 1353)_Pydt.to_curr_year (line 896)_Pydt.to_date (line 1547)_Pydt.to_datetime (line 1496)_Pydt.to_day (line 1465)_Pydt.to_month (line 1273)_Pydt.to_next_month (line 1259)_Pydt.to_next_quarter (line 1128)_Pydt.to_next_weekday (line 1389)_Pydt.to_next_year (line 972)_Pydt.to_prev_month (line 1245)_Pydt.to_prev_quarter (line 1107)_Pydt.to_prev_weekday (line 1371)_Pydt.to_prev_year (line 947)_Pydt.to_quarter (line 1149)_Pydt.to_time (line 1574)_Pydt.to_weekday (line 1407)_Pydt.t""o_year (line 997)_Pydt.today (line 235)_Pydt.tz_available.__get__ (line 2690)_Pydt.tz_convert (line 2863)_Pydt.tz_localize (line 2825)_Pydt.utcfromtimestamp (line 403)_Pydt.utctimedict (line 649)_Pydt.utctimetuple (line 713)Return `UTC` time dictionary compatible with `time.gmtime()` `<'dict'>`.\n\n        ## Example\n        >>> dt.utctimedict()\n        >>> {\n                'tm_year': 2024,\n                'tm_mon': 10,\n                'tm_mday': 11,\n                'tm_hour': 6,\n                'tm_min': 15,\n                'tm_sec': 6,\n                'tm_wday': 4,\n                'tm_yday': 285,\n                'tm_isdst': 0\n            }\n        Return `UTC` time tuple compatible with `time.gmtime()` `<'struct_time'>`.\n\n        ## Example\n        >>> dt.utctimetuple()\n        >>> time.struct_time(\n                tm_year=2025,\n                tm_mon=11,\n                tm_mday=6,\n                tm_hour=8,\n                tm_min=50,\n                tm_sec=9,\n                tm_wday=3,\n                tm_yday=310,\n                tm_isdst=0\n            )\n        Return `local` time dictionary compatible with `time.localtime()` `<'dict'>`.\n\n        ## Example\n        >>> dt.timedict()\n        >>> {\n                'tm_year': 2024,\n                'tm_mon': 10,\n                'tm_mday': 11,\n                'tm_hour': 8,\n                'tm_min': 14,\n                'tm_sec': 11,\n                'tm_wday': 4,\n                'tm_yday': 285,\n                'tm_isdst': 1\n            }\n        Return `local` time tuple compatible with `time.localtime()` `<'struct_time'>`.\n\n        ## Example\n        >>> dt.timetuple()\n        >>> time.struct_time(\n                tm_year=2025,\n                tm_mon=11,\n                tm_mday=6,\n                tm_hour=16,\n                tm_min=48,\n                tm_sec=57,\n                tm_wday=3,\n                tm_yday=310,\n                tm_isdst=0\n            )\n   ""     Return the ISO calendar `<'dict'>`.\n\n        ## Example\n        >>> dt.isocalendar()\n        >>> {'year': 2024, 'week': 40, 'weekday': 2}\n        Return the number of days since the 1st day of the month `<'int'>`.\n\n        ## Equivalent\n        >>> dt.day\n        Seconds value must be finite, got '%s'Supports: 'D', 'h', 'm', 's', 'ms' or 'us'; got None.Supports: 'D', 'h', 'm', 's', 'ms' or 'us'; got '%s'.Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' or Month/Weekday name; got None.Supports: 'Y', 'Q', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us' or Month/Weekday name; got '%s'.Supports: 'Y', 'Q', 'M', 'W' or Month name; got None.Supports: 'Y', 'Q', 'M', 'W' or Month name; got '%s'.Supports: 'one', 'both' or 'neither'; got '%s'.The available timezone names `<'set[str]'>`.\n\n        ## Equivalent\n        >>> zoneinfo.available_timezones()\n        The size of a new array must be a positive integer.Timezone offset Unsupported conversion unit '%d' for timedelta64.Unsupported conversion unit '%d' for timedelta64 array.Unsupported datetime resolution '%s'. Accepts: Y, M, W, D, h, m, s, ms, us, ns.Unsupported numpy time unit (NPY_DATETIMEUNIT enum) 'Unsupported time unit \342\206\222'W', \342\206\222'Y', []]'> ,(?., -%: ' add(...)add_note\n  - arr2 length: arr_div_ceil: division by zero.arr_div_ceil_mul: division by zero.arr_div_down: division by zero.arr_div_down_mul: division by zero.arr_div_even: division by zero.arr_div_even_mul: division by zero.arr_div_floor: division by zero.arr_div_floor_mul: division by zero.arr_div_trunc: division by zero.arr_div_trunc_mul: division by zero.arr_div_up: division by zero.arr_div_up_mul: division by zero.arr_mod: division by zero.' at position bool | Noneceil(unit)combine(date, ...)combine(time, ...)cython.bintcython.intcython.longlong\n  - datetime2: 'datetime.datedatetime.date | str | Nonedatetime.datetimedatetime.time | str | Nonedatetime.tzinfo | str | Nonediff(dtobj, ...)diff(..., inclusive)diff(..., u""nit)disabledt_isoformat: 'sep' cannot be None.dt_strformat: 'fmt' cannot be Noneenablefloor(unit), fold=1fold must be either 0 or 1, got %d from '] from 'fromdatetime64(dt64, ...)fromdayofyear(year, doy)fromisocalendar(...)fromisoformat(dtstr)frommicroseconds(us, ...)fromordinal(ordinal, ...)fromseconds(seconds, ...)fromtimestamp(ts, ...)fsp(precision)gc\342\206\222'h', int | floatint | strint | str | Noneisenabledisoformat(sep)\342\206\222'm', math_div_ceil: division by zero.math_div_ceil: result does not fit in signed 64-bitmath_div_down: division by zero.math_div_down: result does not fit in signed 64-bitmath_div_even: division by zero.math_div_even: result does not fit in signed 64-bitmath_div_floor: division by zero.math_div_floor: result does not fit in signed 64-bitmath_div_trunc: division by zero.math_div_trunc: result does not fit in signed 64-bitmath_div_up: division by zero.math_div_up: result does not fit in signed 64-bitmath_mod: division by zero.minimum value cannot be greater than maximum value., minutes=missing time resolution for <ndarray[%s]>. Pleae provide the `arr_reso` (NPY_DATETIMEUNIT enum) of the array.month_name(locale)\342\206\222'ms', \342\206\222'ns'numpy._core.multiarray failed to importnumpy._core.umath failed to importobject | None) out of range. Must be strictly between [-86400..86400] (exclusive)) out of range. Must be strictly between [-86400..86400] (exclusive).parse(default, ...)parse(dtobj, ...)parse_to_float: 'token' cannot be Noneparse_to_int: 'token' cannot be Nonereplace(...)' resolution is not supported.round/ceil/floor(unit)round(unit)\342\206\222's', , seconds= seconds from ( seconds from (hours= size=slice_to_ufloat: out of range (start=slice_to_ufloat: 'size' must be > 0, instead got %dslice_to_ufloat: 'start' must be >= 0, instead got %dslice_to_ufloat: 'token' cannot be Noneslice_to_uint: out of range (start=slice_to_uint: 'size' must be > 0, instead got %dslice_to_uint: 'start' must be >= 0, instead got %dslice_to_uin""t: 'token' cannot be Nonesrc/cytimes/pydt.pysrc/cytimes/utils.pxdstr | tuplestrptime(dtstr, fmt)sub(...)' ticks.\nSupported resolution: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'' ticks.\nSupported units: ' ticks.\nSupported units: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'tm_strformat: expanded output exceeds buffer limittm_strformat: failed to allocate buffertm_strformat: 'fmt' cannot be None to 'to_curr_month(...)to_curr_quarter(...)to_curr_year(...)to_date(...)] to datetime64[to_datetime(...)to_day(...)to_end_of(unit)to_first_of(unit)' to float: contains invalid character '' to int64 ']] to int64 '' to integer. Contains invalid character 'to_last_of(unit)to_month(...)' to non-negative float: contains invalid character 'to_quarter(...)to_start_of(unit)to_time(...)' to unsigned integer. Contains invalid character 'to_year(...) token_len=tz_convert(tz)tz_localize(tz)tz_switch(...), tzinfo=%r' unit to int64 '\342\206\222'us', utcfromtimestamp(ts)weekday_name(locale)AmbiguousTimeErrorAprAugConfigsDDecEEEEFebFriJanJulJunMMMMMMarMayMixedTimezoneErrorMonNotImplementedNovOct_PydtPydt_Pydt.__copy___Pydt.__deepcopy___Pydt.__format__Pydt.__new___Pydt.__reduce___Pydt.__reduce_ex___Pydt._new_Pydt.access_day_Pydt.access_fold_Pydt.access_hour_Pydt.access_microsecond_Pydt.access_millisecond_Pydt.access_minute_Pydt.access_month_Pydt.access_quarter_Pydt.access_second_Pydt.access_tzinfo_Pydt.access_weekday_Pydt.access_year_Pydt.add_Pydt.astimezone_Pydt.ceil_Pydt.combine_Pydt.ctime_Pydt.date_Pydt.day_of_month_Pydt.day_of_quarter_Pydt.day_of_year_Pydt.days_bf_month_Pydt.days_bf_quarter_Pydt.days_bf_year_Pydt.days_in_month_Pydt.days_in_quarter_Pydt.days_in_year_Pydt.diff_Pydt.dst_Pydt.floor_Pydt.fromdate_Pydt.fromdatetime_Pydt.fromdatetime64_Pydt.fromdayofyear_Pydt.fromisocalendar_Pydt.fromisoformat_Pydt.frommicroseconds_Pydt.fromordinal_Pydt.fromseconds_Pydt.fromtimestamp_Pydt.fsp_Pydt.is_day_Pydt.is_dst_Pydt.is_end_of_Pydt.is_first_of_Pydt.is_future_Pydt.is_last_of""_Pydt.is_leap_year_Pydt.is_local_Pydt.is_long_year_Pydt.is_month_Pydt.is_past_Pydt.is_quarter_Pydt.is_start_of_Pydt.is_utc_Pydt.is_weekday_Pydt.is_year_Pydt.isocalendar_Pydt.isoformat_Pydt.isoweek_Pydt.isoweekday_Pydt.isoyear_Pydt.leap_bt_year_Pydt.month_name_Pydt.normalize_Pydt.now_Pydt.parse_Pydt.replace_Pydt.round_Pydt.strftime_Pydt.strptime_Pydt.sub_Pydt.time_Pydt.timedict_Pydt.timestamp_Pydt.timetuple_Pydt.timetz_Pydt.to_curr_month_Pydt.to_curr_quarter_Pydt.to_curr_weekday_Pydt.to_curr_year_Pydt.to_date_Pydt.to_datetime_Pydt.to_day_Pydt.to_end_of_Pydt.to_first_of_Pydt.to_friday_Pydt.to_last_of_Pydt.to_monday_Pydt.to_month_Pydt.to_next_month_Pydt.to_next_quarter_Pydt.to_next_weekday_Pydt.to_next_year_Pydt.to_prev_month_Pydt.to_prev_quarter_Pydt.to_prev_weekday_Pydt.to_prev_year_Pydt.to_quarter_Pydt.to_saturday_Pydt.to_start_of_Pydt.to_sunday_Pydt.to_thursday_Pydt.to_time_Pydt.to_tomorrow_Pydt.to_tuesday_Pydt.to_wednesday_Pydt.to_weekday_Pydt.to_year_Pydt.to_yesterday_Pydt.today_Pydt.tomicroseconds_Pydt.toordinal_Pydt.toseconds_Pydt.tz_convert_Pydt.tz_localize_Pydt.tz_switch_Pydt.tzname_Pydt.utcfromtimestamp_Pydt.utcnow_Pydt.utcoffset_Pydt.utcoffset_seconds_Pydt.utctimedict_Pydt.utctimetuple_Pydt.weekday_name__Pyx_PyDict_NextRefSatSelfSepSunTThuTueWWedY_absoluteaccess_dayaccess_foldaccess_houraccess_microsecondaccess_millisecondaccess_minuteaccess_monthaccess_quarteraccess_secondaccess_tzinfoaccess_weekdayaccess_yearadd__all__asastimezoneastypeasyncio.coroutines_available_timezonesavailable_timezonesbabel.datesbase_tzbothceilcfg__class__cline_in_tracebackclscombine__copy__ctimecytimescytimes.parsercytimes.pydtcytimes.utilsddatedatetimedayday_of_monthday_of_quarterday_of_yeardayfirstdaysdays_bf_monthdays_bf_quarterdays_bf_yeardays_in_monthdays_in_quarterdays_in_year__deepcopy__default__dict__dictdiff__doc__doydstdtdt64dt_normdtobjdtstrdtypeen_USerrerrorsfloorfmtfoldformat__format___format_dateformat_datefromdatefromdatetimefromdatetime64fromdayofyearfromisocalenda""rfromisoformatfrommicrosecondsfromordinalfromsecondsfromtimestampfromutcfsfsp__func__h__hash__hourhoursignoretzinclusiveint_is_coroutineis_dayis_dstis_end_ofis_first_ofis_futureis_last_ofis_leap_yearis_localis_long_yearis_monthis_pastis_quarteris_start_ofis_utcis_weekdayis_yearisocalendarisoformatisoweekisoweekdayisoyearitemsleap_bt_yearlocalem__main____metaclass__microsecondmicrosecondsmillisecondsminminuteminutes__module__monthmonth_namemonths__mro_entries__msnaive__name__neither__new___newnormalizenownpnsnumpyobjectoffsetoneordinalparseparse_monthparse_objparse_to_floatparse_to_intparse_weekdaypopprecision__prepare__protocolpspt__pyx_vtable____qualname__quarterquarters__reduce____reduce_ex__replacereturnroundssecondsecondsselfsep__set_name__setdefaultstrstrftimestrptimestruct_timesubtarg_tz__test__timetimedicttimestamptimetupletimetztm_hourtm_isdsttm_mdaytm_mintm_montm_sectm_wdaytm_ydaytm_yearto_curr_monthto_curr_quarterto_curr_weekdayto_curr_yearto_dateto_datetimeto_dayto_end_ofto_first_ofto_fridayto_last_ofto_mondayto_monthto_next_monthto_next_quarterto_next_weekdayto_next_yearto_prev_monthto_prev_quarterto_prev_weekdayto_prev_yearto_quarterto_saturdayto_start_ofto_sundayto_thursdayto_timeto_tomorrowto_tuesdayto_wednesdayto_weekdayto_yearto_yesterdaytodaytokentomicrosecondstoordinaltosecondststyping_extensionstztz_converttz_localizetz_switchtzinfotznameunitusutcutcfromtimestamputcnowutcoffsetutcoffset_secondsutctimedictutctimetupleutilsvaluesweekweekdayweekday_nameweeksyearyearfirstyearszoneinfoPY_LONG_LONG\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000PyDateTime_DateTime *\000PyDateTime_TZInfo *\000PyObject *\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000double\000\000int\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000int [13]\000\000int [5]""\000\000DT64_NS_DD_MAX\000DT64_NS_DD_MIN\000DT64_NS_HH_MAX\000DT64_NS_HH_MIN\000DT64_NS_MI_MAX\000DT64_NS_MI_MIN\000DT64_NS_MM_MAX\000DT64_NS_MM_MIN\000DT64_NS_MS_MAX\000DT64_NS_MS_MIN\000DT64_NS_NS_MAX\000DT64_NS_NS_MIN\000DT64_NS_SS_MAX\000DT64_NS_SS_MIN\000DT64_NS_US_MAX\000DT64_NS_US_MIN\000DT64_NS_WW_MAX\000DT64_NS_WW_MIN\000DT64_NS_YY_MAX\000DT64_NS_YY_MIN\000EPOCH_C100\000EPOCH_C4\000EPOCH_C400\000EPOCH_CBASE\000EPOCH_DAY\000EPOCH_HOUR\000EPOCH_MICROSECOND\000EPOCH_MILLISECOND\000EPOCH_MINUTE\000EPOCH_MONTH\000EPOCH_SECOND\000EPOCH_YEAR\000MS_DAY\000MS_HOUR\000MS_MINUTE\000MS_SECOND\000NS_DAY\000NS_HOUR\000NS_MICROSECOND\000NS_MILLISECOND\000NS_MINUTE\000NS_SECOND\000SS_DAY\000SS_HOUR\000SS_MINUTE\000TD64_MM_MICROSECOND\000TD64_MM_MILLISECOND\000TD64_MM_NANOSECOND\000TD64_MM_SECOND\000TD64_YY_MICROSECOND\000TD64_YY_MILLISECOND\000TD64_YY_NANOSECOND\000TD64_YY_SECOND\000US_DAY\000US_HOUR\000US_MILLISECOND\000US_MINUTE\000US_SECOND\000EPOCH_DT\000UTC\000DT64_DTYPE_AS\000DT64_DTYPE_DD\000DT64_DTYPE_FS\000DT64_DTYPE_HH\000DT64_DTYPE_MI\000DT64_DTYPE_MM\000DT64_DTYPE_MS\000DT64_DTYPE_NS\000DT64_DTYPE_PS\000DT64_DTYPE_SS\000DT64_DTYPE_US\000DT64_DTYPE_WW\000DT64_DTYPE_YY\000NAT\000T_TIMEZONE\000T_ZONEINFO\000_LOCAL_TIMEZONE\000_UTC_ALIASES\000TD64_MM_DAY\000TD64_YY_DAY\000DT_NPY_UNIT_AS\000DT_NPY_UNIT_DD\000DT_NPY_UNIT_FS\000DT_NPY_UNIT_HH\000DT_NPY_UNIT_MI\000DT_NPY_UNIT_MM\000DT_NPY_UNIT_MS\000DT_NPY_UNIT_NS\000DT_NPY_UNIT_PS\000DT_NPY_UNIT_SS\000DT_NPY_UNIT_US\000DT_NPY_UNIT_WW\000DT_NPY_UNIT_YY\000NULL_TZOFFSET\000ORDINAL_MAX\000DAYS_BR_MONTH\000DAYS_IN_MONTH\000DAYS_BR_QUARTER\000DAYS_IN_QUARTERPyDateTime_DateTime *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_obj *__pyx_optional_args)\000int (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_month *__pyx_optional_args)\000int (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6parser_parse_weekday *__pyx_optional_args)\000p""arse_obj\000parse_month\000parse_weekdayPyObject *(PyObject *)\000tz_parsePyObject *\000\000\000\000\000\000\000\000struct __pyx_obj_7cytimes_6parser_Configs *\000struct __pyx_obj_7cytimes_6parser_Parser *\000_DEFAULT_AMPM\000_DEFAULT_HMS\000_DEFAULT_JUMP\000_DEFAULT_MONTH\000_DEFAULT_PERTAIN\000_DEFAULT_TZ\000_DEFAULT_UTC\000_DEFAULT_WEEKDAY\000_DEFAULT_CONFIGS\000_DEFAULT_PARSERint (PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_error *__pyx_optional_args)\000int (int __pyx_skip_dispatch, struct __pyx_opt_args_7cytimes_6errors_raise_argument_error *__pyx_optional_args)\000raise_error\000raise_argument_error\320\000#\2401\360*\000\005\010\200v\210S\220\001\330\010\016\210j\230\001\230\021\330\004 \240\007\240q\250\001\330\004\007\200z\220\023\220A\330\010\017\210q\360\010\000\t\031\230\001\330\010\031\230\021\330\010\027\220q\330\010\023\2201\360\010\000\005\t\210\005\210U\220!\2201\330\010\r\210X\220Q\220g\230Q\330\010\013\210>\230\021\230!\330\014\022\220$\220b\230\003\2303\230c\240\021\240$\240b\250\001\330\014\030\230\001\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\022\220!\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\026\220a\330\r\021\220\021\330\014\r\340\014\022\220*\230A\330\020\021\330%,\250G\2601\260E\270\021\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\330\014=\270R\270q\340\004\013\2101\210G\2209\230A\200A\330\027\030\330 !\3600\000\t\014\2105\220\003\2201\330\014\023\2201\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033.\250c\260\023\260A\340\014\017\210t\2203""\220a\330\020\027\220t\230>\250\023\250C\250r\260\024\260T\3209L\310C\310s\320RS\340\014\017\210t\2203\220a\330\020\021\330\024\030\230\016\240c\250\023\250A\330\024\030\230\004\230N\250#\250S\260\001\330\024\030\230\004\320\034/\250s\260#\260Q\360\006\000\r\020\210y\320\030,\250A\250Q\330\020\027\220q\340\014\017\210t\2203\220a\330\020\027\220q\340\014\017\210t\2203\220a\330\020\027\220t\230?\250#\250S\260\001\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\360\006\000\016\027\220c\230\022\2304\230x\240q\250\006\250c\260\023\260A\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033.\250c\260\022\2605\270\003\2701\340\014\017\210t\2204\220u\230A\330\020\027\220q\360\006\000\016\027\220c\230\022\2304\230u\240C\240q\330\014\023\2204\220~\240S\250\003\2502\250T\260\024\3205H\310\003\3103\310a\360\006\000\t\014\2109\320\024(\250\001\250\021\330\014\023\2201\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220}\240C\240s\250$\250i\3207G\300q\310\001\360\006\000\t\033\230.\250\001\250\026\250v\260Q\330\010\013\2104\210t\2201\330\014\023\2204\220\177\240c\250\023\250A\360\006\000\t\020\210q\200A\330\"0\260\001\360*\000\t\025\220I\230Q\230f\240A\200A\360\006\000\022\023\330\0210\260\001\330\017\035\230Q\360*\000\t\026\220Y\230a\230q\330\010\020\220\004\220N\240!\330\010\013\2106\220\027\230\001\340\014\017\210v\220S\230\001\330\020\034\230N\250!\2506\260\026\260t\2705\300\001\340\021\027\220s\230!\330\020\023\2201\330\024 \240\016\250a\250v\260V\2704\270u\300A\340\024\033\2301\360\006\000\021\024\2201\330\024\036\230n\250A\250V\2607\270!\330\024 \240\016\250a\250t\2606\270\024\270U\300!\340\024 \240\016\250a\250v\260W\270D\300\005\300Q\360\010\000\t\014\2106\220\023\220A\330\014\023\2201\340\010\027\220y\240\001\240\021\330\010\013\2108\2203\220a\330\022'\240q\330\020\024\220E\230""\021\330\020\021\330\020\021\340EG\300q\360\006\000\t\014\2108\2203\220a\330\014\017\210q\330\020\027\220q\340\020\034\230N\250!\2506\260\027\270\004\270E\300\021\360\006\000\r\027\220n\240A\240V\2509\260A\330\014\017\210q\330\020\032\230.\250\001\250\024\250W\260A\330\020\034\230N\250!\2504\250v\260T\270\025\270a\340\020\034\230N\250!\2504\250w\260d\270%\270q\200A\330\0370\260\016\270a\360\032\000\t\014\2107\220#\220Q\330\014\023\2204\220~\240Q\240a\360\006\000\t\032\230\024\230\\\250\021\330\010\031\230\024\230]\250!\330\010\031\230\023\230B\230a\330\010\r\210S\220\003\2203\220b\230\003\2303\230a\330\010\017\210s\220\"\220C\220r\230\024\230R\230q\330\010\031\230\024\230[\250\006\250d\260\"\260G\2701\330\010\013\2103\210b\220\001\330\014\024\220A\220Y\230n\250A\250T\260\021\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020\021\330\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205F\300f\310A\200A\330\036\037\360\"\000\t\023\220)\2301\230A\330\010\020\220\004\220N\240!\330\010\013\2106\220\027\230\001\330\014\017\210s\220'\230\021\330\026+\2501\330\024\030\230\005\230Q\330\024\025\330\024\025\3409;\2701\360\006\000\r\031\230\016\240a\240v\250V\2604\260u\270A\360\006\000\t\014\2103\210c\220\021\330\014\023\2201\340\010\024\220N\240!\2406\250\024\250T\260\025\260a\200A\360\006\000\017\020\330\014+\2501\330\t\n\360\032\000\t\023\220)\2301\230A\330\010\t\330\014\030\230\013\2401\240F\250$\250a\330\010\017\210}\230A\330\022'\240q\250\005\320-J\310&\320PQ\200A\360\006\000\r\016\330\014+\2501\330\t\n\360&\000\t\023\220)\2301\230A\330\010\013\2103\210g\220Q\340\014\030\230\007\230q\330\020\022\220'\230\022\2308\2402\240V\2502\250W\260B\260a\330\020\022\220)\2302\230^\2504\250s\260!\360\006\000\t\025\220I\230Q\230d\240!\200A\360\006\000\022\023\330\014+\2501\330\t\n\360\"\000\t""\023\220)\2301\230A\330\010\t\330\014\030\230\n\240!\2405\250\001\250\032\2604\260q\330\010\017\210}\230A\330\022'\240q\250\005\320-J\310&\320PQ\200A\360\006\000\017\020\330\r\016\330\014+\2501\330\t\n\360\034\000\t\023\220)\2301\230A\330\010\t\330\014\030\230\n\240!\2406\250\025\250d\260!\330\010\017\210}\230A\330\022'\240q\250\005\320-I\310\026\310q\200A\360\006\000\017\020\330\016\017\330\021\022\330\014+\2501\330\t\n\360 \000\t\023\220)\2301\230A\330\010\t\330\014\030\230\n\240!\2406\250\026\250y\270\004\270A\330\010\017\210}\230A\330\022'\240q\250\005\320-E\300V\3101\200A\360\006\000\022\023\330\014+\2501\330\t\n\360\030\000\t\023\220)\2301\230A\330\010\t\330\014\030\230\n\240!\2409\250D\260\001\330\010\017\210}\230A\330\022'\240q\250\005\320-J\310&\320PQ\200A\360\006\000\017\020\330\014+\2501\330\t\n\360\030\000\t\023\220)\2301\230A\330\010\024\220K\230q\240\006\240d\250!\200A\360\006\000\r\016\330\014+\2501\330\t\n\360\"\000\t\023\220)\2301\230A\330\010\t\330\014\030\230\t\240\021\240$\240d\250!\330\010\017\210}\230A\330\022'\240q\250\005\320-J\310&\320PQ\200A\360\006\000\r\016\330\014+\2501\330\t\n\360\036\000\t\023\220)\2301\230A\330\010\t\330\014\030\230\t\240\021\240%\240q\250\005\250T\260\021\330\010\017\210}\230A\330\022'\240q\250\005\320-G\300v\310Q\200A\360\006\000\017,\2501\330\016+\2501\330\014+\2501\330\t\n\3602\000\t\023\220)\2301\230A\360\006\000\t\014\2105\220\007\220u\230D\240\t\250\030\260\021\260!\330\014\r\330\020\027\220z\240\021\240&\250\006\250f\260G\2706\300\026\300v\310Q\330\014\023\220=\240\001\330\026+\2501\250E\3201G\300v\310Q\330\014\030\230\013\2401\240F\250!\360\006\000\t\014\2105\220\007\220u\230D\240\t\250\030\260\021\260!\330\014\r\330\020\027\220z\240\021\330\024\037\230{\250&\260\007\260w\270f\300F\310!\340\014\023\220=\240\001\330\026+\2501\250E\3201G\300v\310Q\330\014\030\230\013\2401\240F\250!\360\006\000\t\025\220K\230q\240\006\240f\250D\260\001\200A\330\035#\2401\360\026\000\t\014\2104\210s\220!\330\022'\240q\330\020""\024\220E\230\021\330\020\021\330\020\021\340\010\024\220M\240\021\240&\250\005\250Q\200A\360\006\000\021\022\330\017\"\240!\330\r\033\2301\360.\000\t\014\2107\220#\220Q\330\014\023\2204\220}\240A\240W\250A\360\006\000\t\032\230\024\230\\\250\023\250B\250a\330\010\031\230\034\240Q\240g\250V\2601\330\010\013\2103\210d\220!\330\014\021\220\024\220]\240!\330\010\031\230\024\230[\250\006\250d\260\"\260G\2701\330\010\013\2103\210b\220\001\330\014\024\220A\220Y\230n\250A\250T\260\021\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020\021\330\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205E\300V\3101\200A\360\006\000\017\034\2301\330\017\034\230A\330\r\032\230!\330\016\033\2301\330\020\035\230Q\330\020\035\230Q\330\025\"\240!\330\020/\250q\330\016\033\2301\330\t\n\360\006\000\t\027\220i\230q\240\001\330\010\013\2107\220'\230\025\230d\240$\240a\240x\250|\2701\330\014,\250M\270\021\330\020\026\220g\230U\240&\250\010\260\010\270\r\300X\310Q\340\014\r\330\0202\3202B\300!\3004\300q\330\014\023\220=\240\001\330\020\026\220f\320\034/\250q\260\n\270!\330\014\017\210s\220'\230\021\330\020\027\220w\230a\330\020\030\230\007\230q\330\020\026\220g\230Q\330\020\027\220w\230a\330\020\031\230\027\240\001\330\020\031\230\027\240\001\330\020\036\230g\240Q\330\020\027\220q\360\006\000\t\014\2105\220\003\2201\330\014\030\230\005\230X\240Q\330\020\025\220V\2307\240%\240v\250X\260X\270]\310(\320RW\320WX\360\006\000\r\031\230\005\230X\240Q\330\020\025\220V\2307\240%\240v\250X\260X\270]\310!\340\010\n\210)\2201\330\010\017\210q\200A\330\035+\2501\360,\000\t\025\220J\230a\230v\240Q\200A\360\006\000\020#\240!\330\r\033\2301\360(\000\t\032\230\034\240Q\240g\250V\2601\330\010\013\2103\210d\220\"\220C\220s\230#\230T\240\035\250a\330\014\023\2204\220~\240Q\240a\330\010\031\230\024\230\\\250\021\360\006\000""\t\032\230\024\230[\250\006\250d\260\"\260G\2701\330\010\013\2103\210b\220\001\330\014\024\220A\220Y\230n\250A\250T\260\021\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020\021\330\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205J\310&\320PQ\200A\360\006\000\020#\240!\330\r\033\2301\360&\000\t\020\210t\2208\2301\230C\230w\240a\200A\360\006\000\020#\240!\330\r\033\2301\360&\000\t\020\210t\2208\2302\230S\240\007\240q\200A\330\"2\260!\360\022\000\t\n\330\014\030\230\t\240\021\240%\240q\250\n\260&\270\001\330\010\017\210}\230A\330\022'\240q\250\005\320-E\300V\3101\200A\330\0254\260I\270Q\360\026\000\t\023\220)\2301\230A\330\010\024\220G\2301\230D\240\001\200A\330\035\036\360 \000\t\014\2104\210~\230S\240\003\2401\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\006\000:<\2701\360\010\000\t\023\220)\2301\230A\330\010\013\2103\210c\220\021\330\014\030\230\016\240a\330\025#\2401\240K\250v\260W\270F\300$\300e\3101\360\010\000\t\025\220N\240!\2406\250\024\250T\260\025\260a\200A\330\027\030\330 !\360 \000\t\014\2105\220\003\2201\330\014\023\2201\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\230?\250#\250S\260\001\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\340\014\017\210t\2203\220a\330\020\034\320\034,\250A\250Q\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220}\240C\240s\250$\250i\3207G\300q\310\001\360\006\000\t\020\210q\200A\330\027\030\330\037 \360 \000\t\014\2105\220\003\2201\330\014\023\2201\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\230?\250#\250S\260\001\340\014\017""\210t\2203\220a\330\020\034\230O\2501\250A\340\014\017\210t\2203\220a\330\020\034\230O\2501\250A\340\014\017\210t\2203\220a\330\020\034\230O\2501\250A\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220}\240C\240s\250$\250i\260\177\300a\300q\360\006\000\t\020\210q\200A\330\027\030\330\036\037\360.\000\t\014\2105\220\003\2201\330\014\023\2201\360\006\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033.\250c\260\023\260A\340\014\017\210t\2203\220a\330\020\021\330\024\030\230\016\240c\250\023\250C\250t\2604\3207J\310#\310S\320PQ\360\006\000\r\020\210t\2203\220a\330\020\021\330\024\030\230\016\240c\250\023\250A\330\024\030\230\004\230N\250#\250S\260\001\330\024\030\230\004\320\034/\250s\260#\260Q\360\006\000\r\020\210y\320\030*\250!\2501\330\020\027\220q\340\014\017\210t\2203\220a\330\020\027\220q\340\014\017\210t\2203\220a\330\020\027\220t\230?\250#\250S\260\001\340\014\017\210t\2203\220a\330\020\034\230O\2501\250A\340\014\017\210t\2203\220a\330\020\034\230O\2501\250A\340\014\017\210t\2203\220a\330\020\034\230O\2501\250A\360\006\000\016\027\220c\230\022\2304\230x\240q\250\006\250c\260\023\260A\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033.\250c\260\022\2605\270\003\2701\340\014\017\210t\2204\220u\230A\330\020\027\220q\360\006\000\016\027\220c\230\022\2304\230u\240C\240q\330\014\023\2204\220~\240S\250\003\2503\250d\260$\3206I\310\023\310C\310q\360\006\000\t\014\2109\320\024&\240a\240q\330\014\023\2201\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220}\240C\240s\250$\250i\260\177\300a\300q\360\006\000\t\033\230.\250\001\250\026\250v\260Q\330\010\013\2104\210t\2201\330\014\023\2204\220\177\240c\250\023\250A\360\006\000\t\020\210q\200A\330\032\033\360\026\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\010\000\t\036\320\035/\250q\260""\004\260E\270\024\270Q\330\010\013\2102\210S\220\001\330\014\023\2201\360\006\000\t(\240y\260\001\260\026\260q\330\010'\240~\260Q\260h\270c\300\022\3001\330\010\013\2107\220#\220Q\330\014\023\2201\360\006\000\t\n\330\014\030\230\t\240\021\240(\250$\250n\270D\300\004\300E\310\021\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\260_\300F\310!\200A\330 !\360.\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\n\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\024\250S\260\001\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\023\250C\250q\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240S\250\003\2503\250a\340\014\017\210t\2203\220a\330\020\027\220t\2308\2401\240C\240s\250#\250Q\340\014\017\210t\2203\220a\340\020\027\220t\2304\230q\330\024\027\220s\230#\230Q\330\024\025\220T\230\037\250\001\330\024\025\220T\230\034\240Q\330\024\025\220T\230\036\240q\330\024\025\220T\230\036\240q\330\024\025\330\024\025\220T\320\031,\250A\360\010\000\r\020\210t\2203\220a\330\020\027\220t\230<\240r\250\024\250S\260\003\2603\260c\270\023\270A\340\014\017\210t\2203\220a\330\020!\240\024\240]\260!\330\020\032\320\032+\2501\250D\260\002\260\"\260B\260a\330\020\027\220t\230<\240r\250\023\250D\260\003\2603\260c\270\023\270A\340\014\017\210t\2203\220a\330\020\027\220t\230<\240r\250\023\250C\250s\260#\260S\270\003\2701\360\006\000\016\027\220c\230\022\2304\230x\240q\250\006\250c\260\023\260A\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\024\250S\260\004\3204G\300s\310\"\310A\340\014\017\210t\2204\220u\230A\330\020\027\220q\360\006\000\016\027\220c\230\022\2304\230u\240C\240q\330\014\023\2204\220x\230r\240\024\240S\250\003\2501\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220|\2402\240S\250\005\250S\260\003\2603\260c\270\021\360\006\000""\t\033\230.\250\001\250\026\250v\260Q\330\010\013\2104\210t\2201\340\014\023\2204\220t\2301\330\020\023\2203\220c\230\021\330\020\024\220B\220d\230/\250\021\330\020\021\220\024\220\\\240\021\330\020\021\220\024\220^\2401\330\020\021\220\024\220^\2401\330\020\021\330\020\021\220\024\320\025(\250\001\360\n\000\017$\2401\330\014\020\220\005\220Q\330\014\r\330\014\r\330/1\260\021\200A\330\036\037\360.\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\n\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\024\250S\260\001\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\023\250D\260\001\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240S\250\004\250D\260\001\340\014\017\210t\2203\220a\330\020\027\220t\2308\2401\240D\250\004\250D\260\001\340\014\017\210t\2203\220a\340\020\027\220t\2304\230q\330\024\027\220s\230#\230Q\330\024\026\220b\230\004\230O\2501\330\024\027\220r\230\024\230\\\250\021\330\024\027\220r\230\024\230^\2501\330\024\027\220r\230\024\230^\2501\330\024\025\330\024\033\2302\230T\320!4\260A\360\010\000\r\020\210t\2203\220a\330\020\027\220t\230<\240r\250\024\250S\260\004\260D\270\004\270D\300\001\340\014\017\210t\2203\220a\330\020!\240\024\240]\260!\330\020\032\320\032+\2501\250D\260\002\260!\330\020\027\220t\230<\240r\250\023\250D\260\004\260D\270\004\270D\300\001\340\014\017\210t\2203\220a\330\020\027\220t\230<\240r\250\023\250D\260\004\260D\270\004\270D\300\001\360\006\000\016\027\220c\230\022\2304\230x\240q\250\006\250c\260\023\260A\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240T\250\024\250S\260\004\3204G\300s\310\"\310E\320QS\320ST\340\014\017\210t\2204\220u\230A\330\020\027\220q\360\006\000\016\027\220c\230\022\2304\230u\240C\240q\330\014\023\2204\220x\230r\240\024\240S\250\004\250A\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330""\014\023\2204\220|\2402\240S\250\005\250T\260\024\260T\270\024\270Q\360\006\000\t\033\230.\250\001\250\026\250v\260Q\330\010\013\2104\210t\2201\340\014\023\2204\220t\2301\330\020\023\2203\220c\230\021\330\020\024\220B\220d\230/\250\021\330\020\023\2202\220T\230\034\240Q\330\020\023\2202\220T\230\036\240q\330\020\023\2202\220T\230\036\240q\330\020\021\330\020\027\220r\230\024\320\0350\260\001\360\n\000\017$\2401\330\014\020\220\005\220Q\330\014\r\330\014\r\330/1\260\021\200A\330 !\360 \000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\010\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033,\250A\250Q\340\014\017\210t\2203\220a\330\020\027\220t\230>\250\021\250!\340\014\017\210t\2203\220a\330\020\027\220t\320\033+\2501\250C\250q\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240S\250\003\2501\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220x\230r\240\023\240E\250\021\360\006\000\017$\2401\330\014\020\220\005\220Q\330\014\r\330\014D\300B\300a\200A\330\037 \360 \000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\360\010\000\t'\240g\250Q\250a\330\010\013\2109\220C\220q\330\014\"\240(\250!\2506\260\021\340\014\017\210t\2203\220a\330\020\027\220t\320\033,\250A\250Q\340\014\017\210t\2203\220a\330\020\027\220t\230>\250\021\250!\340\014\017\210t\2203\220a\330\020\027\220t\320\033+\2501\250C\250q\340\014\017\210t\2203\220a\330\020\027\220t\2308\2402\240S\250\004\250A\360\006\000\t\033\230,\240a\240v\250V\2601\330\010\013\2104\210t\2201\330\014\023\2204\220x\230r\240\023\240E\250\021\360\006\000\017$\2401\330\014\020\220\005\220Q\330\014\r\330\014D\300B\300a\200A\330!6\3206I\310\021\360$\000\t\033\230.\250\001\250\031\260&\270\001\330\010\013\2107\220#\220Q\330\014\023\2204\320\027(\250\001\250\021\360\006\000\t\034\2307\240\"\240A\330\010\013\2104\210t\2201\330""\014\024\220D\230\002\230$\230o\250Q\360\006\000\t\020\210t\2207\230!\2301\200A\330\035\036\360\026\000\t\014\2107\220#\220Q\330\014\023\2201\360\006\000\t\n\330\014\030\230\007\230q\240\006\240h\250c\260\023\260D\270\005\270Q\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\260_\300F\310!\200A\330!*\250!\360\030\000\t\014\2107\220#\220Q\330\014\025\220Q\330\010\t\330\014\023\220<\230q\240\006\240g\250X\260W\270A\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205K\3106\320QR\200A\360$\000\t\024\2209\230A\230V\2401\330\010\017\210{\230!\340\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\330\020\023\2201\200A\360$\000\t\024\2209\230A\230V\2401\330\010\t\330\014\027\220s\230!\330\014\026\220c\230\021\330\014\027\220s\230!\330\014\027\220s\230!\330\014\026\220c\230\021\330\014\026\220c\230\021\330\014\027\220s\230!\330\014\027\220s\230!\330\014\030\230\003\2301\200A\360\010\000\t\030\220}\240A\240Q\200A\360\010\000\t\030\320\027,\250A\250Q\200A\360\010\000\t\025\320\024$\240A\240T\250\034\260T\270\024\270]\310!\200A\360\014\000\t\025\320\024$\240A\240T\250\034\260T\270\024\270]\310!\200A\330\035<\270A\360\032\000\t\023\220)\2301\230A\330\010\024\220N\240!\2406\250\024\250T\260\025\260a\200A\330#,\250A\360\030\000\t\014\2107\220#\220Q\330\014\025\220Q\330\010\t\330\014\023\220<\230q\240\006\240g\250X\260W\270A\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205M\310V\320ST\200A\360\020\000\t\025\320\024$\240A\330\014\020\220\014\230D\240\004\240M\260\024\260T\270\033\300A\340\010\020\220\010\230\004\230G\2408\2504\250w\260k\300\024\300Q\200A\360\006\000\017\035\230A\330\017\035\230Q\330\r\033\2301\360\036\000\t\n\330\014\030\230\013\2401\330\020\026\220f\230G\2406\250\024\250T\260\024\260T\270\024\270S\300\004\300E\310\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205E\300V\3101\200A\360\006\000\017\035\230A\330\017\035\230Q\330\r\033\2301""\330\016\034\230A\330\020\036\230a\330\020\036\230a\330\025#\2401\330\0200\260\001\330\016\034\230A\3608\000\t\014\2104\210z\230\021\230(\240!\330\014\032\230)\2401\240A\360\006\000\t\n\340\014\030\230\013\2401\240A\330\020\026\220g\230U\240&\250\010\260\001\330\020\035\230X\240V\2504\250u\260A\360\006\000\t\020\210}\230A\330\022'\240q\250\004\250E\260\024\3205E\300V\3101\200A\360\006\000\017\035\230A\330\017\035\230Q\330\r\033\2301\330\016\034\230A\330\020\036\230a\330\020\036\230a\330\025#\2401\360@\001\000\t\n\340\014\030\230\013\2401\240A\330\020\026\220g\230U\240&\250\010\260\001\330\020\036\230d\240#\240T\250\025\250a\360\006\000\t\020\210}\230A\330\022'\240q\250\004\250E\260\024\3205I\310\026\310q\200A\360\006\000\017\035\230A\330\020\036\230a\330\020\036\230a\330\025#\2401\360,\000\t\n\330\014\030\230\013\2401\330\020\027\220t\2304\230s\240&\250\010\260\010\270\016\300d\310#\310T\320QV\320VW\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205E\300V\3101\200A\330\"*\250!\360\014\000\t\n\330\014\031\230\031\240.\260\001\260\021\330\010\017\210}\230A\330\022'\240q\250\005\320-E\300V\3101\330\014\r\330\010\024\220I\230Q\230d\240!\200A\360\006\000\020\035\230A\330\022\037\230q\330\020\035\230Q\330\017\034\230A\330\016\033\2301\330\017\034\230A\330\021\036\230a\330\021\036\230a\330\026#\2401\330\026#\2401\360 \000\t\n\340\014\030\230\r\240Q\240a\330\020\021\220\027\230\001\230\032\2401\240H\250A\250W\260A\260Q\330\020\021\220\027\230\001\230\031\240!\2409\250A\250^\2701\270A\330\021\025\220T\230\024\230T\240\023\240D\250\004\250D\260\003\2604\260u\270A\360\006\000\t\020\210}\230A\330\022'\240q\250\004\250E\260\024\260\\\300\026\300q\200A\360\006\000\020\035\230A\330\022\037\230q\330\020\035\230Q\330\017\034\230A\330\016\033\2301\330\017\034\230A\330\021\036\230a\330\021\036\230a\330\026#\2401\330\026#\2401\360 \000\t\n\340\014\030\230\r\240Q\240a\330\020\027\220z\240\030\250\027\260\001\330\020\027\220y\240\t\250\036\260q\330\021\025\220T\230\024\230T""\240\023\240D\250\004\250D\260\003\2604\260u\270A\360\006\000\t\020\210}\230A\330\022'\240q\250\004\250E\260\024\260\\\300\026\300q\200A\360\020\000\t\025\220G\2301\230A\200A\330\026\027\360\014\000\t\025\220G\2301\230F\240!\200A\330\027\030\340\010\024\220G\2306\240\026\240q\200A\360\006\000\t\025\220I\230Q\230a\200A\360\006\000\020\021\330\016\017\330\022 \240\001\330\023\031\230\021\360@\001\000\t\n\330\014$\240J\250a\330\020\027\220v\230V\2407\250'\260\026\260v\270Q\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205I\310\026\310q\330\014\023\2201\360\006\000\t\021\220\004\220N\240!\330\010\020\220\002\220!\330\010 \240\006\240g\250Q\330\010 \240\006\240g\250Q\330\010\013\2109\220C\220q\330\022\036\230a\330\020\026\220a\330\020\024\220E\230\021\330\020\021\330\020\021\340,2\260$\260a\260w\270d\300$\300a\300q\360\010\000\t\014\210:\220S\230\001\330\014#\2401\330\r\027\220s\230!\330\014#\2401\330\r\027\220s\230!\330\014$\240A\340\022'\240q\330\020\024\220E\230\021\330\020\021\330\020B\300\"\300A\340\014\023\2201\360\006\000\t\014\2105\220\003\2201\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\340\010&\240g\250Q\250a\330\010\013\2109\220C\220q\330\022'\240q\330\020\024\220A\330\020\021\330\020\021\360\010\000\t\n\340\014\017\210y\230\003\2302\230T\240\030\250\021\250&\260\003\2603\260a\330\020/\320/A\300\021\300&\310\003\3101\330\020/\320/A\300\021\300$\300c\310\021\360\006\000\0210\250|\2701\270F\300&\310\001\330\020/\250|\2701\270D\300\006\300a\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205H\310\006\310a\330\014\023\2201\340\010!\240\027\250\002\250!\360\010\000\t\014\2101\330\014\025\220Q\220i\230v\240R\240w\250g\260R\260q\340\r\026\220c\230\021\330\014\024\220F\230\"\230L\250\006\250b\260\007\260v\270R\270q\360\006\000\t\020\210q\200A\360\014\000\t\025\220J\230a\230q\200A\330\027\030\360\016\000\t\025\220J\230a\230v\240Q\200A\360\006\000\t\025\220K\230q\240\006\240a\200A\360\014\000\t\025\220L\240\001\240\021\200A\360\010\000""\t\025\220L\240\001\330\014\020\220\014\230D\240\004\240M\260\024\260T\270\033\300A\200A\330\034\035\360\014\000\t\025\220M\240\021\240&\250\001\200A\360\022\000\t\025\220M\240\021\240!\200A\360\010\000\t\025\220M\240\021\240$\240l\260!\200A\360\016\000\t\025\220M\240\021\240$\240l\260!\200A\360\010\000\t\025\220N\240!\2404\240|\2604\260t\270=\310\001\200A\360\014\000\t\025\220N\240!\2404\240|\2604\260t\270=\310\001\200A\340!\"\340\010\024\220O\2401\240D\250\014\260D\270\001\200A\360\010\000\t\025\220O\2401\330\014\020\220\014\230D\240\004\240M\260\024\260T\270\033\300A\200A\360\006\000\020\036\230Q\330\r\033\2301\360 \000\t\014\2106\220\022\2201\330\014\023\2204\220~\240Q\240a\360\006\000\t\037\230d\240-\250q\330\010\036\320\036/\250q\260\t\270\022\2702\270W\300G\3103\310b\320PQ\330\010\013\2103\210c\220\021\330\014\023\2204\220~\240Q\240a\330\010\031\230\024\230\\\250\021\360\006\000\t\032\230\024\230[\250\006\250d\260\"\260G\2701\330\010\013\2103\210b\220\001\330\014\024\220A\220Y\230n\250A\250T\260\021\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020\021\330\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205M\310V\320ST\200A\360\006\000\021\022\330\017\035\230Q\330\r\033\2301\360\"\000\t\014\2107\220#\220Q\330\014\023\2204\320\027'\240q\250\007\250q\360\006\000\t\032\230\024\230\\\250\021\330\010\031\230\024\230]\250!\330\010\013\2106\220\023\220A\330\014\026\320\026'\240q\250\004\250B\250b\260\007\260w\270c\300\022\3001\330\010\031\230\023\230B\230g\240R\240q\330\010\r\210S\220\003\2203\220b\230\003\2303\230a\330\010\017\210s\220\"\220C\220r\230\024\230R\230q\330\010\031\230\024\230[\250\006\250d\260\"\260G\2701\330\010\013\2103\210b\220\001\330\014\024\220A\220Y\230n\250A\250T\260\021\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020\021\330""\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205H\310\006\310a\200A\360\006\000\020\036\230Q\330\r\033\2301\360\036\000\t\020\210t\220;\230a\230s\240'\250\021\200A\360\006\000\020\036\230Q\330\r\033\2301\360\036\000\t\020\210t\220;\230b\240\003\2407\250!\200A\360\010\000\t\030\220~\240Q\240a\200A\360\020\000\t\030\220~\240Q\240a\200A\360\010\000\t\025\320\024%\240Q\240d\250-\260q\200A\330\035\036\360\030\000\t\014\210:\220S\230\001\330\014\023\2201\330\010\013\210:\220R\220q\330\022'\240q\330\020\024\220E\230\021\330\020\021\330\020\021\33013\2601\360\010\000\t\036\230S\240\001\240\023\240D\250\002\250\"\250A\330\010'\240y\260\001\260\026\260q\330\010'\240\177\260a\260x\270s\300\"\300A\330\010\013\2107\220#\220Q\330\014\023\2201\360\006\000\t\025\220I\230Q\230h\240d\250.\270\004\270D\300\005\300Q\200A\360\022\000\t\016\210T\220\036\230q\330\010\013\2103\210c\220\021\330\014\023\2201\330\010\036\320\036/\250q\260\004\260A\330\010\017\210x\220s\230(\320\"6\260a\200A\340\010\016\210a\330\010\017\210q\330\010\r\210Q\330\010\016\210a\330\010\020\220\001\330\010\020\220\001\330\010\025\220Q\330\010\020\220\001\340\010\016\210a\330\t\n\3600\000\t\020\210s\220%\220q\330\014\021\220\021\330\014\022\220!\330\014\020\220\001\330\014\021\220\021\330\014\023\2201\330\014\023\2201\330\014\030\230\001\330\014\023\2201\330\014\021\220\021\200A\360\010\000\t\030\220\177\240a\240q\200A\360\010\000\t\030\320\027'\240q\250\001\200A\360\006\000\t\030\320\027'\240q\250\001\200A\330!/\250q\360\030\000\t\014\2104\210r\220\021\330\014\023\2201\360\006\000\t\032\230\024\230\\\250\021\330\010\031\230\024\230]\250!\330\010\013\2104\210r\220\021\330\014\025\220Q\220j\240\016\250a\250t\2601\330\010\013\2104\210s\220$\220k\240\021\330\014\023\2201\360\006\000\t\n\330\014\030\230\007\230q\330\020\021\330\020\021\330\020""\021\330\020\024\220L\240\001\330\020\024\220N\240!\330\020\024\220N\240!\330\020\024\320\024'\240q\330\020\024\220N\240!\330\020\024\220L\240\001\330\020\024\220E\230\021\340\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\3205K\3106\320QR\200A\330\031\032\360\026\000\t\036\320\035/\250q\260\004\260E\270\024\270Q\330\010\013\2102\210S\220\001\330\014\023\2201\360\006\000\t(\240y\260\001\260\026\260q\330\010'\240~\260Q\260h\270c\300\022\3001\330\010\013\2107\220#\220Q\330\014\023\2201\360\006\000\t\n\330\014\030\230\t\240\021\240(\250$\250n\270D\300\004\300E\310\021\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\260^\3006\310\021\200A\330\032\033\360\026\000\t\036\320\035/\250q\260\004\260E\270\024\270Q\330\010\013\2102\210S\220\001\330\014\023\2201\360\006\000\t(\240y\260\001\260\026\260q\330\010'\240\177\260a\260x\270s\300\"\300A\330\010\013\2107\220#\220Q\330\014\023\2201\360\006\000\t\n\330\014\030\230\t\240\021\240(\250$\250n\270D\300\004\300E\310\021\330\010\017\210}\230A\330\022'\240q\250\004\250E\260\024\260_\300F\310!\200A\360\006\000\020\021\330\021!\240\021\330\023!\240\021\330\022 \240\001\330\022 \240\001\330\023!\240\021\330\r\027\220q\330\t\n\360H\001\000\t\014\2108\2207\230!\330\014\r\330\020\032\230*\240A\330\024\035\230V\240;\250j\270\006\270k\310\025\310a\340\014\023\220=\240\001\330\026+\2501\250E\3201H\310\006\310a\360\006\000\t\n\330\014\023\220:\230Q\330\020\027\220y\240\013\250:\260Z\270{\310%\310q\340\010\017\210}\230A\330\022'\240q\250\005\320-B\300&\310\001\200A\330!/\250q\360\026\000\t\020\210t\2209\230A\230S\240\001\200A\330!/\250q\360\026\000\t\020\210t\2209\230B\230c\240\021\200A\360\006\000\t\020\210t\2207\230!\2301\200A\360\006\000\t\020\210t\2207\230\"\230A\200A\360\016\000\t\020\210t\2208\2301\230C\230s\240#\240Q\200A\340\036\037\360\026\000\t\020\210t\220=\240\003\2403\240l\260!\2607\270&\300\001\200A\360\006\000\t\020\210t\320\023$\240A\240Q\200A\330':\270!\360\036\000\t\020\210t\320\023$\240A\240^\2601\260I\270V""\3001\200A\330\027\030\360\014\000\t\020\210t\220>\240\023\240H\250A\200A\330\027\030\360\014\000\t\020\210t\220>\240\023\240H\250I\260Q\200A\340\"#\340\010\017\210t\220?\240#\240S\250\001\200A\340\"#\360\026\000\t\020\210t\220?\240#\240S\250\016\260a\260y\300\006\300a\200A\360\020\000\t\020\210t\220;\230a\200A\330':\270!\360\036\000\t\020\210t\220;\230a\230s\240!\200A\330':\270!\360\036\000\t\020\210t\220;\230b\240\003\2401\200A\340\032\033\340\010\017\210t\220;\230c\240\023\240A\200A\360\010\000\t\020\210t\320\023&\240c\250\023\250A\200A\340\034\035\340\010\017\210t\220<\230s\240#\240Q\200A\330\027\030\360\016\000\t\020\210u\220G\2307\240!\2404\240~\260Q\200A\330\027\030\360\014\000\t(\240w\250a\250q\330\010\017\210y\230\004\230C\230z\250\024\250V\2609\270A\270Q\200A\330\035'\240x\250q\360\016\000\t\n\330\014\031\230\031\240)\2501\250G\2601\330\010\017\210}\230A\330\022'\240q\250\005\320-E\300V\3101\330\014\r\330\010\024\220I\230Q\230d\240!\320\004\034\230A\330\010\027\220y\240\013\2501\250A\200A\360\006\000\t\030\220y\240\001\330\014\020\220\014\230A\330\014\020\220\016\230a\330\014\020\220\016\230a\330\014\020\320\020#\2401\330\014\r\330\014\r\320\004\032\230!\330\010\024\220G\2301\330\014\020\220\014\230A\330\014\020\220\r\230Q\330\014\020\220\013\2301\330\014\020\220\014\230A\330\014\020\220\016\230a\330\014\020\220\016\230a\330\014\020\320\020#\2401\330\014\020\220\016\230a\330\014\020\220\014\230A\330\014\020\220\005\220Q\320\004\036\230h\240a\330\010\013\2104\210s\220%\220s\230'\240\021\240%\240s\250!\330\014\023\2204\220z\240\021\240!\340\014\023\2204\220y\240\001\240\021\320\004\036\230i\240q\330\010\024\220G\2301\330\014\020\220\014\230A\330\014\020\220\r\230Q\330\014\020\220\013\2301\330\014\020\220\014\230A\330\014\020\220\016\230a\330\014\020\220\016\230a\330\014\020\320\020#\2401\330\014\020\220\016\230a\330\014\020\220\014\230A\330\014\020\220\005\220Q\320\004&\240n\260A\330\010\027\220y\240\016\250a\250v\260Q\320\000\"\240!\360.\000\005\010\200v""\210S\220\001\330\010\016\210j\230\001\230\021\330\004 \240\007\240q\250\001\330\004\007\200z\220\023\220A\330\010\017\210q\360\010\000\t%\240A\330\010$\240A\330\010\031\230\021\330\010\027\220q\330\010\031\230\021\330\010\027\220q\330\010\023\2201\360\n\000\005\t\210\005\210U\220!\2201\330\010\r\210X\220Q\220g\230Q\330\010\013\210>\230\021\230!\330\014\017\210t\2201\330\020\031\230\027\240\002\240#\240S\250\003\2501\250D\260\002\260!\340\020\031\230\027\240\002\240#\240S\250\003\2501\250D\260\002\260!\330\020\033\2301\330\014\030\230\001\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\026\220a\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330?A\300\021\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\022\220!\330\r\020\220\003\2201\330\014\017\210q\330\020\026\220j\240\001\330\024\025\3308:\270!\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330?A\300\021\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330<>\270a\340\014\017\210q\330\020\026\220j\240\001\330\024\025\330AC\3001\340\014\026\220a\330\r\021\220\021\330\014\r\340\014\022\220*\230A\330\020\021\330%,\250G\2601\260E\270\021\360\006\000\005\010\200t\2101\330\010\016\210j\230\001\330\014;\2702\270Q\340\t\r\210Q\330\010\017\210y\230\001\340\010\017\210y\230\010\240\003\2409\250H\260B\260a\330\004\013\2101\210G\2209\230A";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 753; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 322) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 753; i < 874; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 874; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 753;
      for (Py_ssize_t i=0; i<121; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0,-1,1};
    for (int i = 0; i < 3; i++) {
      numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<3; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 4;
    unsigned int num_posonly_args : 2;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 4;
    unsigned int flags : 10;
    unsigned int first_line : 12;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1438};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_token};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_pxd, __pyx_mstate->__pyx_n_u_parse_to_int, __pyx_mstate->__pyx_kp_b_iso88591_1_vS_j_q_z_A_q_q_1_U_1_XQgQ_b_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1527};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_token};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_pxd, __pyx_mstate->__pyx_n_u_parse_to_float, __pyx_mstate->__pyx_kp_b_iso88591_vS_j_q_z_A_q_A_A_q_q_1_U_1_XQgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 107};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_tzinfo, __pyx_mstate->__pyx_n_u_fold, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_dt_norm, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_pt};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_new_2, __pyx_mstate->__pyx_kp_b_iso88591_A_1_A_1_Q_Q_q_1_iq_7_d_ax_1_M_gU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 153};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dtobj, __pyx_mstate->__pyx_n_u_default, __pyx_mstate->__pyx_n_u_yearfirst, __pyx_mstate->__pyx_n_u_dayfirst, __pyx_mstate->__pyx_n_u_ignoretz, __pyx_mstate->__pyx_n_u_isoformat, __pyx_mstate->__pyx_n_u_cfg, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_parse, __pyx_mstate->__pyx_kp_b_iso88591_A_q_H_87_A_V_j_k_a_1E1H_a_Q_y_Z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 215};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_now, __pyx_mstate->__pyx_kp_b_iso88591_A_4IQ_1A_G1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 230};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utcnow, __pyx_mstate->__pyx_kp_b_iso88591_A_G6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 235};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_today, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 244};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_combine, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_1_2_1A_5_uD_z_fG6_vQ_1E1Gv, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 298};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ordinal, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromordinal, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_9D_A_q_J_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 321};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_5_4q_A_q_J_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 349};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_frommicroseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_d_A_q_J_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 377};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromtimestamp, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_q_T_A_q_GvQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 403};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_ts, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utcfromtimestamp, __pyx_mstate->__pyx_kp_b_iso88591_A_2_q_A_q_EV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 418};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dtstr, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromisoformat, __pyx_mstate->__pyx_kp_b_iso88591_A_A_q_EV1_IQd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 432};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_week, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromisocalendar_2, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_6_y_A_A_q_EV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 461};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_doy, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromdayofyear, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_6_d_A_q_I_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 487};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromdate, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_Kq_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 507};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromdatetime, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_3gQ_q_82V2WBa_2_4s_IQd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 541};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dt64, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fromdatetime64, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1A_1F_a_A_q_J_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 565};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_dtstr, __pyx_mstate->__pyx_n_u_fmt, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_err};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_strptime, __pyx_mstate->__pyx_kp_b_iso88591_A_xq_1G1_A_q_EV1_IQd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 581};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_ctime, __pyx_mstate->__pyx_kp_b_iso88591_A_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 589};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fmt};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_strftime, __pyx_mstate->__pyx_kp_b_iso88591_A_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 598};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sep};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_isoformat, __pyx_mstate->__pyx_kp_b_iso88591_A_1_4s_q_E_M_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 618};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_timedict, __pyx_mstate->__pyx_kp_b_iso88591_A_9AV1_s_c_s_s_c_c_s_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 649};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utctimedict, __pyx_mstate->__pyx_kp_b_iso88591_A_9AV1_s_c_s_s_c_c_s_s_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 680};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_timetuple, __pyx_mstate->__pyx_kp_b_iso88591_A_9AV1_1_1_1_1_1_1_1_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 713};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utctimetuple, __pyx_mstate->__pyx_kp_b_iso88591_A_9AV1_1_1_1_1_1_1_1_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 746};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_toordinal, __pyx_mstate->__pyx_kp_b_iso88591_A_JavQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 756};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_utc};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_toseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_1_JavQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 781};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_utc};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_tomicroseconds, __pyx_mstate->__pyx_kp_b_iso88591_A_0_IQfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 805};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_kp_b_iso88591_A_IQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 810};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_kp_b_iso88591_A_Kq_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 815};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_kp_b_iso88591_A_y_A_a_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 827};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_timetz, __pyx_mstate->__pyx_kp_b_iso88591_A_Kq_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 842};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_tzinfo, __pyx_mstate->__pyx_n_u_fold};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_replace, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_1_A_a_a_1_0_A8_4z_1A_1A_gU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 896};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_curr_year, __pyx_mstate->__pyx_kp_b_iso88591_A_1_QgV1_3d_Cs_T_a_4_Qa_d_G1_3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 947};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_prev_year, __pyx_mstate->__pyx_kp_b_iso88591_A_1_t82S_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 972};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_next_year, __pyx_mstate->__pyx_kp_b_iso88591_A_1_t81Cwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 997};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_year, __pyx_mstate->__pyx_kp_b_iso88591_A_1_7_Q_4_AWA_Ba_QgV1_3d_d_G1_3b, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1055};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_curr_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_1_6_1_4_Qa_d_q_q_2WG3bPQ_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1107};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_prev_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_1_t_b_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1128};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_next_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_1_t_as, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1149};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_1_7_Q_4_q_q_6_A_q_Bb_wc_1_Bg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1204};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_curr_month, __pyx_mstate->__pyx_kp_b_iso88591_A_q_4r_1_4r_Qj_at1_4s_k_1_q_L_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1245};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_prev_month, __pyx_mstate->__pyx_kp_b_iso88591_A_q_t9Bc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1259};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_next_month, __pyx_mstate->__pyx_kp_b_iso88591_A_q_t9AS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_month, __pyx_mstate->__pyx_kp_b_iso88591_A_0_a_7_Q_4_Qa_Ba_S_3b_3a_s_Cr_R, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1318};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_monday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1323};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_tuesday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1328};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_wednesday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1333};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_thursday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1338};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_friday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1343};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_saturday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1348};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_sunday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1353};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_curr_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_A_1IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1371};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_prev_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_b_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1389};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_next_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_as, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1407};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_66I_7_Q_4_7_A_4t1_D_oQ_t7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1455};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_yesterday, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1460};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_tomorrow, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1465};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_offset};
    __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_day, __pyx_mstate->__pyx_kp_b_iso88591_A_7_Q_1_q_hc_D_Q_A_q_E__F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1487};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_normalize, __pyx_mstate->__pyx_kp_b_iso88591_A_t81Cs_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1496};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond};
    __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_datetime, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_1_A_a_a_1_1A_gU_d_T_a_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1547};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_date, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_1_1_fG6_T_T_S_E_A_q_E_5EV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1574};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond};
    __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_time, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_a_1_1_t4s_d_TQVVW_A_q_E_5E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1609};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_first_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t_AQ_t3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1662};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_last_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t_AQ_t3a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1715};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_start_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t82T_S_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1830};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_to_end_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_q_E_gQa_9Cq_6_t3a_t82T_S_t_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1945};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_first_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_S_t3a_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1991};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_last_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_S_t3a_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2037};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_start_of, __pyx_mstate->__pyx_kp_b_iso88591_A_0_5_1_1_gQa_9Cq_6_t3a_t_c_A_t3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2133};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_end_of, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_1_gQa_9Cq_6_t3a_t_c_A_t3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2231};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_round, __pyx_mstate->__pyx_kp_b_iso88591_A_5_1_q_A_q_E_Q_2S_1_y_q_Qhc_1_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2267};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_ceil, __pyx_mstate->__pyx_kp_b_iso88591_A_q_E_Q_2S_1_y_q_Qhc_1_7_Q_1_nD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2295};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_unit};
    __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_floor, __pyx_mstate->__pyx_kp_b_iso88591_A_q_E_Q_2S_1_y_q_axs_A_7_Q_1_nD, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2324};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_precision};
    __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_fsp, __pyx_mstate->__pyx_kp_b_iso88591_A_S_1_Rq_q_E_131_S_D_A_y_q_axs_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2359};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_isocalendar, __pyx_mstate->__pyx_kp_b_iso88591_A_A_D_M_T_A_G84wk_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2372};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_isoyear, __pyx_mstate->__pyx_kp_b_iso88591_A_L_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2380};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_isoweek, __pyx_mstate->__pyx_kp_b_iso88591_A_L_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2388};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_isoweekday, __pyx_mstate->__pyx_kp_b_iso88591_A_O1_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2402};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_year, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2408};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year};
    __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_year, __pyx_mstate->__pyx_kp_b_iso88591_A_t_s_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2414};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_leap_year, __pyx_mstate->__pyx_kp_b_iso88591_A_M_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2420};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_long_year, __pyx_mstate->__pyx_kp_b_iso88591_A_M_l_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2429};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_year};
    __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_leap_bt_year, __pyx_mstate->__pyx_kp_b_iso88591_A_O1D_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2435};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_in_year, __pyx_mstate->__pyx_kp_b_iso88591_A_M_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2441};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_bf_year, __pyx_mstate->__pyx_kp_b_iso88591_A_M_l, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2447};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_day_of_year, __pyx_mstate->__pyx_kp_b_iso88591_A_L_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2461};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2467};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_quarter};
    __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_t_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2473};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_in_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2479};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_bf_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_T_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2487};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_day_of_quarter, __pyx_mstate->__pyx_kp_b_iso88591_A_O1_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2501};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_month, __pyx_mstate->__pyx_kp_b_iso88591_A_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2507};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_month};
    __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_month, __pyx_mstate->__pyx_kp_b_iso88591_A_t_3l_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2522};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_in_month, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4_4t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2528};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_days_bf_month, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4_4t_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2536};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_day_of_month, __pyx_mstate->__pyx_kp_b_iso88591_A_t_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2546};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_locale};
    __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_month_name, __pyx_mstate->__pyx_kp_b_iso88591_A_7_Q_Q_q_gXWA_A_q_E_5K6QR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2572};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_L_D_M_T_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2580};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_weekday, __pyx_mstate->__pyx_kp_b_iso88591_A_t_S_ay_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2595};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_locale};
    __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_weekday_name, __pyx_mstate->__pyx_kp_b_iso88591_A_A_7_Q_Q_q_gXWA_A_q_E_5MVST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2621};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_day, __pyx_mstate->__pyx_kp_b_iso88591_A_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2627};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_day};
    __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_day, __pyx_mstate->__pyx_kp_b_iso88591_A_t_c_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2639};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_hour, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2650};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_minute, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2661};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_second, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2672};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_millisecond, __pyx_mstate->__pyx_kp_b_iso88591_A_t_c_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2683};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_microsecond, __pyx_mstate->__pyx_kp_b_iso88591_A_AQ_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2712};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_tzinfo, __pyx_mstate->__pyx_kp_b_iso88591_A_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2726};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_access_fold, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2736};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_local, __pyx_mstate->__pyx_kp_b_iso88591_A_t_HIQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2745};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_utc, __pyx_mstate->__pyx_kp_b_iso88591_A_t_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2754};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_dst, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_y_Cz_V9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2764};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_tzname, __pyx_mstate->__pyx_kp_b_iso88591_A_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2772};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utcoffset, __pyx_mstate->__pyx_kp_b_iso88591_A_M_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2783};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_utcoffset_seconds, __pyx_mstate->__pyx_kp_b_iso88591_A_T_q_3c_1_q_A_xs_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2798};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_dst, __pyx_mstate->__pyx_kp_b_iso88591_A_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2808};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_astimezone, __pyx_mstate->__pyx_kp_b_iso88591_A_A_1A_N_6_T_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2825};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_tz_localize, __pyx_mstate->__pyx_kp_b_iso88591_A_1A_N_6_s_1_Q_9_1_avV4uA_3c_1_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2863};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_tz_convert, __pyx_mstate->__pyx_kp_b_iso88591_A_4_S_1_q_E_1_1A_3c_a_1KvWF_e1_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2900};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_targ_tz, __pyx_mstate->__pyx_n_u_base_tz, __pyx_mstate->__pyx_n_u_naive};
    __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_tz_switch, __pyx_mstate->__pyx_kp_b_iso88591_A_0_Q_Yaq_N_6_vS_N_6_t5_s_1_avV4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2976};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_years, __pyx_mstate->__pyx_n_u_quarters, __pyx_mstate->__pyx_n_u_months, __pyx_mstate->__pyx_n_u_weeks, __pyx_mstate->__pyx_n_u_days, __pyx_mstate->__pyx_n_u_hours, __pyx_mstate->__pyx_n_u_minutes_2, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_milliseconds, __pyx_mstate->__pyx_n_u_microseconds};
    __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_add, __pyx_mstate->__pyx_kp_b_iso88591_A_A_q_Q_A_1_A_a_a_1_1_Qa_z_y_q_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {11, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3015};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_years, __pyx_mstate->__pyx_n_u_quarters, __pyx_mstate->__pyx_n_u_months, __pyx_mstate->__pyx_n_u_weeks, __pyx_mstate->__pyx_n_u_days, __pyx_mstate->__pyx_n_u_hours, __pyx_mstate->__pyx_n_u_minutes_2, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_milliseconds, __pyx_mstate->__pyx_n_u_microseconds};
    __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_sub, __pyx_mstate->__pyx_kp_b_iso88591_A_A_q_Q_A_1_A_a_a_1_1_Qa_1HAWAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3054};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_dtobj, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_absolute, __pyx_mstate->__pyx_n_u_inclusive};
    __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_diff, __pyx_mstate->__pyx_kp_b_iso88591_A_Ja_vV7_vQ_A_q_E_5I_q_1_N_gQ_gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3279};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_past, __pyx_mstate->__pyx_kp_b_iso88591_A_uG7_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3289};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_is_future, __pyx_mstate->__pyx_kp_b_iso88591_A_uG7_4_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3326};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fmt};
    __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_format_2, __pyx_mstate->__pyx_kp_b_iso88591_ha_4s_s_s_4z_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3335};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_copy, __pyx_mstate->__pyx_kp_b_iso88591_G1_A_Q_1_A_a_a_1_a_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3349};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u__14};
    __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_deepcopy, __pyx_mstate->__pyx_kp_b_iso88591_iq_G1_A_Q_1_A_a_a_1_a_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3364};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_reduce, __pyx_mstate->__pyx_kp_b_iso88591_A_y_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 2, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3367};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_protocol};
    __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_reduce_ex, __pyx_mstate->__pyx_kp_b_iso88591_nA_y_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {9, 0, 1, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3381};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_hour, __pyx_mstate->__pyx_n_u_minute, __pyx_mstate->__pyx_n_u_second, __pyx_mstate->__pyx_n_u_microsecond, __pyx_mstate->__pyx_n_u_tzinfo, __pyx_mstate->__pyx_n_u_fold};
    __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_pydt_py, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_Q_a_Q_a_0_s_q_1_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* RaiseException */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* ModInt[long] */
static CYTHON_INLINE long __Pyx_mod_long(long a, long b, int b_is_constant) {
    long r = a % b;
    long adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* py_unicode_predicate */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_Py_UNICODE_ISALPHA(Py_UCS4 uchar) {
    int result;
    PyObject *py_result, *ustring;
    if (uchar < 170) {
        switch (uchar) {
            case (Py_UCS4)'A':
            case (Py_UCS4)'B':
            case (Py_UCS4)'C':
            case (Py_UCS4)'D':
            case (Py_UCS4)'E':
            case (Py_UCS4)'F':
            case (Py_UCS4)'G':
            case (Py_UCS4)'H':
            case (Py_UCS4)'I':
            case (Py_UCS4)'J':
            case (Py_UCS4)'K':
            case (Py_UCS4)'L':
            case (Py_UCS4)'M':
            case (Py_UCS4)'N':
            case (Py_UCS4)'O':
            case (Py_UCS4)'P':
            case (Py_UCS4)'Q':
            case (Py_UCS4)'R':
            case (Py_UCS4)'S':
            case (Py_UCS4)'T':
            case (Py_UCS4)'U':
            case (Py_UCS4)'V':
            case (Py_UCS4)'W':
            case (Py_UCS4)'X':
            case (Py_UCS4)'Y':
            case (Py_UCS4)'Z':
            case (Py_UCS4)'a':
            case (Py_UCS4)'b':
            case (Py_UCS4)'c':
            case (Py_UCS4)'d':
            case (Py_UCS4)'e':
            case (Py_UCS4)'f':
            case (Py_UCS4)'g':
            case (Py_UCS4)'h':
            case (Py_UCS4)'i':
            case (Py_UCS4)'j':
            case (Py_UCS4)'k':
            case (Py_UCS4)'l':
            case (Py_UCS4)'m':
            case (Py_UCS4)'n':
            case (Py_UCS4)'o':
            case (Py_UCS4)'p':
            case (Py_UCS4)'q':
            case (Py_UCS4)'r':
            case (Py_UCS4)'s':
            case (Py_UCS4)'t':
            case (Py_UCS4)'u':
            case (Py_UCS4)'v':
            case (Py_UCS4)'w':
            case (Py_UCS4)'x':
            case (Py_UCS4)'y':
            case (Py_UCS4)'z':
            return 1;
        }
        return 0;
    }
    ustring = PyUnicode_FromOrdinal(uchar);
    if (!ustring) goto bad;
    py_result = PyObject_CallMethod(ustring, "isalpha", NULL);
    Py_DECREF(ustring);
    if (!py_result) goto bad;
    result = PyObject_IsTrue(py_result);
    Py_DECREF(py_result);
    if (result == -1) goto bad;
    return result != 0;
bad:
    PyErr_Clear();
    return 0;
}
#endif

/* CIntToDigits (used by CIntToPyUnicode) */
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 (used by COrdinalToPyUnicode) */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const 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;
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
    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 = PySequence_Repeat(padding, uoffset - prepend_sign);
                    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 = PyUnicode_Concat(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyUnicode_Concat(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* COrdinalToPyUnicode (used by CIntToPyUnicode) */
static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) {
    return value <= 1114111;
}
static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) {
    Py_ssize_t padding_length = ulength - 1;
    if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) {
        char chars[256];
        if (value <= 255) {
            memset(chars, padding_char, (size_t) padding_length);
            chars[ulength-1] = (char) value;
            return PyUnicode_DecodeLatin1(chars, ulength, NULL);
        }
        char *cpos = chars + sizeof(chars);
        if (value < 0x800) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xc0 | (value & 0x1f));
        } else if (value < 0x10000) {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xe0 | (value & 0x0f));
        } else {
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0x80 | (value & 0x3f));
            value >>= 6;
            *--cpos = (char) (0xf0 | (value & 0x07));
        }
        cpos -= padding_length;
        memset(cpos, padding_char, (size_t) padding_length);
        return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL);
    }
    if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) {
        const char chars[1] = {(char) value};
        return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char);
    }
    {
        PyObject *uchar, *padding_uchar, *padding, *result;
        padding_uchar = PyUnicode_FromOrdinal(padding_char);
        if (unlikely(!padding_uchar)) return NULL;
        padding = PySequence_Repeat(padding_uchar, padding_length);
        Py_DECREF(padding_uchar);
        if (unlikely(!padding)) return NULL;
        uchar = PyUnicode_FromOrdinal(value);
        if (unlikely(!uchar)) {
            Py_DECREF(padding);
            return NULL;
        }
        result = PyUnicode_Concat(padding, uchar);
        Py_DECREF(padding);
        Py_DECREF(uchar);
        return result;
    }
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 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 = (Py_ssize_t) (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 = (Py_ssize_t) (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 = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    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);
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    if (max_char > 1114111) max_char = 1114111;
    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;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0))
        goto overflow;
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = values[i];
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (__Pyx_PyUnicode_READY(uval) == (-1))
            goto bad;
        #endif
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(ulength < 0)) goto bad;
        #endif
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON || 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
    Py_ssize_t i;
    PyObject *result = NULL;
    PyObject *value_tuple = PyTuple_New(value_count);
    if (unlikely(!value_tuple)) return NULL;
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    for (i=0; i<value_count; i++) {
        if (__Pyx_PyTuple_SET_ITEM(value_tuple, i, values[i]) != (0)) goto bad;
        Py_INCREF(values[i]);
    }
    result = PyUnicode_Join(__pyx_mstate_global->__pyx_empty_unicode, value_tuple);
bad:
    Py_DECREF(value_tuple);
    return result;
#endif
}

/* PyUnicode_Substring */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring(
            PyObject* text, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length;
    #if !CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL;
    #endif
    length = __Pyx_PyUnicode_GET_LENGTH(text);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(length < 0)) return NULL;
    #endif
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    if (stop <= start)
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode);
    if (start == 0 && stop == length)
        return __Pyx_NewRef(text);
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyUnicode_Substring(text, start, stop);
#else
    return PyUnicode_FromKindAndData(PyUnicode_KIND(text),
        PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start);
#endif
}

/* PyUnicode_Unicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
    if (unlikely(obj == Py_None))
        obj = __pyx_mstate_global->__pyx_kp_u_None;
    return __Pyx_NewRef(obj);
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* PyObjectCallOneArg (used by CallUnboundCMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by ParseKeywordsImpl) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* ArgTypeTestFunc (used by ArgTypeTest) */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode;
    int from_annotation_subclass = 0;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (!exact) {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    } else if (exact == 2) {
        if (__Pyx_TypeCheck(obj, type)) {
            from_annotation_subclass = 1;
            extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately;
        }
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")"
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        "%s%U"
#endif
        , name, type_name, obj_type_name
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
        , (from_annotation_subclass ? ". " : ""), extra_info
#endif
        );
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    if (exact == 2 && from_annotation_subclass) {
        PyObject *res;
        PyObject *vargs[2];
        vargs[0] = PyErr_GetRaisedException();
        vargs[1] = extra_info;
        res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL);
        Py_XDECREF(res);
        PyErr_SetRaisedException(vargs[0]);
    }
#endif
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* ModInt[PY_LONG_LONG] */
static CYTHON_INLINE PY_LONG_LONG __Pyx_mod_PY_LONG_LONG(PY_LONG_LONG a, PY_LONG_LONG b, int b_is_constant) {
    PY_LONG_LONG r = a % b;
    PY_LONG_LONG adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __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(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* PyObjectVectorCallKwBuilder */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result;
    if (unlikely(!s)) return NULL;
    result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____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));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    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);
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (PY_LONG_LONG) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_PY_LONG_LONG(PY_LONG_LONG value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(PY_LONG_LONG)*3+2];
    char *dpos, *end = digits + sizeof(PY_LONG_LONG)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    PY_LONG_LONG remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_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 = (PY_LONG_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 = (PY_LONG_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 = (PY_LONG_LONG) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    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);
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (npy_intp) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) {
        PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)");
        return NULL;
    }
    if (width <= 1) {
        return PyUnicode_FromOrdinal((int) value);
    }
    return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char);
}
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_npy_intp(npy_intp value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(npy_intp)*3+2];
    char *dpos, *end = digits + sizeof(npy_intp)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    npy_intp remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 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 = (npy_intp) (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 = (npy_intp) (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 = (npy_intp) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    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[npy_int64] */
static CYTHON_INLINE npy_int64 __Pyx_mod_npy_int64(npy_int64 a, npy_int64 b, int b_is_constant) {
    npy_int64 r = a % b;
    npy_int64 adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return r + adapt_python * b;
}

/* DivInt[npy_int64] */
static CYTHON_INLINE npy_int64 __Pyx_div_npy_int64(npy_int64 a, npy_int64 b, int b_is_constant) {
    npy_int64 q = a / b;
    npy_int64 r = a - q*b;
    npy_int64 adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON
static int
__Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared)
{
    if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared))
        return 0;
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000
    if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1)
        return 0;
#endif
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left, unsafe_shared)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* pybytes_as_double (used by pyobject_as_double) */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value = PyFloat_FromString(obj);
    if (likely(float_value)) {
        double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    int parse_error_found = 0;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        parse_error_found |= last_was_punctuation & is_punctuation;
        last_was_punctuation = is_punctuation;
    }
    parse_error_found |= last_was_punctuation;
    *buffer = '\0';
    return unlikely(parse_error_found) ? NULL : buffer;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    if (PyUnicode_CheckExact(obj)) {
        return __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        return __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        return __Pyx_PyByteArray_AsDouble(obj);
    } else {
        PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
        float_value = PyNumber_Float(obj);  if ((0)) goto bad;
        (void)__Pyx_PyObject_CallOneArg;
#else
        PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
        if (likely(nb) && likely(nb->nb_float)) {
            float_value = nb->nb_float(obj);
            if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
                __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(float_value));
                PyErr_Format(PyExc_TypeError,
                    "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")",
                    float_value_type_name);
                __Pyx_DECREF_TypeName(float_value_type_name);
                Py_DECREF(float_value);
                goto bad;
            }
        } else {
            float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj);
        }
#endif
        if (likely(float_value)) {
            double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
            Py_DECREF(float_value);
            return value;
        }
    }
bad:
    return (double)-1;
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b, int b_is_constant) {
    long q = a / b;
    long r = a - q*b;
    long adapt_python = (b_is_constant ?
        ((r != 0) & ((r < 0) ^ (b < 0))) :
        ((r != 0) & ((r ^ b) < 0))
    );
    return q - adapt_python;
}

/* pybuiltin_invalid (used by pyint_simplify) */
static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) {
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    if (argname) {
        PyErr_Format(PyExc_TypeError,
            "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")",
            argname, type_name, obj_type_name
        );
    } else {
        PyErr_Format(PyExc_TypeError,
            "Expected %.200s, got " __Pyx_FMT_TYPENAME,
            type_name, obj_type_name
        );
    }
    __Pyx_DECREF_TypeName(obj_type_name);
}

/* pyint_simplify */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) {
    PyObject *number = *number_var;
    if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) {
        return 0;
    }
    PyObject *int_object;
    if (likely(PyNumber_Check(number))) {
        int_object = PyNumber_Long(number);
        if (unlikely(!int_object)) goto bad;
    } else {
        __Pyx_PyBuiltin_Invalid(number, "int", argname);
        goto bad;
    }
    *number_var = int_object;
    Py_DECREF(number);
    return 0;
bad:
    *number_var = NULL;
    Py_DECREF(number);
    return -1;
}

/* CallNextTpDealloc */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    destructor tp_dealloc = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type)
        tp_dealloc(obj);
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    traverseproc tp_traverse = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_traverse)
        return tp_traverse(obj, v, a);
    return 0;
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    inquiry tp_clear = NULL;
    while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
        type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
    if (type && tp_clear)
        tp_clear(obj);
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_1
#define __PYX_HAVE_RT_ImportType_3_2_1
static PyTypeObject *__Pyx_ImportType_3_2_1(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_1 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_1 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_1 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* FormatTypeName (used by ValidateExternBase) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__15);
    }
    goto done;
}
#endif

/* ValidateExternBase */
static int __Pyx_validate_extern_base(PyTypeObject *base) {
    Py_ssize_t itemsize;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_itemsize;
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    itemsize = ((PyTypeObject *)base)->tp_itemsize;
#else
    py_itemsize = PyObject_GetAttrString((PyObject*)base, "__itemsize__");
    if (!py_itemsize)
        return -1;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        return -1;
#endif
    if (itemsize) {
        __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(base);
        PyErr_Format(PyExc_TypeError,
                "inheritance from PyVarObject types like '" __Pyx_FMT_TYPENAME "' not currently supported", b_name);
        __Pyx_DECREF_TypeName(b_name);
        return -1;
    }
    return 0;
}

/* PyObjectCallNoArg (used by PyObjectCallMethod0) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod (used by PyObjectCallMethod0) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* SetVTable */
static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (unlikely(!ob))
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#else
    if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0))
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable (used by MergeVTables) */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    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;
}

/* MergeVTables */
static int __Pyx_MergeVtables(PyTypeObject *type) {
    int i=0;
    Py_ssize_t size;
    void** base_vtables;
    __Pyx_TypeName tp_base_name = NULL;
    __Pyx_TypeName base_name = NULL;
    void* unknown = (void*)-1;
    PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*);
    int base_depth = 0;
    {
        PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        while (base) {
            base_depth += 1;
            base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
        }
    }
    base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1));
    base_vtables[0] = unknown;
#if CYTHON_COMPILING_IN_LIMITED_API
    size = PyTuple_Size(bases);
    if (size < 0) goto other_failure;
#else
    size = PyTuple_GET_SIZE(bases);
#endif
    for (i = 1; i < size; i++) {
        PyObject *basei;
        void* base_vtable;
#if CYTHON_AVOID_BORROWED_REFS
        basei = PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto other_failure;
#else
        basei = PyTuple_GET_ITEM(bases, i);
#endif
        base_vtable = __Pyx_GetVtable((PyTypeObject*)basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
        if (base_vtable != NULL) {
            int j;
            PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
            for (j = 0; j < base_depth; j++) {
                if (base_vtables[j] == unknown) {
                    base_vtables[j] = __Pyx_GetVtable(base);
                    base_vtables[j + 1] = unknown;
                }
                if (base_vtables[j] == base_vtable) {
                    break;
                } else if (base_vtables[j] == NULL) {
                    goto bad;
                }
                base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*);
            }
        }
    }
    PyErr_Clear();
    PyMem_Free(base_vtables);
    return 0;
bad:
    {
        PyTypeObject* basei = NULL;
        PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
        tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base);
#if CYTHON_AVOID_BORROWED_REFS
        basei = (PyTypeObject*)PySequence_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#elif !CYTHON_ASSUME_SAFE_MACROS
        basei = (PyTypeObject*)PyTuple_GetItem(bases, i);
        if (unlikely(!basei)) goto really_bad;
#else
        basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i);
#endif
        base_name = __Pyx_PyType_GetFullyQualifiedName(basei);
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(basei);
#endif
    }
    PyErr_Format(PyExc_TypeError,
        "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
really_bad: // bad has failed!
#endif
    __Pyx_DECREF_TypeName(tp_base_name);
    __Pyx_DECREF_TypeName(base_name);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS
other_failure:
#endif
    PyMem_Free(base_vtables);
    return -1;
}

/* PxdImportShared (used by VoidPtrImport) */
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_1
#define __PYX_HAVE_RT_ImportFromPxd_3_2_1
static int __Pyx_ImportFromPxd_3_2_1(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_1
#define __PYX_HAVE_RT_ImportVoidPtr_3_2_1
static int __Pyx_ImportVoidPtr_3_2_1(PyObject *module, const char *name, void **p, const char *sig) {
    return __Pyx_ImportFromPxd_3_2_1(module, name, p, sig, "variable");
}
#endif

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_3_2_1
#define __PYX_HAVE_RT_ImportFunction_3_2_1
static int __Pyx_ImportFunction_3_2_1(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    int result = __Pyx_ImportFromPxd_3_2_1(module, funcname, &tmp.p, sig, "function");
    if (result == 0) {
        *f = tmp.fp;
    }
    return result;
}
#endif

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#elif PY_VERSION_HEX >= 0x030d0000
    PyDict_SetDefaultRef(d, key, default_value, &value);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__2);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* ListPack */
static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) {
    va_list va;
    PyObject *l = PyList_New(n);
    va_start(va, n);
    if (unlikely(!l)) goto end;
    for (Py_ssize_t i=0; i<n; ++i) {
        PyObject *arg = va_arg(va, PyObject*);
        Py_INCREF(arg);
        if (__Pyx_PyList_SET_ITEM(l, i, arg) != (0)) {
            Py_CLEAR(l);
            goto end;
        }
    }
    end:
    va_end(va);
    return l;
}

/* 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_PYPY
    if (PyMethodDescr_Check(method))
#else
    if (__Pyx_TypeCheck(method, &PyMethodDescr_Type))
#endif
    {
#if CYTHON_COMPILING_IN_LIMITED_API
        return PyErr_Format(
            PyExc_SystemError,
            "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. "
            "This is most likely a classmethod in a cdef class method with binding=False. "
            "Try setting 'binding' to True.",
            method);
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
        PyTypeObject *d_type = GraalPyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method));
#elif CYTHON_COMPILING_IN_GRAAL
        PyTypeObject *d_type = PyDescrObject_GetType(method);
        return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method));
#else
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        PyTypeObject *d_type = descr->d_common.d_type;
        return PyDescr_NewClassMethod(d_type, descr->d_method);
#endif
    }
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
#else
    {
        PyObject *func=NULL;
        PyObject *builtins, *classmethod, *classmethod_str, *result=NULL;
        if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) {
            func = PyObject_GetAttrString(method, "__func__");
            if (!func) goto bad;
        } else {
            func = method;
            Py_INCREF(func);
        }
        builtins = PyEval_GetBuiltins(); // borrowed
        if (unlikely(!builtins)) goto bad;
        classmethod_str = PyUnicode_FromString("classmethod");
        if (unlikely(!classmethod_str)) goto bad;
        classmethod = PyObject_GetItem(builtins, classmethod_str);
        Py_DECREF(classmethod_str);
        if (unlikely(!classmethod)) goto bad;
        result = PyObject_CallFunctionObjArgs(classmethod, func, NULL);
        Py_DECREF(classmethod);
        bad:
        Py_XDECREF(func);
        return result;
    }
#endif
}

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
#if CYTHON_ASSUME_SAFE_SIZE
    size_bases = PyTuple_GET_SIZE(bases);
#else
    size_bases = PyTuple_Size(bases);
    if (size_bases < 0) return NULL;
#endif
    for (i = 0; i < size_bases; i++) {
#if CYTHON_AVOID_BORROWED_REFS
        Py_CLEAR(base);
#endif
#if CYTHON_ASSUME_SAFE_MACROS
        base = PyTuple_GET_ITEM(bases, i);
#else
        base = PyTuple_GetItem(bases, i);
        if (!base) goto error;
#endif
#if CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(base);
#endif
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                PyObject *base_from_list;
#if CYTHON_ASSUME_SAFE_MACROS
                base_from_list = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base_from_list);
                Py_INCREF(base_from_list);
#else
                base_from_list = PyTuple_GetItem(bases, j);
                if (!base_from_list) goto error;
                Py_INCREF(base_from_list);
                if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
#endif
            }
        }
#if CYTHON_ASSUME_SAFE_SIZE
        j = PyList_GET_SIZE(new_bases);
#else
        j = PyList_Size(new_bases);
        if (j < 0) goto error;
#endif
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return result;
error:
    Py_XDECREF(new_bases);
#if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(base);
#endif
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_SIZE
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
        metaclass = &PyType_Type;
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* SetNewInClass */
static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
#ifdef __Pyx_CyFunction_USED
    int ret;
    if (__Pyx_CyFunction_Check(value)) {
        PyObject *staticnew;
#if !CYTHON_COMPILING_IN_LIMITED_API
        staticnew = PyStaticMethod_New(value);
#else
        PyObject *builtins, *staticmethod_str, *staticmethod;
        builtins = PyEval_GetBuiltins(); // borrowed
        if (!builtins) return -1;
        staticmethod_str = PyUnicode_FromStringAndSize("staticmethod", 12);
        if (!staticmethod_str) return -1;
        staticmethod = PyObject_GetItem(builtins, staticmethod_str);
        Py_DECREF(staticmethod_str);
        if (!staticmethod) return -1;
        staticnew = PyObject_CallFunctionObjArgs(staticmethod, value, NULL);
        Py_DECREF(staticmethod);
#endif
        if (unlikely(!staticnew)) return -1;
        ret = __Pyx_SetNameInClass(ns, name, staticnew);
        Py_DECREF(staticnew);
        return ret;
    }
#endif
    return __Pyx_SetNameInClass(ns, name, value);
}

/* PyObjectCall2Args (used by Py3ClassCreate) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectLookupSpecial (used by Py3ClassCreate) */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            code_cache->count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #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 && (1) && (!0 || __cplusplus)
#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) && (a.real >= 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 && (1) && (!0 || __cplusplus)
  #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 && (1) && (!0 || __cplusplus)
#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) && (a.real >= 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

/* Declarations */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      return ::std::complex< long double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      return x + y*(__pyx_t_long_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
      __pyx_t_long_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
#else
    static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        __pyx_t_long_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_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsl(b.real) >= fabsl(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                long double r = b.imag / b.real;
                long double s = (long double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_long_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            long double r = b.real / b.imag;
            long double s = (long double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_long_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            long double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_long_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_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
        __pyx_t_long_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
        __pyx_t_long_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtl(z.real*z.real + z.imag*z.imag);
          #else
            return hypotl(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
            __pyx_t_long_double_complex z;
            long double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    long 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_long__double(a, a);
                    case 3:
                        z = __Pyx_c_prod_long__double(a, a);
                        return __Pyx_c_prod_long__double(z, a);
                    case 4:
                        z = __Pyx_c_prod_long__double(a, a);
                        return __Pyx_c_prod_long__double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if ((b.imag == 0) && (a.real >= 0)) {
                    z.real = powl(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2l(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_long__double(a);
                theta = atan2l(a.imag, a.real);
            }
            lnr = logl(r);
            z_r = expl(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosl(z_theta);
            z.imag = z_r * sinl(z_theta);
            return z;
        }
    #endif
#endif

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyLong_As_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyLong_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) >= 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (PY_LONG_LONG) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(PY_LONG_LONG) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
        } else if ((sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        PY_LONG_LONG val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (PY_LONG_LONG) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (PY_LONG_LONG) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (PY_LONG_LONG) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (PY_LONG_LONG) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((PY_LONG_LONG) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((PY_LONG_LONG) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((PY_LONG_LONG) 1) << (sizeof(PY_LONG_LONG) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (PY_LONG_LONG) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_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(PY_LONG_LONG) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PY_LONG_LONG));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_intp(npy_intp value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 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_intp) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(npy_intp) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_intp) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(npy_intp),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(npy_intp));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE npy_intp __Pyx_PyLong_As_npy_intp(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_intp neg_one = (npy_intp) -1, const_zero = (npy_intp) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        npy_intp val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (npy_intp) -1;
        val = __Pyx_PyLong_As_npy_intp(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(npy_intp, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(npy_intp) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) >= 2 * PyLong_SHIFT)) {
                            return (npy_intp) (((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_intp) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) >= 3 * PyLong_SHIFT)) {
                            return (npy_intp) (((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_intp) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, 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_intp) >= 4 * PyLong_SHIFT)) {
                            return (npy_intp) (((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (npy_intp) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(npy_intp) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(npy_intp) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(npy_intp, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(npy_intp) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(npy_intp) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(npy_intp) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_intp) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((((npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(npy_intp) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, 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_intp) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_intp) (((npy_intp)-1)*(((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_intp) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_intp, 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_intp) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_intp) ((((((((((npy_intp)digits[3]) << PyLong_SHIFT) | (npy_intp)digits[2]) << PyLong_SHIFT) | (npy_intp)digits[1]) << PyLong_SHIFT) | (npy_intp)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(npy_intp) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, long, PyLong_AsLong(x))
        } else if ((sizeof(npy_intp) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_intp, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        npy_intp val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (npy_intp) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (npy_intp) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (npy_intp) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (npy_intp) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(npy_intp) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((npy_intp) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(npy_intp) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((npy_intp) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((npy_intp) 1) << (sizeof(npy_intp) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (npy_intp) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_intp");
    return (npy_intp) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_intp");
    return (npy_intp) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) return NULL;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_TypeError,
                      "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
