/* Generated by Cython 3.2.1 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "NPY_1_7_API_VERSION"
            ]
        ],
        "depends": [
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h",
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h",
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h"
        ],
        "extra_compile_args": [
            "-Wno-unreachable-code"
        ],
        "include_dirs": [
            "/tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/_core/include"
        ],
        "name": "cytimes.utils",
        "sources": [
            "src/cytimes/utils.py"
        ]
    },
    "module_name": "cytimes.utils"
}
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__utils
#define __PYX_HAVE_API__cytimes__utils
/* Early includes */
#include <string.h>
#include <stdio.h>

    /* 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 <stddef.h>
#include <time.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
    

    #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
    
#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/utils.py",
  "../../../../../tmp/build-env-l6e_or8s/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd",
  "cpython/contextvars.pxd",
  "datetime.pxd",
  "cpython/time.pxd",
  "src/cytimes/utils.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_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;

/* "cytimes/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;
};

/* "cytimes/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;
};

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

/* "cytimes/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;
};

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

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};

/* "cytimes/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;
};
/* #### 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);

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

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

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

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

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

/* AssertionsEnabled.proto */
#if CYTHON_COMPILING_IN_LIMITED_API  ||  PY_VERSION_HEX >= 0x030C0000
  static int __pyx_assertions_enabled_flag;
  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
  static int __Pyx_init_assertions_enabled(void) {
    PyObject *builtins, *debug, *debug_str;
    int flag;
    builtins = PyEval_GetBuiltins();
    if (!builtins) goto bad;
    debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    if (!debug_str) goto bad;
    debug = PyObject_GetItem(builtins, debug_str);
    Py_DECREF(debug_str);
    if (!debug) goto bad;
    flag = PyObject_IsTrue(debug);
    Py_DECREF(debug);
    if (flag == -1) goto bad;
    __pyx_assertions_enabled_flag = flag;
    return 0;
  bad:
    __pyx_assertions_enabled_flag = 1;
    return -1;
  }
#else
  #define __Pyx_init_assertions_enabled()  (0)
  #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
#endif

/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
    int result = PyUnicode_Contains(text, substring);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

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

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

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

/* CIntToPyUnicode.proto */
#define __Pyx_PyUnicode_From_long(value, width, padding_char, format_char) (\
    ((format_char) == ('c')) ?\
        __Pyx_uchar___Pyx_PyUnicode_From_long(value, width, padding_char) :\
        __Pyx____Pyx_PyUnicode_From_long(value, width, padding_char, format_char)\
    )
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char);
static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char);

/* CBIntToPyUnicode.proto */
#define __Pyx_PyUnicode_FromBInt_bint(value)\
    ((value) ? __Pyx_NewRef(__pyx_mstate_global->__pyx_n_u_True) : __Pyx_NewRef(__pyx_mstate_global->__pyx_n_u_False))

/* PyRange_Check.proto */
#if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check)
  #define PyRange_Check(obj)  __Pyx_TypeCheck((obj), &PyRange_Type)
#endif

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

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

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

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

/* PyLongCompare.proto */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

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

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

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

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

/* PyLongBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

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

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #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_ListComp_Append(L,x) PyList_Append(L,x)
#endif

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

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

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

/* VoidPtrExport.proto */
static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig);

/* GetApiDict.proto */
static PyObject *__Pyx_ApiExport_GetApiDict(void);

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

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

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

/* 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 (used by FetchCommonType) */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

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

/* CallTypeTraverse.proto (used by CythonFunctionShared) */
#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

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

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

static PyObject* __pyx_convert__to_py___pyx_t_7cytimes_5utils_ymd(__pyx_t_7cytimes_5utils_ymd s);
static PyObject* __pyx_convert__to_py_struct__tm(struct tm s);
static PyObject* __pyx_convert__to_py___pyx_t_7cytimes_5utils_hmsf(__pyx_t_7cytimes_5utils_hmsf s);
/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from "cython" */

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

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

/* Module declarations from "__builtin__" */

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

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

/* 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 "__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 "cpython.object" */

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

/* 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 "libc.limits" */

/* Module declarations from "libc" */

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

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

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

/* 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_get_utc(void); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cpython_8datetime_datetime_tzinfo(PyObject *); /*proto*/

/* 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_v_7cytimes_5utils_DAYS_BR_MONTH[13];
static int __pyx_v_7cytimes_5utils_DAYS_IN_MONTH[13];
static int __pyx_v_7cytimes_5utils_DAYS_BR_QUARTER[5];
static int __pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[5];
static PyObject *__pyx_v_7cytimes_5utils_NAT = 0;
static int __pyx_v_7cytimes_5utils_ORDINAL_MAX;
static PyDateTime_DateTime *__pyx_v_7cytimes_5utils_EPOCH_DT = 0;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_YEAR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_MONTH;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_HOUR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_MINUTE;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_MILLISECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_MICROSECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_C4;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_C100;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_C400;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_EPOCH_CBASE;
static PyDateTime_TZInfo *__pyx_v_7cytimes_5utils_UTC = 0;
static PyObject *__pyx_v_7cytimes_5utils_T_TIMEZONE = 0;
static PyObject *__pyx_v_7cytimes_5utils_T_ZONEINFO = 0;
static int __pyx_v_7cytimes_5utils_NULL_TZOFFSET;
static PyObject *__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE = 0;
static PyObject *__pyx_v_7cytimes_5utils__UTC_ALIASES = 0;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_SS_MINUTE;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_SS_HOUR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_SS_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_MS_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_MS_MINUTE;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_MS_HOUR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_MS_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_US_MILLISECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_US_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_US_MINUTE;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_US_HOUR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_US_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_MICROSECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_MILLISECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_MINUTE;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_HOUR;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_NS_DAY;
static double __pyx_v_7cytimes_5utils_TD64_YY_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_YY_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND;
static double __pyx_v_7cytimes_5utils_TD64_MM_DAY;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_MM_SECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_US_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_US_MAX;
static PY_LONG_LONG __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_YY = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_MM = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_WW = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_DD = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_HH = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_MI = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_SS = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_MS = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_US = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_NS = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_PS = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_FS = 0;
static PyObject *__pyx_v_7cytimes_5utils_DT64_DTYPE_AS = 0;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_US;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_PS;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_FS;
static int __pyx_v_7cytimes_5utils_DT_NPY_UNIT_AS;
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_mod(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_mod *__pyx_optional_args); /*proto*/
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_up(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_up *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_math_div_down(PY_LONG_LONG, PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_math_div_down *__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_is_str_iso_sep(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_iso_sep *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_date_sep(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_date_sep *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_time_sep(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_time_sep *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_isoweek_sep(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_isoweek_sep *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_ctl_or_space *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_digits(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_digits *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_upper *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters_lower *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_ascii_letters(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_ascii_letters *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_str_alphas(PyObject *, struct __pyx_opt_args_7cytimes_5utils_is_str_alphas *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_numeric_kind(PyObject *, struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoyear(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isoyear *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isomonth(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isomonth *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoday(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isoday *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweek(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isoweek *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isoweekday(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isoweekday *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isodoy(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isodoy *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isohour(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isohour *__pyx_optional_args); /*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_parse_isosecond(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isosecond *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_parse_isofraction(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_isofraction *__pyx_optional_args); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_sf __pyx_f_7cytimes_5utils_parse_second_and_fraction(PyObject *, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_parse_second_and_fraction *__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 double __pyx_f_7cytimes_5utils_slice_to_ufloat(PyObject *, Py_ssize_t, Py_ssize_t, struct __pyx_opt_args_7cytimes_5utils_slice_to_ufloat *__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 struct tm __pyx_f_7cytimes_5utils_tm_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE struct tm __pyx_f_7cytimes_5utils_tm_fr_sec(double); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_us(PY_LONG_LONG); /*proto*/
static CYTHON_INLINE __pyx_t_7cytimes_5utils_hmsf __pyx_f_7cytimes_5utils_hmsf_fr_sec(double); /*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 __pyx_t_7cytimes_5utils_dtm __pyx_f_7cytimes_5utils_dtm_fr_sec(double); /*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 int __pyx_f_7cytimes_5utils_is_date_exact(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_strformat(PyDateTime_Date *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_date_isoformat(PyDateTime_Date *); /*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_us(PyDateTime_Date *); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_date_to_sec(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_us(PY_LONG_LONG, struct __pyx_opt_args_7cytimes_5utils_date_fr_us *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_sec(double, struct __pyx_opt_args_7cytimes_5utils_date_fr_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ord(int, struct __pyx_opt_args_7cytimes_5utils_date_fr_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Date *__pyx_f_7cytimes_5utils_date_fr_ts(double, struct __pyx_opt_args_7cytimes_5utils_date_fr_ts *__pyx_optional_args); /*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 int __pyx_f_7cytimes_5utils_is_dt_exact(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 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 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_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_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 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_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 PyDateTime_Time *__pyx_f_7cytimes_5utils_time_now(struct __pyx_opt_args_7cytimes_5utils_time_now *__pyx_optional_args); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_7cytimes_5utils_is_time_exact(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_time_isoformat(PyDateTime_Time *, struct __pyx_opt_args_7cytimes_5utils_time_isoformat *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PY_LONG_LONG __pyx_f_7cytimes_5utils_time_to_us(PyDateTime_Time *); /*proto*/
static CYTHON_INLINE double __pyx_f_7cytimes_5utils_time_to_sec(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_sec(double, struct __pyx_opt_args_7cytimes_5utils_time_fr_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Time *__pyx_f_7cytimes_5utils_time_fr_time(PyDateTime_Time *, struct __pyx_opt_args_7cytimes_5utils_time_fr_time *__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 int __pyx_f_7cytimes_5utils_is_td_exact(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_td_isoformat(PyDateTime_Delta *); /*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 double __pyx_f_7cytimes_5utils_td_to_sec(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 PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_sec(double, struct __pyx_opt_args_7cytimes_5utils_td_fr_sec *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyDateTime_Delta *__pyx_f_7cytimes_5utils_td_fr_td(PyDateTime_Delta *, struct __pyx_opt_args_7cytimes_5utils_td_fr_td *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_7cytimes_5utils_tz_new(struct __pyx_opt_args_7cytimes_5utils_tz_new *__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 CYTHON_INLINE int __pyx_f_7cytimes_5utils_tz_local_sec(struct __pyx_opt_args_7cytimes_5utils_tz_local_sec *__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 int __pyx_f_7cytimes_5utils_is_tz_exact(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_is_arr(PyObject *); /*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_up_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_up_mul *__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_down_mul(PyArrayObject *, npy_int64, npy_int64, struct __pyx_opt_args_7cytimes_5utils_arr_div_down_mul *__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_year(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_year *__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_weekday(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_weekday *__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(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 *__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_to_ord(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_to_ord *__pyx_optional_args); /*proto*/
static CYTHON_INLINE PyArrayObject *__pyx_f_7cytimes_5utils_dt64arr_as_unit(PyArrayObject *, PyObject *, struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit *__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_as_int64_us(PyArrayObject *, struct __pyx_opt_args_7cytimes_5utils_td64arr_as_int64_us *__pyx_optional_args); /*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*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "cytimes.utils"
extern int __pyx_module_is_main_cytimes__utils;
int __pyx_module_is_main_cytimes__utils = 0;

/* Implementation of "cytimes.utils" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_print;
/* #### 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_5utils_4_get_local_timezone(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_6_get_zoneinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_8_test_utils(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_10_test_parser(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_12_test_localtime_n_gmtime(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_14_test_is_leap_year(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_16_test_days_bf_year(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_18_test_doy(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_20_test_quarter_of_month(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_22_test_days_in_quarter(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_24_test_days_in_month(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_26_test_days_bf_month(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_28_test_weekday(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_30_test_isocalendar(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_32_test_iso_week1_mon_ord(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_34_test_ymd_to_ord(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_36_test_ymd_fr_ord(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_38_test_ymd_fr_iso(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_40_test_date_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_42_test_date_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_44_test_date_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_46_test_dt_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_48_test_dt_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_50_test_dt_tzinfo(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_52_test_dt_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_54_test_dt_mainipulate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_56_test_dt_arithmetic(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_58_test_dt_normalize_tz(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_60_test_time_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_62_test_time_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_64_test_time_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_66_test_timedelta_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_68_test_timedelta_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_70_test_timedelta_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_72_test_tzinfo_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_74_test_tzinfo_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_76_test_tzinfo_access(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_78_test_numpy_share(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_80_test_datetime64_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_82_test_datetime64_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_84_test_timedelta64_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_86_test_timedelta64_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_88_test_ndarray_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_90_test_ndarray_generate(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_92_test_ndarray_dt64_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_94_test_ndarray_dt64_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_96_test_ndarray_td64_type_check(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_98_test_ndarray_td64_conversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_100_test_math(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_102_test_ndarray_math(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_104_test_sec_to_us(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_106_cross_test_with_ndarray(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_108_test_slice_to_uint(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7cytimes_5utils_110_test_slice_to_ufloat(CYTHON_UNUSED PyObject *__pyx_self); /* 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_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_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;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type__lower;
  PyObject *__pyx_tuple[175];
  PyObject *__pyx_codeobj_tab[56];
  PyObject *__pyx_string_tab[782];
  PyObject *__pyx_number_tab[142];
/* #### 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_00_00_01 __pyx_string_tab[1]
#define __pyx_kp_u_00_00_01_2 __pyx_string_tab[2]
#define __pyx_kp_u_00_01_01 __pyx_string_tab[3]
#define __pyx_kp_u_00_01_01_2 __pyx_string_tab[4]
#define __pyx_kp_u_01 __pyx_string_tab[5]
#define __pyx_kp_u_0101 __pyx_string_tab[6]
#define __pyx_kp_u_0101_2 __pyx_string_tab[7]
#define __pyx_kp_u_0123456789 __pyx_string_tab[8]
#define __pyx_kp_u_01_02_2021 __pyx_string_tab[9]
#define __pyx_kp_u_01_02_2021_000006_05_04_03 __pyx_string_tab[10]
#define __pyx_kp_u_01_02_2021_000006_05_04_03UTC_01 __pyx_string_tab[11]
#define __pyx_kp_u_01_02_2021_000006_05_04_03_0101 __pyx_string_tab[12]
#define __pyx_kp_u_02d __pyx_string_tab[13]
#define __pyx_kp_u_02d_02d __pyx_string_tab[14]
#define __pyx_kp_u_02d_02d_02d __pyx_string_tab[15]
#define __pyx_kp_u_02d_02d_02d_06d __pyx_string_tab[16]
#define __pyx_kp_u_02d_02d_02d_06d_2 __pyx_string_tab[17]
#define __pyx_kp_u_02d_02d_02d_2 __pyx_string_tab[18]
#define __pyx_kp_u_02d_02d_2 __pyx_string_tab[19]
#define __pyx_kp_u_03_04_05 __pyx_string_tab[20]
#define __pyx_kp_u_03_04_05_000006 __pyx_string_tab[21]
#define __pyx_kp_u_03_04_05_000006_0101 __pyx_string_tab[22]
#define __pyx_kp_u_03_04_05_0101 __pyx_string_tab[23]
#define __pyx_kp_u_04d __pyx_string_tab[24]
#define __pyx_kp_u_06d __pyx_string_tab[25]
#define __pyx_kp_u_06d_2 __pyx_string_tab[26]
#define __pyx_kp_u_0_1 __pyx_string_tab[27]
#define __pyx_kp_u_0_12 __pyx_string_tab[28]
#define __pyx_kp_u_0_123456 __pyx_string_tab[29]
#define __pyx_kp_u_0_1234567 __pyx_string_tab[30]
#define __pyx_kp_u_1 __pyx_string_tab[31]
#define __pyx_kp_u_12 __pyx_string_tab[32]
#define __pyx_kp_u_123456 __pyx_string_tab[33]
#define __pyx_kp_u_1234567 __pyx_string_tab[34]
#define __pyx_kp_u_1_0 __pyx_string_tab[35]
#define __pyx_kp_u_1_1 __pyx_string_tab[36]
#define __pyx_kp_u_1_12 __pyx_string_tab[37]
#define __pyx_kp_u_1_123456 __pyx_string_tab[38]
#define __pyx_kp_u_1_1234567 __pyx_string_tab[39]
#define __pyx_kp_u_1_1_1 __pyx_string_tab[40]
#define __pyx_kp_u_1_1_2 __pyx_string_tab[41]
#define __pyx_kp_u_1_1_3 __pyx_string_tab[42]
#define __pyx_kp_u_1_1_4 __pyx_string_tab[43]
#define __pyx_kp_u_1_1_5 __pyx_string_tab[44]
#define __pyx_kp_u_1_1_6 __pyx_string_tab[45]
#define __pyx_kp_u_1_1a __pyx_string_tab[46]
#define __pyx_kp_u_1_2 __pyx_string_tab[47]
#define __pyx_kp_u_1_3 __pyx_string_tab[48]
#define __pyx_kp_u_1_4 __pyx_string_tab[49]
#define __pyx_kp_u_1_5 __pyx_string_tab[50]
#define __pyx_kp_u_1_6 __pyx_string_tab[51]
#define __pyx_kp_u_1a __pyx_string_tab[52]
#define __pyx_kp_u_2 __pyx_string_tab[53]
#define __pyx_kp_u_2021_000 __pyx_string_tab[54]
#define __pyx_kp_u_2021_01_02 __pyx_string_tab[55]
#define __pyx_kp_u_2021_01_02T03_04_05 __pyx_string_tab[56]
#define __pyx_kp_u_2021_01_02T03_04_05_000006 __pyx_string_tab[57]
#define __pyx_kp_u_2021_01_02T03_04_05_006007 __pyx_string_tab[58]
#define __pyx_kp_u_2021_01_02_03_04_05_000006_0101 __pyx_string_tab[59]
#define __pyx_kp_u_2021_01_02_03_04_05_0101 __pyx_string_tab[60]
#define __pyx_kp_u_2021_365 __pyx_string_tab[61]
#define __pyx_kp_u_2021_367 __pyx_string_tab[62]
#define __pyx_kp_u_2021_W52_6 __pyx_string_tab[63]
#define __pyx_kp_u_2359 __pyx_string_tab[64]
#define __pyx_kp_u_2359_2 __pyx_string_tab[65]
#define __pyx_kp_u_24_01_01 __pyx_string_tab[66]
#define __pyx_kp_u_24_01_01_000001 __pyx_string_tab[67]
#define __pyx_kp_u_24_01_01_000001_2 __pyx_string_tab[68]
#define __pyx_kp_u_24_01_01_001000 __pyx_string_tab[69]
#define __pyx_kp_u_24_01_01_001000_2 __pyx_string_tab[70]
#define __pyx_kp_u_24_01_01_001001 __pyx_string_tab[71]
#define __pyx_kp_u_24_01_01_001001_2 __pyx_string_tab[72]
#define __pyx_kp_u_24_01_01_2 __pyx_string_tab[73]
#define __pyx_kp_u_2d __pyx_string_tab[74]
#define __pyx_kp_u_7f __pyx_string_tab[75]
#define __pyx_kp_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcde __pyx_string_tab[76]
#define __pyx_kp_u_Accepts __pyx_string_tab[77]
#define __pyx_kp_u_Accepts_Y_M_W_D_h_m_s_ms_us_ns __pyx_string_tab[78]
#define __pyx_kp_u_America_New_York __pyx_string_tab[79]
#define __pyx_kp_u_Asia_Kathmandu __pyx_string_tab[80]
#define __pyx_kp_u_Asia_Shanghai __pyx_string_tab[81]
#define __pyx_kp_u_Australia_Lord_Howe __pyx_string_tab[82]
#define __pyx_kp_u_Cannot_add_delta_to_ndarray_s_Su __pyx_string_tab[83]
#define __pyx_kp_u_Cannot_compare_naive_and_aware_d __pyx_string_tab[84]
#define __pyx_kp_u_Cannot_compare_ndarrays_with_dif __pyx_string_tab[85]
#define __pyx_kp_u_Cannot_convert __pyx_string_tab[86]
#define __pyx_kp_u_Cannot_convert_2 __pyx_string_tab[87]
#define __pyx_kp_u_Cannot_convert_array_from_dateti __pyx_string_tab[88]
#define __pyx_kp_u_Cannot_convert_ndarray __pyx_string_tab[89]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative __pyx_string_tab[90]
#define __pyx_kp_u_Cannot_convert_s_to_non_negative_2 __pyx_string_tab[91]
#define __pyx_kp_u_Cannot_create_date_using_custom __pyx_string_tab[92]
#define __pyx_kp_u_Cannot_create_datetime_using_cus __pyx_string_tab[93]
#define __pyx_kp_u_Cannot_create_time_using_custom __pyx_string_tab[94]
#define __pyx_kp_u_Cannot_create_timedelta_using_cu __pyx_string_tab[95]
#define __pyx_kp_u_Cannot_parse __pyx_string_tab[96]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains __pyx_string_tab[97]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_2 __pyx_string_tab[98]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_3 __pyx_string_tab[99]
#define __pyx_kp_u_Cannot_parse_s_to_float_contains_4 __pyx_string_tab[100]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative __pyx_string_tab[101]
#define __pyx_kp_u_Cannot_parse_s_to_float_negative_2 __pyx_string_tab[102]
#define __pyx_kp_u_Cannot_parse_s_to_float_no_digit __pyx_string_tab[103]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive __pyx_string_tab[104]
#define __pyx_kp_u_Cannot_parse_s_to_float_positive_2 __pyx_string_tab[105]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai __pyx_string_tab[106]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_2 __pyx_string_tab[107]
#define __pyx_kp_u_Cannot_parse_s_to_integer_contai_3 __pyx_string_tab[108]
#define __pyx_kp_u_Cannot_parse_s_to_integer_negati __pyx_string_tab[109]
#define __pyx_kp_u_Cannot_parse_s_to_integer_no_dig __pyx_string_tab[110]
#define __pyx_kp_u_Cannot_parse_s_to_integer_positi __pyx_string_tab[111]
#define __pyx_kp_u_Cannot_perform_addition_on_ndarr __pyx_string_tab[112]
#define __pyx_kp_u_Cannot_perform_multiplication_on __pyx_string_tab[113]
#define __pyx_kp_u_Cannot_perform_subtraction_on_nd __pyx_string_tab[114]
#define __pyx_kp_u_Conversion_limits_to_units_betw __pyx_string_tab[115]
#define __pyx_kp_u_D_2 __pyx_string_tab[116]
#define __pyx_kp_u_Error __pyx_string_tab[117]
#define __pyx_kp_u_Europe_Dublin __pyx_string_tab[118]
#define __pyx_kp_u_Europe_Paris __pyx_string_tab[119]
#define __pyx_kp_u_Expects_1_D_ndarray_instead_got __pyx_string_tab[120]
#define __pyx_kp_u_Expects_an_instance_of_datetime __pyx_string_tab[121]
#define __pyx_kp_u_Expects_an_instance_of_np_dateti __pyx_string_tab[122]
#define __pyx_kp_u_Expects_an_instance_of_np_ndarra __pyx_string_tab[123]
#define __pyx_kp_u_Expects_an_instance_of_np_timede __pyx_string_tab[124]
#define __pyx_kp_u_Expects_instance_of_np_ndarray_t __pyx_string_tab[125]
#define __pyx_kp_u_Expects_ndarray_datetime64_or_nd __pyx_string_tab[126]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_U __pyx_string_tab[127]
#define __pyx_kp_u_Fail_to_convert_timestamp_s_to_l __pyx_string_tab[128]
#define __pyx_kp_u_Failed_arr_div_ceil __pyx_string_tab[129]
#define __pyx_kp_u_Failed_arr_div_ceil_mul __pyx_string_tab[130]
#define __pyx_kp_u_Failed_arr_div_down __pyx_string_tab[131]
#define __pyx_kp_u_Failed_arr_div_down_mul __pyx_string_tab[132]
#define __pyx_kp_u_Failed_arr_div_even __pyx_string_tab[133]
#define __pyx_kp_u_Failed_arr_div_even_mul __pyx_string_tab[134]
#define __pyx_kp_u_Failed_arr_div_floor __pyx_string_tab[135]
#define __pyx_kp_u_Failed_arr_div_floor_mul __pyx_string_tab[136]
#define __pyx_kp_u_Failed_arr_div_up __pyx_string_tab[137]
#define __pyx_kp_u_Failed_arr_div_up_mul __pyx_string_tab[138]
#define __pyx_kp_u_Failed_date_fr_sec __pyx_string_tab[139]
#define __pyx_kp_u_Failed_datetime64_type_check __pyx_string_tab[140]
#define __pyx_kp_u_Failed_dt_normalize_tz __pyx_string_tab[141]
#define __pyx_kp_u_Failed_hmsf_fr_sec __pyx_string_tab[142]
#define __pyx_kp_u_Failed_math_div_ceil __pyx_string_tab[143]
#define __pyx_kp_u_Failed_math_div_down __pyx_string_tab[144]
#define __pyx_kp_u_Failed_math_div_even __pyx_string_tab[145]
#define __pyx_kp_u_Failed_math_div_floor __pyx_string_tab[146]
#define __pyx_kp_u_Failed_math_div_up __pyx_string_tab[147]
#define __pyx_kp_u_Failed_math_mod __pyx_string_tab[148]
#define __pyx_kp_u_Failed_ndarray_datetime64 __pyx_string_tab[149]
#define __pyx_kp_u_Failed_sec_to_us __pyx_string_tab[150]
#define __pyx_kp_u_Failed_timedelta64_type_check __pyx_string_tab[151]
#define __pyx_kp_u_Invalid_timezone_name_s __pyx_string_tab[152]
#define __pyx_kp_u_M_2 __pyx_string_tab[153]
#define __pyx_kp_u_None __pyx_string_tab[154]
#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[155]
#define __pyx_kp_u_Only_supports_arrays_with_units __pyx_string_tab[156]
#define __pyx_kp_u_Pacific_Apia __pyx_string_tab[157]
#define __pyx_kp_u_Passed_cross_test_with_ndarray __pyx_string_tab[158]
#define __pyx_kp_u_Passed_date_arithmetic __pyx_string_tab[159]
#define __pyx_kp_u_Passed_date_conversion __pyx_string_tab[160]
#define __pyx_kp_u_Passed_date_generate __pyx_string_tab[161]
#define __pyx_kp_u_Passed_date_type_check __pyx_string_tab[162]
#define __pyx_kp_u_Passed_datetime64_conversion __pyx_string_tab[163]
#define __pyx_kp_u_Passed_datetime64_type_check __pyx_string_tab[164]
#define __pyx_kp_u_Passed_days_bf_month __pyx_string_tab[165]
#define __pyx_kp_u_Passed_days_bf_year __pyx_string_tab[166]
#define __pyx_kp_u_Passed_days_in_month __pyx_string_tab[167]
#define __pyx_kp_u_Passed_days_in_quarter __pyx_string_tab[168]
#define __pyx_kp_u_Passed_dt_conversion __pyx_string_tab[169]
#define __pyx_kp_u_Passed_dt_generate __pyx_string_tab[170]
#define __pyx_kp_u_Passed_dt_manipulate __pyx_string_tab[171]
#define __pyx_kp_u_Passed_dt_normalize_tz __pyx_string_tab[172]
#define __pyx_kp_u_Passed_dt_type_check __pyx_string_tab[173]
#define __pyx_kp_u_Passed_dt_tzinfo __pyx_string_tab[174]
#define __pyx_kp_u_Passed_iso_week1_mon_ord __pyx_string_tab[175]
#define __pyx_kp_u_Passed_isocalendar __pyx_string_tab[176]
#define __pyx_kp_u_Passed_localtime_gmtime __pyx_string_tab[177]
#define __pyx_kp_u_Passed_math __pyx_string_tab[178]
#define __pyx_kp_u_Passed_ndarray_dt64_conversion __pyx_string_tab[179]
#define __pyx_kp_u_Passed_ndarray_dt64_type_check __pyx_string_tab[180]
#define __pyx_kp_u_Passed_ndarray_generate __pyx_string_tab[181]
#define __pyx_kp_u_Passed_ndarray_math __pyx_string_tab[182]
#define __pyx_kp_u_Passed_ndarray_td64_conversion __pyx_string_tab[183]
#define __pyx_kp_u_Passed_ndarray_td64_type_check __pyx_string_tab[184]
#define __pyx_kp_u_Passed_ndarray_type_check __pyx_string_tab[185]
#define __pyx_kp_u_Passed_numpy_share __pyx_string_tab[186]
#define __pyx_kp_u_Passed_parser __pyx_string_tab[187]
#define __pyx_kp_u_Passed_quarter_of_month __pyx_string_tab[188]
#define __pyx_kp_u_Passed_sec_to_us __pyx_string_tab[189]
#define __pyx_kp_u_Passed_slice_to_ufloat __pyx_string_tab[190]
#define __pyx_kp_u_Passed_slice_to_uint __pyx_string_tab[191]
#define __pyx_kp_u_Passed_time_conversion __pyx_string_tab[192]
#define __pyx_kp_u_Passed_time_generate __pyx_string_tab[193]
#define __pyx_kp_u_Passed_time_type_check __pyx_string_tab[194]
#define __pyx_kp_u_Passed_timedelta64_conversion __pyx_string_tab[195]
#define __pyx_kp_u_Passed_timedelta64_type_check __pyx_string_tab[196]
#define __pyx_kp_u_Passed_timedelta_conversion __pyx_string_tab[197]
#define __pyx_kp_u_Passed_timedelta_generate __pyx_string_tab[198]
#define __pyx_kp_u_Passed_timedelta_type_chech __pyx_string_tab[199]
#define __pyx_kp_u_Passed_tzinfo_access __pyx_string_tab[200]
#define __pyx_kp_u_Passed_tzinfo_generate __pyx_string_tab[201]
#define __pyx_kp_u_Passed_tzinfo_type_check __pyx_string_tab[202]
#define __pyx_kp_u_Passed_weekday __pyx_string_tab[203]
#define __pyx_kp_u_Passed_ymd_fr_doy __pyx_string_tab[204]
#define __pyx_kp_u_Passed_ymd_fr_iso __pyx_string_tab[205]
#define __pyx_kp_u_Passed_ymd_fr_ord __pyx_string_tab[206]
#define __pyx_kp_u_Passed_ymd_to_ord __pyx_string_tab[207]
#define __pyx_kp_u_Seconds_value_must_be_finite_got __pyx_string_tab[208]
#define __pyx_kp_u_Should_raise_RuntimeError __pyx_string_tab[209]
#define __pyx_kp_u_The_size_of_a_new_array_must_be __pyx_string_tab[210]
#define __pyx_kp_u_Timezone_offset __pyx_string_tab[211]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo __pyx_string_tab[212]
#define __pyx_kp_u_Unsupported_conversion_unit_d_fo_2 __pyx_string_tab[213]
#define __pyx_kp_u_Unsupported_datetime_resolution __pyx_string_tab[214]
#define __pyx_kp_u_Unsupported_numpy_time_unit_NPY __pyx_string_tab[215]
#define __pyx_kp_u_Unsupported_time_unit __pyx_string_tab[216]
#define __pyx_kp_u_Unsupported_timezone __pyx_string_tab[217]
#define __pyx_kp_u_W_2 __pyx_string_tab[218]
#define __pyx_kp_u_Y_2 __pyx_string_tab[219]
#define __pyx_kp_u__10 __pyx_string_tab[220]
#define __pyx_kp_u__11 __pyx_string_tab[221]
#define __pyx_kp_u__12 __pyx_string_tab[222]
#define __pyx_kp_u__13 __pyx_string_tab[223]
#define __pyx_kp_u__14 __pyx_string_tab[224]
#define __pyx_kp_u__15 __pyx_string_tab[225]
#define __pyx_kp_u__16 __pyx_string_tab[226]
#define __pyx_kp_u__17 __pyx_string_tab[227]
#define __pyx_kp_u__18 __pyx_string_tab[228]
#define __pyx_kp_u__2 __pyx_string_tab[229]
#define __pyx_kp_u__3 __pyx_string_tab[230]
#define __pyx_kp_u__4 __pyx_string_tab[231]
#define __pyx_kp_u__5 __pyx_string_tab[232]
#define __pyx_kp_u__6 __pyx_string_tab[233]
#define __pyx_kp_u__7 __pyx_string_tab[234]
#define __pyx_kp_u__8 __pyx_string_tab[235]
#define __pyx_kp_u__9 __pyx_string_tab[236]
#define __pyx_kp_u_a1_1 __pyx_string_tab[237]
#define __pyx_kp_u_add_note __pyx_string_tab[238]
#define __pyx_kp_u_arr2_length __pyx_string_tab[239]
#define __pyx_kp_u_arr_div_ceil_division_by_zero __pyx_string_tab[240]
#define __pyx_kp_u_arr_div_ceil_mul_division_by_zer __pyx_string_tab[241]
#define __pyx_kp_u_arr_div_down_division_by_zero __pyx_string_tab[242]
#define __pyx_kp_u_arr_div_down_mul_division_by_zer __pyx_string_tab[243]
#define __pyx_kp_u_arr_div_even_division_by_zero __pyx_string_tab[244]
#define __pyx_kp_u_arr_div_even_mul_division_by_zer __pyx_string_tab[245]
#define __pyx_kp_u_arr_div_floor_division_by_zero __pyx_string_tab[246]
#define __pyx_kp_u_arr_div_floor_mul_division_by_ze __pyx_string_tab[247]
#define __pyx_kp_u_arr_div_trunc_division_by_zero __pyx_string_tab[248]
#define __pyx_kp_u_arr_div_trunc_mul_division_by_ze __pyx_string_tab[249]
#define __pyx_kp_u_arr_div_up_division_by_zero __pyx_string_tab[250]
#define __pyx_kp_u_arr_div_up_mul_division_by_zero __pyx_string_tab[251]
#define __pyx_kp_u_arr_mod_division_by_zero __pyx_string_tab[252]
#define __pyx_kp_u_at_position __pyx_string_tab[253]
#define __pyx_kp_u_date_fr_us __pyx_string_tab[254]
#define __pyx_kp_u_datetime2 __pyx_string_tab[255]
#define __pyx_kp_u_datetime64_2 __pyx_string_tab[256]
#define __pyx_kp_u_datetime64_D __pyx_string_tab[257]
#define __pyx_kp_u_datetime64_M __pyx_string_tab[258]
#define __pyx_kp_u_datetime64_W __pyx_string_tab[259]
#define __pyx_kp_u_datetime64_Y __pyx_string_tab[260]
#define __pyx_kp_u_datetime64_as __pyx_string_tab[261]
#define __pyx_kp_u_datetime64_fs __pyx_string_tab[262]
#define __pyx_kp_u_datetime64_h __pyx_string_tab[263]
#define __pyx_kp_u_datetime64_m __pyx_string_tab[264]
#define __pyx_kp_u_datetime64_ms __pyx_string_tab[265]
#define __pyx_kp_u_datetime64_ns __pyx_string_tab[266]
#define __pyx_kp_u_datetime64_ps __pyx_string_tab[267]
#define __pyx_kp_u_datetime64_s __pyx_string_tab[268]
#define __pyx_kp_u_datetime64_s_2 __pyx_string_tab[269]
#define __pyx_kp_u_datetime64_us __pyx_string_tab[270]
#define __pyx_kp_u_dt_isoformat_sep_cannot_be_None __pyx_string_tab[271]
#define __pyx_kp_u_dt_strformat_fmt_cannot_be_None __pyx_string_tab[272]
#define __pyx_kp_u_etc_gmt __pyx_string_tab[273]
#define __pyx_kp_u_etc_gmt0 __pyx_string_tab[274]
#define __pyx_kp_u_etc_gmt_0 __pyx_string_tab[275]
#define __pyx_kp_u_etc_gmt_0_2 __pyx_string_tab[276]
#define __pyx_kp_u_etc_universal __pyx_string_tab[277]
#define __pyx_kp_u_etc_utc __pyx_string_tab[278]
#define __pyx_kp_u_etc_zulu __pyx_string_tab[279]
#define __pyx_kp_u_expected __pyx_string_tab[280]
#define __pyx_kp_u_fold_must_be_either_0_or_1_got_d __pyx_string_tab[281]
#define __pyx_kp_u_from __pyx_string_tab[282]
#define __pyx_kp_u_from_2 __pyx_string_tab[283]
#define __pyx_kp_u_gmt_0 __pyx_string_tab[284]
#define __pyx_kp_u_gmt_0_2 __pyx_string_tab[285]
#define __pyx_kp_u_h_2 __pyx_string_tab[286]
#define __pyx_kp_u_hmsf_fr_us __pyx_string_tab[287]
#define __pyx_kp_u_m_2 __pyx_string_tab[288]
#define __pyx_kp_u_m_d_Y __pyx_string_tab[289]
#define __pyx_kp_u_m_d_Y_f_S_M_H __pyx_string_tab[290]
#define __pyx_kp_u_m_d_Y_f_S_M_H_Z __pyx_string_tab[291]
#define __pyx_kp_u_m_d_Y_f_S_M_H_z __pyx_string_tab[292]
#define __pyx_kp_u_math_div_ceil_division_by_zero __pyx_string_tab[293]
#define __pyx_kp_u_math_div_ceil_result_does_not_fi __pyx_string_tab[294]
#define __pyx_kp_u_math_div_down_division_by_zero __pyx_string_tab[295]
#define __pyx_kp_u_math_div_down_result_does_not_fi __pyx_string_tab[296]
#define __pyx_kp_u_math_div_even_division_by_zero __pyx_string_tab[297]
#define __pyx_kp_u_math_div_even_result_does_not_fi __pyx_string_tab[298]
#define __pyx_kp_u_math_div_floor_division_by_zero __pyx_string_tab[299]
#define __pyx_kp_u_math_div_floor_result_does_not_f __pyx_string_tab[300]
#define __pyx_kp_u_math_div_trunc_division_by_zero __pyx_string_tab[301]
#define __pyx_kp_u_math_div_trunc_result_does_not_f __pyx_string_tab[302]
#define __pyx_kp_u_math_div_up_division_by_zero __pyx_string_tab[303]
#define __pyx_kp_u_math_div_up_result_does_not_fit __pyx_string_tab[304]
#define __pyx_kp_u_math_mod_division_by_zero __pyx_string_tab[305]
#define __pyx_kp_u_minimum_value_cannot_be_greater __pyx_string_tab[306]
#define __pyx_kp_u_minutes __pyx_string_tab[307]
#define __pyx_kp_u_missing_time_resolution_for_ndar __pyx_string_tab[308]
#define __pyx_kp_u_ms_2 __pyx_string_tab[309]
#define __pyx_kp_u_ns_2 __pyx_string_tab[310]
#define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_string_tab[311]
#define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_string_tab[312]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b __pyx_string_tab[313]
#define __pyx_kp_u_out_of_range_Must_be_strictly_b_2 __pyx_string_tab[314]
#define __pyx_kp_u_parse_to_float_token_cannot_be_N __pyx_string_tab[315]
#define __pyx_kp_u_parse_to_int_token_cannot_be_Non __pyx_string_tab[316]
#define __pyx_kp_u_pendulum_result __pyx_string_tab[317]
#define __pyx_kp_u_resolution_is_not_supported __pyx_string_tab[318]
#define __pyx_kp_u_s_2 __pyx_string_tab[319]
#define __pyx_kp_u_seconds_2 __pyx_string_tab[320]
#define __pyx_kp_u_seconds_from __pyx_string_tab[321]
#define __pyx_kp_u_seconds_from_hours __pyx_string_tab[322]
#define __pyx_kp_u_size __pyx_string_tab[323]
#define __pyx_kp_u_slice_to_ufloat_out_of_range_sta __pyx_string_tab[324]
#define __pyx_kp_u_slice_to_ufloat_size_must_be_0_i __pyx_string_tab[325]
#define __pyx_kp_u_slice_to_ufloat_start_must_be_0 __pyx_string_tab[326]
#define __pyx_kp_u_slice_to_ufloat_token_cannot_be __pyx_string_tab[327]
#define __pyx_kp_u_slice_to_uint_out_of_range_start __pyx_string_tab[328]
#define __pyx_kp_u_slice_to_uint_size_must_be_0_ins __pyx_string_tab[329]
#define __pyx_kp_u_slice_to_uint_start_must_be_0_in __pyx_string_tab[330]
#define __pyx_kp_u_slice_to_uint_token_cannot_be_No __pyx_string_tab[331]
#define __pyx_kp_u_src_cytimes_utils_pxd __pyx_string_tab[332]
#define __pyx_kp_u_src_cytimes_utils_py __pyx_string_tab[333]
#define __pyx_kp_u_ticks_Supported_resolution_Y_M __pyx_string_tab[334]
#define __pyx_kp_u_ticks_Supported_units __pyx_string_tab[335]
#define __pyx_kp_u_ticks_Supported_units_Y_M_W_D_h __pyx_string_tab[336]
#define __pyx_kp_u_timedelta64_2 __pyx_string_tab[337]
#define __pyx_kp_u_timedelta64_ns __pyx_string_tab[338]
#define __pyx_kp_u_timedelta64_s __pyx_string_tab[339]
#define __pyx_kp_u_timedelta64_us __pyx_string_tab[340]
#define __pyx_kp_u_tm_strformat_expanded_output_exc __pyx_string_tab[341]
#define __pyx_kp_u_tm_strformat_failed_to_allocate __pyx_string_tab[342]
#define __pyx_kp_u_tm_strformat_fmt_cannot_be_None __pyx_string_tab[343]
#define __pyx_kp_u_to __pyx_string_tab[344]
#define __pyx_kp_u_to_datetime64 __pyx_string_tab[345]
#define __pyx_kp_u_to_float_contains_invalid_chara __pyx_string_tab[346]
#define __pyx_kp_u_to_int64 __pyx_string_tab[347]
#define __pyx_kp_u_to_int64_2 __pyx_string_tab[348]
#define __pyx_kp_u_to_integer_Contains_invalid_cha __pyx_string_tab[349]
#define __pyx_kp_u_to_non_negative_float_contains __pyx_string_tab[350]
#define __pyx_kp_u_to_unsigned_integer_Contains_in __pyx_string_tab[351]
#define __pyx_kp_u_token_len __pyx_string_tab[352]
#define __pyx_kp_u_unit_to_int64 __pyx_string_tab[353]
#define __pyx_kp_u_us_2 __pyx_string_tab[354]
#define __pyx_kp_u_zoneinfo_ZoneInfo_datetime_timez __pyx_string_tab[355]
#define __pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZ __pyx_string_tab[356]
#define __pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef __pyx_string_tab[357]
#define __pyx_n_u_Apr __pyx_string_tab[358]
#define __pyx_n_u_Aug __pyx_string_tab[359]
#define __pyx_n_u_CET __pyx_string_tab[360]
#define __pyx_n_u_CST __pyx_string_tab[361]
#define __pyx_n_u_CustomDate __pyx_string_tab[362]
#define __pyx_n_u_CustomDateTime __pyx_string_tab[363]
#define __pyx_n_u_CustomTD __pyx_string_tab[364]
#define __pyx_n_u_CustomTime __pyx_string_tab[365]
#define __pyx_n_u_D __pyx_string_tab[366]
#define __pyx_n_u_Date __pyx_string_tab[367]
#define __pyx_n_u_DateTime __pyx_string_tab[368]
#define __pyx_n_u_Dec __pyx_string_tab[369]
#define __pyx_n_u_Decimal __pyx_string_tab[370]
#define __pyx_n_u_False __pyx_string_tab[371]
#define __pyx_n_u_Feb __pyx_string_tab[372]
#define __pyx_n_u_Fri __pyx_string_tab[373]
#define __pyx_n_u_InvalidTimezoneError __pyx_string_tab[374]
#define __pyx_n_u_Jan __pyx_string_tab[375]
#define __pyx_n_u_Jul __pyx_string_tab[376]
#define __pyx_n_u_Jun __pyx_string_tab[377]
#define __pyx_n_u_LOCALTZ __pyx_string_tab[378]
#define __pyx_n_u_M __pyx_string_tab[379]
#define __pyx_n_u_MAXORDINAL __pyx_string_tab[380]
#define __pyx_n_u_Mar __pyx_string_tab[381]
#define __pyx_n_u_May __pyx_string_tab[382]
#define __pyx_n_u_Mon __pyx_string_tab[383]
#define __pyx_n_u_NaT __pyx_string_tab[384]
#define __pyx_n_u_None __pyx_string_tab[385]
#define __pyx_n_u_Nov __pyx_string_tab[386]
#define __pyx_n_u_Oct __pyx_string_tab[387]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[388]
#define __pyx_n_u_ROUND_CEILING __pyx_string_tab[389]
#define __pyx_n_u_ROUND_FLOOR __pyx_string_tab[390]
#define __pyx_n_u_ROUND_HALF_DOWN __pyx_string_tab[391]
#define __pyx_n_u_ROUND_HALF_EVEN __pyx_string_tab[392]
#define __pyx_n_u_ROUND_HALF_UP __pyx_string_tab[393]
#define __pyx_n_u_SENTINEL __pyx_string_tab[394]
#define __pyx_n_u_Sat __pyx_string_tab[395]
#define __pyx_n_u_Sep __pyx_string_tab[396]
#define __pyx_n_u_Sun __pyx_string_tab[397]
#define __pyx_n_u_T __pyx_string_tab[398]
#define __pyx_n_u_Thu __pyx_string_tab[399]
#define __pyx_n_u_Time __pyx_string_tab[400]
#define __pyx_n_u_Timestamp __pyx_string_tab[401]
#define __pyx_n_u_True __pyx_string_tab[402]
#define __pyx_n_u_Tue __pyx_string_tab[403]
#define __pyx_n_u_UTC __pyx_string_tab[404]
#define __pyx_n_u_V __pyx_string_tab[405]
#define __pyx_n_u_W __pyx_string_tab[406]
#define __pyx_n_u_Wed __pyx_string_tab[407]
#define __pyx_n_u_Y __pyx_string_tab[408]
#define __pyx_n_u_ZoneInfo __pyx_string_tab[409]
#define __pyx_n_u_a __pyx_string_tab[410]
#define __pyx_n_u_abcdefghijklmnopqrstuvwxyz __pyx_string_tab[411]
#define __pyx_n_u_all __pyx_string_tab[412]
#define __pyx_n_u_arr __pyx_string_tab[413]
#define __pyx_n_u_arr1 __pyx_string_tab[414]
#define __pyx_n_u_arr2 __pyx_string_tab[415]
#define __pyx_n_u_arr_D __pyx_string_tab[416]
#define __pyx_n_u_arr_M __pyx_string_tab[417]
#define __pyx_n_u_arr_Y __pyx_string_tab[418]
#define __pyx_n_u_arr_f __pyx_string_tab[419]
#define __pyx_n_u_arr_h __pyx_string_tab[420]
#define __pyx_n_u_arr_i __pyx_string_tab[421]
#define __pyx_n_u_arr_m __pyx_string_tab[422]
#define __pyx_n_u_arr_ord __pyx_string_tab[423]
#define __pyx_n_u_arr_s __pyx_string_tab[424]
#define __pyx_n_u_arr_us __pyx_string_tab[425]
#define __pyx_n_u_arr_wkdy __pyx_string_tab[426]
#define __pyx_n_u_array __pyx_string_tab[427]
#define __pyx_n_u_as __pyx_string_tab[428]
#define __pyx_n_u_astype __pyx_string_tab[429]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[430]
#define __pyx_n_u_babel_dates __pyx_string_tab[431]
#define __pyx_n_u_ceil __pyx_string_tab[432]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[433]
#define __pyx_n_u_cmp __pyx_string_tab[434]
#define __pyx_n_u_count __pyx_string_tab[435]
#define __pyx_n_u_cross_test_with_ndarray __pyx_string_tab[436]
#define __pyx_n_u_ctd __pyx_string_tab[437]
#define __pyx_n_u_cytimes __pyx_string_tab[438]
#define __pyx_n_u_cytimes_utils __pyx_string_tab[439]
#define __pyx_n_u_d __pyx_string_tab[440]
#define __pyx_n_u_d1 __pyx_string_tab[441]
#define __pyx_n_u_d2 __pyx_string_tab[442]
#define __pyx_n_u_date __pyx_string_tab[443]
#define __pyx_n_u_datetime __pyx_string_tab[444]
#define __pyx_n_u_datetime64 __pyx_string_tab[445]
#define __pyx_n_u_day __pyx_string_tab[446]
#define __pyx_n_u_days __pyx_string_tab[447]
#define __pyx_n_u_days_before_month __pyx_string_tab[448]
#define __pyx_n_u_days_before_year __pyx_string_tab[449]
#define __pyx_n_u_days_in_month __pyx_string_tab[450]
#define __pyx_n_u_dd __pyx_string_tab[451]
#define __pyx_n_u_decimal __pyx_string_tab[452]
#define __pyx_n_u_doc __pyx_string_tab[453]
#define __pyx_n_u_doy __pyx_string_tab[454]
#define __pyx_n_u_dst __pyx_string_tab[455]
#define __pyx_n_u_dt __pyx_string_tab[456]
#define __pyx_n_u_dt2 __pyx_string_tab[457]
#define __pyx_n_u_dt64 __pyx_string_tab[458]
#define __pyx_n_u_dt_2 __pyx_string_tab[459]
#define __pyx_n_u_dt_c __pyx_string_tab[460]
#define __pyx_n_u_dt_n __pyx_string_tab[461]
#define __pyx_n_u_dt_str __pyx_string_tab[462]
#define __pyx_n_u_dt_tz1 __pyx_string_tab[463]
#define __pyx_n_u_dt_tz2 __pyx_string_tab[464]
#define __pyx_n_u_dt_tz3 __pyx_string_tab[465]
#define __pyx_n_u_dt_tz4 __pyx_string_tab[466]
#define __pyx_n_u_dtm __pyx_string_tab[467]
#define __pyx_n_u_dtype __pyx_string_tab[468]
#define __pyx_n_u_equal __pyx_string_tab[469]
#define __pyx_n_u_err __pyx_string_tab[470]
#define __pyx_n_u_errors __pyx_string_tab[471]
#define __pyx_n_u_exp __pyx_string_tab[472]
#define __pyx_n_u_factor __pyx_string_tab[473]
#define __pyx_n_u_float64 __pyx_string_tab[474]
#define __pyx_n_u_floor __pyx_string_tab[475]
#define __pyx_n_u_fold __pyx_string_tab[476]
#define __pyx_n_u_fromtimestamp __pyx_string_tab[477]
#define __pyx_n_u_fromutc __pyx_string_tab[478]
#define __pyx_n_u_fs __pyx_string_tab[479]
#define __pyx_n_u_func __pyx_string_tab[480]
#define __pyx_n_u_functools __pyx_string_tab[481]
#define __pyx_n_u_get_local_timezone __pyx_string_tab[482]
#define __pyx_n_u_get_zoneinfo __pyx_string_tab[483]
#define __pyx_n_u_gmt __pyx_string_tab[484]
#define __pyx_n_u_gmt0 __pyx_string_tab[485]
#define __pyx_n_u_gmtime __pyx_string_tab[486]
#define __pyx_n_u_greenwich __pyx_string_tab[487]
#define __pyx_n_u_h __pyx_string_tab[488]
#define __pyx_n_u_h1 __pyx_string_tab[489]
#define __pyx_n_u_h2 __pyx_string_tab[490]
#define __pyx_n_u_hh __pyx_string_tab[491]
#define __pyx_n_u_hmsf __pyx_string_tab[492]
#define __pyx_n_u_hour __pyx_string_tab[493]
#define __pyx_n_u_hours __pyx_string_tab[494]
#define __pyx_n_u_i __pyx_string_tab[495]
#define __pyx_n_u_i_len __pyx_string_tab[496]
#define __pyx_n_u_i_str __pyx_string_tab[497]
#define __pyx_n_u_inf __pyx_string_tab[498]
#define __pyx_n_u_int64 __pyx_string_tab[499]
#define __pyx_n_u_is_coroutine __pyx_string_tab[500]
#define __pyx_n_u_is_leap __pyx_string_tab[501]
#define __pyx_n_u_iso_calr __pyx_string_tab[502]
#define __pyx_n_u_iso_week __pyx_string_tab[503]
#define __pyx_n_u_iso_weekday __pyx_string_tab[504]
#define __pyx_n_u_iso_year __pyx_string_tab[505]
#define __pyx_n_u_isocalendar __pyx_string_tab[506]
#define __pyx_n_u_isoweek1monday __pyx_string_tab[507]
#define __pyx_n_u_isoweek_to_gregorian __pyx_string_tab[508]
#define __pyx_n_u_items __pyx_string_tab[509]
#define __pyx_n_u_k __pyx_string_tab[510]
#define __pyx_n_u_key __pyx_string_tab[511]
#define __pyx_n_u_local __pyx_string_tab[512]
#define __pyx_n_u_localtime __pyx_string_tab[513]
#define __pyx_n_u_lower __pyx_string_tab[514]
#define __pyx_n_u_lru_cache __pyx_string_tab[515]
#define __pyx_n_u_lru_cache_2 __pyx_string_tab[516]
#define __pyx_n_u_m __pyx_string_tab[517]
#define __pyx_n_u_m_dt __pyx_string_tab[518]
#define __pyx_n_u_main __pyx_string_tab[519]
#define __pyx_n_u_math __pyx_string_tab[520]
#define __pyx_n_u_maxsize __pyx_string_tab[521]
#define __pyx_n_u_metaclass __pyx_string_tab[522]
#define __pyx_n_u_mi __pyx_string_tab[523]
#define __pyx_n_u_microsecond __pyx_string_tab[524]
#define __pyx_n_u_microseconds __pyx_string_tab[525]
#define __pyx_n_u_milliseconds __pyx_string_tab[526]
#define __pyx_n_u_min __pyx_string_tab[527]
#define __pyx_n_u_minute __pyx_string_tab[528]
#define __pyx_n_u_minutes_2 __pyx_string_tab[529]
#define __pyx_n_u_mm __pyx_string_tab[530]
#define __pyx_n_u_module __pyx_string_tab[531]
#define __pyx_n_u_month __pyx_string_tab[532]
#define __pyx_n_u_mro_entries __pyx_string_tab[533]
#define __pyx_n_u_ms __pyx_string_tab[534]
#define __pyx_n_u_my_unit __pyx_string_tab[535]
#define __pyx_n_u_my_unit_int __pyx_string_tab[536]
#define __pyx_n_u_name __pyx_string_tab[537]
#define __pyx_n_u_name_2 __pyx_string_tab[538]
#define __pyx_n_u_name_lower __pyx_string_tab[539]
#define __pyx_n_u_non_digits __pyx_string_tab[540]
#define __pyx_n_u_now __pyx_string_tab[541]
#define __pyx_n_u_np __pyx_string_tab[542]
#define __pyx_n_u_ns __pyx_string_tab[543]
#define __pyx_n_u_num __pyx_string_tab[544]
#define __pyx_n_u_numpy __pyx_string_tab[545]
#define __pyx_n_u_object __pyx_string_tab[546]
#define __pyx_n_u_offset __pyx_string_tab[547]
#define __pyx_n_u_ord2ymd __pyx_string_tab[548]
#define __pyx_n_u_ord_i __pyx_string_tab[549]
#define __pyx_n_u_out __pyx_string_tab[550]
#define __pyx_n_u_p_dt __pyx_string_tab[551]
#define __pyx_n_u_pairs __pyx_string_tab[552]
#define __pyx_n_u_pandas __pyx_string_tab[553]
#define __pyx_n_u_parse_to_float __pyx_string_tab[554]
#define __pyx_n_u_parse_to_int __pyx_string_tab[555]
#define __pyx_n_u_pd __pyx_string_tab[556]
#define __pyx_n_u_pdate __pyx_string_tab[557]
#define __pyx_n_u_pendulum __pyx_string_tab[558]
#define __pyx_n_u_pfix __pyx_string_tab[559]
#define __pyx_n_u_pop __pyx_string_tab[560]
#define __pyx_n_u_prepare __pyx_string_tab[561]
#define __pyx_n_u_print __pyx_string_tab[562]
#define __pyx_n_u_ps __pyx_string_tab[563]
#define __pyx_n_u_pt __pyx_string_tab[564]
#define __pyx_n_u_pt_tz1 __pyx_string_tab[565]
#define __pyx_n_u_pydatetime __pyx_string_tab[566]
#define __pyx_n_u_pyx_capi __pyx_string_tab[567]
#define __pyx_n_u_qtr __pyx_string_tab[568]
#define __pyx_n_u_qualname __pyx_string_tab[569]
#define __pyx_n_u_replace __pyx_string_tab[570]
#define __pyx_n_u_res __pyx_string_tab[571]
#define __pyx_n_u_res2 __pyx_string_tab[572]
#define __pyx_n_u_return __pyx_string_tab[573]
#define __pyx_n_u_round __pyx_string_tab[574]
#define __pyx_n_u_rounding __pyx_string_tab[575]
#define __pyx_n_u_s __pyx_string_tab[576]
#define __pyx_n_u_second __pyx_string_tab[577]
#define __pyx_n_u_seconds __pyx_string_tab[578]
#define __pyx_n_u_secs __pyx_string_tab[579]
#define __pyx_n_u_set_name __pyx_string_tab[580]
#define __pyx_n_u_setdefault __pyx_string_tab[581]
#define __pyx_n_u_sfix __pyx_string_tab[582]
#define __pyx_n_u_ss __pyx_string_tab[583]
#define __pyx_n_u_ss_f __pyx_string_tab[584]
#define __pyx_n_u_str __pyx_string_tab[585]
#define __pyx_n_u_t __pyx_string_tab[586]
#define __pyx_n_u_t1 __pyx_string_tab[587]
#define __pyx_n_u_t2 __pyx_string_tab[588]
#define __pyx_n_u_t_c __pyx_string_tab[589]
#define __pyx_n_u_t_n __pyx_string_tab[590]
#define __pyx_n_u_t_tz1 __pyx_string_tab[591]
#define __pyx_n_u_td __pyx_string_tab[592]
#define __pyx_n_u_td1 __pyx_string_tab[593]
#define __pyx_n_u_td2 __pyx_string_tab[594]
#define __pyx_n_u_td3 __pyx_string_tab[595]
#define __pyx_n_u_td4 __pyx_string_tab[596]
#define __pyx_n_u_td5 __pyx_string_tab[597]
#define __pyx_n_u_td6 __pyx_string_tab[598]
#define __pyx_n_u_td64 __pyx_string_tab[599]
#define __pyx_n_u_td7 __pyx_string_tab[600]
#define __pyx_n_u_td8 __pyx_string_tab[601]
#define __pyx_n_u_test __pyx_string_tab[602]
#define __pyx_n_u_test_cases __pyx_string_tab[603]
#define __pyx_n_u_test_date_conversion __pyx_string_tab[604]
#define __pyx_n_u_test_date_generate __pyx_string_tab[605]
#define __pyx_n_u_test_date_type_check __pyx_string_tab[606]
#define __pyx_n_u_test_date_type_check_locals_Cus __pyx_string_tab[607]
#define __pyx_n_u_test_datetime64_conversion __pyx_string_tab[608]
#define __pyx_n_u_test_datetime64_type_check __pyx_string_tab[609]
#define __pyx_n_u_test_days_bf_month __pyx_string_tab[610]
#define __pyx_n_u_test_days_bf_year __pyx_string_tab[611]
#define __pyx_n_u_test_days_in_month __pyx_string_tab[612]
#define __pyx_n_u_test_days_in_quarter __pyx_string_tab[613]
#define __pyx_n_u_test_doy __pyx_string_tab[614]
#define __pyx_n_u_test_dt_arithmetic __pyx_string_tab[615]
#define __pyx_n_u_test_dt_conversion __pyx_string_tab[616]
#define __pyx_n_u_test_dt_generate __pyx_string_tab[617]
#define __pyx_n_u_test_dt_mainipulate __pyx_string_tab[618]
#define __pyx_n_u_test_dt_normalize_tz __pyx_string_tab[619]
#define __pyx_n_u_test_dt_type_check __pyx_string_tab[620]
#define __pyx_n_u_test_dt_type_check_locals_Custo __pyx_string_tab[621]
#define __pyx_n_u_test_dt_tzinfo __pyx_string_tab[622]
#define __pyx_n_u_test_is_leap_year __pyx_string_tab[623]
#define __pyx_n_u_test_iso_week1_mon_ord __pyx_string_tab[624]
#define __pyx_n_u_test_isocalendar __pyx_string_tab[625]
#define __pyx_n_u_test_localtime_n_gmtime __pyx_string_tab[626]
#define __pyx_n_u_test_math __pyx_string_tab[627]
#define __pyx_n_u_test_ndarray_dt64_conversion __pyx_string_tab[628]
#define __pyx_n_u_test_ndarray_dt64_type_check __pyx_string_tab[629]
#define __pyx_n_u_test_ndarray_generate __pyx_string_tab[630]
#define __pyx_n_u_test_ndarray_math __pyx_string_tab[631]
#define __pyx_n_u_test_ndarray_td64_conversion __pyx_string_tab[632]
#define __pyx_n_u_test_ndarray_td64_type_check __pyx_string_tab[633]
#define __pyx_n_u_test_ndarray_type_check __pyx_string_tab[634]
#define __pyx_n_u_test_numpy_share __pyx_string_tab[635]
#define __pyx_n_u_test_pairs __pyx_string_tab[636]
#define __pyx_n_u_test_parser __pyx_string_tab[637]
#define __pyx_n_u_test_quarter_of_month __pyx_string_tab[638]
#define __pyx_n_u_test_sec_to_us __pyx_string_tab[639]
#define __pyx_n_u_test_slice_to_ufloat __pyx_string_tab[640]
#define __pyx_n_u_test_slice_to_uint __pyx_string_tab[641]
#define __pyx_n_u_test_time_conversion __pyx_string_tab[642]
#define __pyx_n_u_test_time_generate __pyx_string_tab[643]
#define __pyx_n_u_test_time_type_check __pyx_string_tab[644]
#define __pyx_n_u_test_time_type_check_locals_Cus __pyx_string_tab[645]
#define __pyx_n_u_test_timedelta64_conversion __pyx_string_tab[646]
#define __pyx_n_u_test_timedelta64_type_check __pyx_string_tab[647]
#define __pyx_n_u_test_timedelta_conversion __pyx_string_tab[648]
#define __pyx_n_u_test_timedelta_conversion_local __pyx_string_tab[649]
#define __pyx_n_u_test_timedelta_generate __pyx_string_tab[650]
#define __pyx_n_u_test_timedelta_generate_locals __pyx_string_tab[651]
#define __pyx_n_u_test_timedelta_type_check __pyx_string_tab[652]
#define __pyx_n_u_test_timedelta_type_check_local __pyx_string_tab[653]
#define __pyx_n_u_test_tzinfo_access __pyx_string_tab[654]
#define __pyx_n_u_test_tzinfo_generate __pyx_string_tab[655]
#define __pyx_n_u_test_tzinfo_type_check __pyx_string_tab[656]
#define __pyx_n_u_test_utils __pyx_string_tab[657]
#define __pyx_n_u_test_weekday __pyx_string_tab[658]
#define __pyx_n_u_test_ymd_fr_iso __pyx_string_tab[659]
#define __pyx_n_u_test_ymd_fr_ord __pyx_string_tab[660]
#define __pyx_n_u_test_ymd_to_ord __pyx_string_tab[661]
#define __pyx_n_u_time __pyx_string_tab[662]
#define __pyx_n_u_time1 __pyx_string_tab[663]
#define __pyx_n_u_time2 __pyx_string_tab[664]
#define __pyx_n_u_timedelta __pyx_string_tab[665]
#define __pyx_n_u_timedelta64 __pyx_string_tab[666]
#define __pyx_n_u_timestamp __pyx_string_tab[667]
#define __pyx_n_u_timetuple __pyx_string_tab[668]
#define __pyx_n_u_timetz __pyx_string_tab[669]
#define __pyx_n_u_timezone __pyx_string_tab[670]
#define __pyx_n_u_tm __pyx_string_tab[671]
#define __pyx_n_u_tm_hour __pyx_string_tab[672]
#define __pyx_n_u_tm_isdst __pyx_string_tab[673]
#define __pyx_n_u_tm_mday __pyx_string_tab[674]
#define __pyx_n_u_tm_min __pyx_string_tab[675]
#define __pyx_n_u_tm_mon __pyx_string_tab[676]
#define __pyx_n_u_tm_sec __pyx_string_tab[677]
#define __pyx_n_u_tm_wday __pyx_string_tab[678]
#define __pyx_n_u_tm_yday __pyx_string_tab[679]
#define __pyx_n_u_tm_year __pyx_string_tab[680]
#define __pyx_n_u_tmp __pyx_string_tab[681]
#define __pyx_n_u_tmp1 __pyx_string_tab[682]
#define __pyx_n_u_tmp2 __pyx_string_tab[683]
#define __pyx_n_u_tmp3 __pyx_string_tab[684]
#define __pyx_n_u_to_integral_value __pyx_string_tab[685]
#define __pyx_n_u_to_unit __pyx_string_tab[686]
#define __pyx_n_u_today __pyx_string_tab[687]
#define __pyx_n_u_token __pyx_string_tab[688]
#define __pyx_n_u_toordinal __pyx_string_tab[689]
#define __pyx_n_u_total_seconds __pyx_string_tab[690]
#define __pyx_n_u_ts __pyx_string_tab[691]
#define __pyx_n_u_tz __pyx_string_tab[692]
#define __pyx_n_u_tz1 __pyx_string_tab[693]
#define __pyx_n_u_tz2 __pyx_string_tab[694]
#define __pyx_n_u_tz3 __pyx_string_tab[695]
#define __pyx_n_u_tz4 __pyx_string_tab[696]
#define __pyx_n_u_tz_str __pyx_string_tab[697]
#define __pyx_n_u_tzinfo __pyx_string_tab[698]
#define __pyx_n_u_tzname __pyx_string_tab[699]
#define __pyx_n_u_unit __pyx_string_tab[700]
#define __pyx_n_u_units __pyx_string_tab[701]
#define __pyx_n_u_universal __pyx_string_tab[702]
#define __pyx_n_u_us __pyx_string_tab[703]
#define __pyx_n_u_us_i __pyx_string_tab[704]
#define __pyx_n_u_utc __pyx_string_tab[705]
#define __pyx_n_u_utcoffset __pyx_string_tab[706]
#define __pyx_n_u_utctimetuple __pyx_string_tab[707]
#define __pyx_n_u_val __pyx_string_tab[708]
#define __pyx_n_u_value __pyx_string_tab[709]
#define __pyx_n_u_values __pyx_string_tab[710]
#define __pyx_n_u_w __pyx_string_tab[711]
#define __pyx_n_u_week __pyx_string_tab[712]
#define __pyx_n_u_weekday __pyx_string_tab[713]
#define __pyx_n_u_wkd __pyx_string_tab[714]
#define __pyx_n_u_wkd_i __pyx_string_tab[715]
#define __pyx_n_u_y __pyx_string_tab[716]
#define __pyx_n_u_year __pyx_string_tab[717]
#define __pyx_n_u_ymd __pyx_string_tab[718]
#define __pyx_n_u_ymd2ord __pyx_string_tab[719]
#define __pyx_n_u_yy __pyx_string_tab[720]
#define __pyx_n_u_z __pyx_string_tab[721]
#define __pyx_n_u_zone __pyx_string_tab[722]
#define __pyx_n_u_zoneinfo __pyx_string_tab[723]
#define __pyx_n_u_zulu __pyx_string_tab[724]
#define __pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime __pyx_string_tab[725]
#define __pyx_kp_b_PyObject_PyObject_tz_parse __pyx_string_tab[726]
#define __pyx_kp_b_iso88591_1_Qc_IU_3a_uAS_4r_Qe_q_d_6_L_6 __pyx_string_tab[727]
#define __pyx_kp_b_iso88591_1_U_G1_E_as_U_3a_2Rq_1C_AS_k_S __pyx_string_tab[728]
#define __pyx_kp_b_iso88591_1_U_uE_e5_fF_a_S_1_7q_b_at6_2_A __pyx_string_tab[729]
#define __pyx_kp_b_iso88591_1_q_8_QfD_89AS_3c_Cs_V1_89AS_3c __pyx_string_tab[730]
#define __pyx_kp_b_iso88591_1_vS_j_q_z_A_q_q_1_U_1_XQgQ_b_3 __pyx_string_tab[731]
#define __pyx_kp_b_iso88591_2V1AS_3c_V1_2V1F_t1_Q_2V1AS_3c __pyx_string_tab[732]
#define __pyx_kp_b_iso88591_5_4_1 __pyx_string_tab[733]
#define __pyx_kp_b_iso88591_6_Cs_S_8_QfCxq_XYavS_3c_Cq_XYav __pyx_string_tab[734]
#define __pyx_kp_b_iso88591_6_F_1Cs_6_F_1_6_s __pyx_string_tab[735]
#define __pyx_kp_b_iso88591_81_8_Qc_Cs_8_Qc_Cs_8_Qc_Cs_A_8 __pyx_string_tab[736]
#define __pyx_kp_b_iso88591_A_81_1Cs_5_aq_S_5_4_1 __pyx_string_tab[737]
#define __pyx_kp_b_iso88591_A_A_Q_Q_q_A_Q_A_Q_Q_a_Q_a_A_Q_Q __pyx_string_tab[738]
#define __pyx_kp_b_iso88591_A_A_Q_Q_q_A_Q_A_Q_Q_a_Q_a_A_Q_Q_2 __pyx_string_tab[739]
#define __pyx_kp_b_iso88591_A_A_U_G1_l_1_haq_t3e2Qd_81A_q_r __pyx_string_tab[740]
#define __pyx_kp_b_iso88591_A_A_U_G1_l_1_q_t3e2Qd_81A __pyx_string_tab[741]
#define __pyx_kp_b_iso88591_A_Qc_HE_Q_5_A_5_5QfF_j_vQ_2S_s __pyx_string_tab[742]
#define __pyx_kp_b_iso88591_A_Qc_q_oQa_t3e2QgQhaq __pyx_string_tab[743]
#define __pyx_kp_b_iso88591_A_Rwa_IU_3a_uAS_4r_Qe_q_j_wa_ha __pyx_string_tab[744]
#define __pyx_kp_b_iso88591_A_a_a_1_1_Q_q_q_Q_Q_Q_q_A_A_A_1 __pyx_string_tab[745]
#define __pyx_kp_b_iso88591_A_c_Qhj_A_c_Qhj_Cxq_c_Qhj_Cxq_S __pyx_string_tab[746]
#define __pyx_kp_b_iso88591_F_1Bd_uAQc_2U_Cwaq_E_Ba_L_M_Kq __pyx_string_tab[747]
#define __pyx_kp_b_iso88591_Ja_U_1L_Ba_j_CuHAQ_vS_c_2T_E_A __pyx_string_tab[748]
#define __pyx_kp_b_iso88591_Q_6_Cs_S_AS_1_6_c_Cs_Rq_AS_q_6 __pyx_string_tab[749]
#define __pyx_kp_b_iso88591_Q_8_QfD_85_Cs_S_85_Cs_S_85_Cs_S __pyx_string_tab[750]
#define __pyx_kp_b_iso88591_Q_8_QfD_85_Cs_XQ_85_Cs_XQa_85_C __pyx_string_tab[751]
#define __pyx_kp_b_iso88591_Q_A_RvQ_E_as_q_a_AV1_4s_r_axq __pyx_string_tab[752]
#define __pyx_kp_b_iso88591_Q_A_RvQ_E_as_q_a_q_4s_r_Qhaq __pyx_string_tab[753]
#define __pyx_kp_b_iso88591_Q_A_a_a_Q_q_q_Q_1_A_A_A_q_Q_q_1 __pyx_string_tab[754]
#define __pyx_kp_b_iso88591_Q_A_s_1_r_6_1_6_1_Qd_Q_Qd_Q_7_Q __pyx_string_tab[755]
#define __pyx_kp_b_iso88591_Q_A_z_1_q_z_vQc_L __pyx_string_tab[756]
#define __pyx_kp_b_iso88591_Q_Q_U_uE_e5_fA_E_b_Q_2_A_WA_gQa __pyx_string_tab[757]
#define __pyx_kp_b_iso88591_Q_a_1_5_7_4q_5_6_a_5_q_A_aq_1_6 __pyx_string_tab[758]
#define __pyx_kp_b_iso88591_Q_a_5_aq_q_3a_5_4_1 __pyx_string_tab[759]
#define __pyx_kp_b_iso88591_Q_aq_7_1_q_4waq_1A_nAQ __pyx_string_tab[760]
#define __pyx_kp_b_iso88591_Q_q_6_Cs_S_1HJavS_XYavS_3c_Cq_1 __pyx_string_tab[761]
#define __pyx_kp_b_iso88591_QfF_c_e5_T_a_d_AQ_l_1_s_S_1C_1C __pyx_string_tab[762]
#define __pyx_kp_b_iso88591_U_3a_aq_a_t3e2Qd_81A_6_A_A_Q __pyx_string_tab[763]
#define __pyx_kp_b_iso88591_a_6_Cs_S_1HJavS_1HJavT_1HJawd_1 __pyx_string_tab[764]
#define __pyx_kp_b_iso88591_a_Q_U_uE_e5_fA_E_b_Q_2_Q_WA_waq __pyx_string_tab[765]
#define __pyx_kp_b_iso88591_a_U_1_Cq_2T_e1_Qa_4z_4_Qa_2T_e1 __pyx_string_tab[766]
#define __pyx_kp_b_iso88591_a_q_1_7_1_q_4waq_1A_nAQ __pyx_string_tab[767]
#define __pyx_kp_b_iso88591_d_Q_q_1N_q_z_f_Gr_TU __pyx_string_tab[768]
#define __pyx_kp_b_iso88591_q_1HJavS_as_S_HE_S_3a_Qc_Cq_T_S __pyx_string_tab[769]
#define __pyx_kp_b_iso88591_q_5_3c_7_S_1_7_S_1_6_Cs_6_Cs_Q __pyx_string_tab[770]
#define __pyx_kp_b_iso88591_q_85_s_D_s_6_A_AQ_5_Zt1_1_1_1_1 __pyx_string_tab[771]
#define __pyx_kp_b_iso88591_q_Q_A_89E_F_89AXZq_c_S_asRS_89A __pyx_string_tab[772]
#define __pyx_kp_b_iso88591_q_Q_c_D_xq0EU_c_D_xq0EU_D_4whax __pyx_string_tab[773]
#define __pyx_kp_b_iso88591_q_Qb_aq_3d_Qb_at6_Qb_aq_3d_Q_Qb __pyx_string_tab[774]
#define __pyx_kp_b_iso88591_q_Qc_IU_3a_uAS_4r_Qe_q_k_q_d_6 __pyx_string_tab[775]
#define __pyx_kp_b_iso88591_q_U_uE_e5_fA_1_5Qa_b_aq_e5_m1A __pyx_string_tab[776]
#define __pyx_kp_b_iso88591_q_U_uE_e5_fA_1_b_aq_e5_wfN_1_c __pyx_string_tab[777]
#define __pyx_kp_b_iso88591_q_XQ_85_Cq_7_1_Qc_A_7_1_4_AQ_A __pyx_string_tab[778]
#define __pyx_kp_b_iso88591_q_XQ_85_a_7_1_Qc_A_7_1_4_AQ_A __pyx_string_tab[779]
#define __pyx_kp_b_iso88591_q_q_U_3a_1_oQfA_oQa_t3e2Qd_81A __pyx_string_tab[780]
#define __pyx_kp_b_iso88591_vS_j_q_z_A_q_A_A_q_q_1_U_1_XQgQ __pyx_string_tab[781]
#define __pyx_float_0_0 __pyx_number_tab[0]
#define __pyx_float_neg_0_1 __pyx_number_tab[1]
#define __pyx_float_0_1 __pyx_number_tab[2]
#define __pyx_float_neg_0_4 __pyx_number_tab[3]
#define __pyx_float_0_4 __pyx_number_tab[4]
#define __pyx_float_neg_0_5 __pyx_number_tab[5]
#define __pyx_float_0_5 __pyx_number_tab[6]
#define __pyx_float_neg_0_6 __pyx_number_tab[7]
#define __pyx_float_0_6 __pyx_number_tab[8]
#define __pyx_float_1_0 __pyx_number_tab[9]
#define __pyx_float_neg_60_0 __pyx_number_tab[10]
#define __pyx_float_60_0 __pyx_number_tab[11]
#define __pyx_float_neg_1eneg_06 __pyx_number_tab[12]
#define __pyx_float_1eneg_06 __pyx_number_tab[13]
#define __pyx_float_neg_0_000001 __pyx_number_tab[14]
#define __pyx_float_neg_0_999999 __pyx_number_tab[15]
#define __pyx_float_0_999999 __pyx_number_tab[16]
#define __pyx_float_neg_1_000001 __pyx_number_tab[17]
#define __pyx_float_1_000001 __pyx_number_tab[18]
#define __pyx_float_0_0000004 __pyx_number_tab[19]
#define __pyx_float_0_0000005 __pyx_number_tab[20]
#define __pyx_float_1000000_0 __pyx_number_tab[21]
#define __pyx_float_neg_31536000_0 __pyx_number_tab[22]
#define __pyx_float_neg_59_9999996 __pyx_number_tab[23]
#define __pyx_float_59_9999996 __pyx_number_tab[24]
#define __pyx_float_946684800_0 __pyx_number_tab[25]
#define __pyx_float_12345_678901 __pyx_number_tab[26]
#define __pyx_float_neg_2208988800_0 __pyx_number_tab[27]
#define __pyx_float_neg_86399_9999996 __pyx_number_tab[28]
#define __pyx_float_86399_9999996 __pyx_number_tab[29]
#define __pyx_float_neg_999999_9999995 __pyx_number_tab[30]
#define __pyx_float_999999_9999995 __pyx_number_tab[31]
#define __pyx_float_neg_31556926_123456 __pyx_number_tab[32]
#define __pyx_float_31556926_123456 __pyx_number_tab[33]
#define __pyx_float_neg_1234567890_123456 __pyx_number_tab[34]
#define __pyx_float_1234567890_123456 __pyx_number_tab[35]
#define __pyx_float_2147483647_999999 __pyx_number_tab[36]
#define __pyx_float_neg_2147483648_000001 __pyx_number_tab[37]
#define __pyx_float_1672531199_9999996 __pyx_number_tab[38]
#define __pyx_int_0 __pyx_number_tab[39]
#define __pyx_int_neg_1 __pyx_number_tab[40]
#define __pyx_int_1 __pyx_number_tab[41]
#define __pyx_int_neg_2 __pyx_number_tab[42]
#define __pyx_int_2 __pyx_number_tab[43]
#define __pyx_int_neg_3 __pyx_number_tab[44]
#define __pyx_int_3 __pyx_number_tab[45]
#define __pyx_int_neg_4 __pyx_number_tab[46]
#define __pyx_int_4 __pyx_number_tab[47]
#define __pyx_int_neg_5 __pyx_number_tab[48]
#define __pyx_int_5 __pyx_number_tab[49]
#define __pyx_int_6 __pyx_number_tab[50]
#define __pyx_int_neg_7 __pyx_number_tab[51]
#define __pyx_int_7 __pyx_number_tab[52]
#define __pyx_int_neg_8 __pyx_number_tab[53]
#define __pyx_int_8 __pyx_number_tab[54]
#define __pyx_int_neg_9 __pyx_number_tab[55]
#define __pyx_int_9 __pyx_number_tab[56]
#define __pyx_int_neg_10 __pyx_number_tab[57]
#define __pyx_int_10 __pyx_number_tab[58]
#define __pyx_int_neg_11 __pyx_number_tab[59]
#define __pyx_int_11 __pyx_number_tab[60]
#define __pyx_int_neg_12 __pyx_number_tab[61]
#define __pyx_int_12 __pyx_number_tab[62]
#define __pyx_int_neg_13 __pyx_number_tab[63]
#define __pyx_int_13 __pyx_number_tab[64]
#define __pyx_int_neg_14 __pyx_number_tab[65]
#define __pyx_int_14 __pyx_number_tab[66]
#define __pyx_int_neg_15 __pyx_number_tab[67]
#define __pyx_int_15 __pyx_number_tab[68]
#define __pyx_int_neg_16 __pyx_number_tab[69]
#define __pyx_int_16 __pyx_number_tab[70]
#define __pyx_int_17 __pyx_number_tab[71]
#define __pyx_int_neg_23 __pyx_number_tab[72]
#define __pyx_int_23 __pyx_number_tab[73]
#define __pyx_int_25 __pyx_number_tab[74]
#define __pyx_int_26 __pyx_number_tab[75]
#define __pyx_int_29 __pyx_number_tab[76]
#define __pyx_int_30 __pyx_number_tab[77]
#define __pyx_int_31 __pyx_number_tab[78]
#define __pyx_int_34 __pyx_number_tab[79]
#define __pyx_int_neg_35 __pyx_number_tab[80]
#define __pyx_int_35 __pyx_number_tab[81]
#define __pyx_int_45 __pyx_number_tab[82]
#define __pyx_int_56 __pyx_number_tab[83]
#define __pyx_int_neg_59 __pyx_number_tab[84]
#define __pyx_int_59 __pyx_number_tab[85]
#define __pyx_int_neg_60 __pyx_number_tab[86]
#define __pyx_int_60 __pyx_number_tab[87]
#define __pyx_int_128 __pyx_number_tab[88]
#define __pyx_int_neg_1000 __pyx_number_tab[89]
#define __pyx_int_1000 __pyx_number_tab[90]
#define __pyx_int_1001 __pyx_number_tab[91]
#define __pyx_int_1970 __pyx_number_tab[92]
#define __pyx_int_1971 __pyx_number_tab[93]
#define __pyx_int_2011 __pyx_number_tab[94]
#define __pyx_int_2021 __pyx_number_tab[95]
#define __pyx_int_2024 __pyx_number_tab[96]
#define __pyx_int_2025 __pyx_number_tab[97]
#define __pyx_int_3600 __pyx_number_tab[98]
#define __pyx_int_10000 __pyx_number_tab[99]
#define __pyx_int_neg_86399 __pyx_number_tab[100]
#define __pyx_int_86399 __pyx_number_tab[101]
#define __pyx_int_neg_86400 __pyx_number_tab[102]
#define __pyx_int_86400 __pyx_number_tab[103]
#define __pyx_int_neg_100000 __pyx_number_tab[104]
#define __pyx_int_100000 __pyx_number_tab[105]
#define __pyx_int_120000 __pyx_number_tab[106]
#define __pyx_int_123456 __pyx_number_tab[107]
#define __pyx_int_neg_999999 __pyx_number_tab[108]
#define __pyx_int_999999 __pyx_number_tab[109]
#define __pyx_int_1000000 __pyx_number_tab[110]
#define __pyx_int_neg_1000001 __pyx_number_tab[111]
#define __pyx_int_1000001 __pyx_number_tab[112]
#define __pyx_int_9999999 __pyx_number_tab[113]
#define __pyx_int_neg_59999999 __pyx_number_tab[114]
#define __pyx_int_59999999 __pyx_number_tab[115]
#define __pyx_int_neg_60000000 __pyx_number_tab[116]
#define __pyx_int_60000000 __pyx_number_tab[117]
#define __pyx_int_12345678901 __pyx_number_tab[118]
#define __pyx_int_neg_86399999999 __pyx_number_tab[119]
#define __pyx_int_86399999999 __pyx_number_tab[120]
#define __pyx_int_86400000000 __pyx_number_tab[121]
#define __pyx_int_neg_999999999999 __pyx_number_tab[122]
#define __pyx_int_999999999999 __pyx_number_tab[123]
#define __pyx_int_0x1cb36b5f2dc0 __pyx_number_tab[124]
#define __pyx_int_neg_31536000000000 __pyx_number_tab[125]
#define __pyx_int_neg_31556926123456 __pyx_number_tab[126]
#define __pyx_int_0x35d013b37e000 __pyx_number_tab[127]
#define __pyx_int_0x462d53c8abac0 __pyx_number_tab[128]
#define __pyx_int_0x5f128840d3fff __pyx_number_tab[129]
#define __pyx_int_0x7a11fffffffff __pyx_number_tab[130]
#define __pyx_int_neg_1234567890123456 __pyx_number_tab[131]
#define __pyx_int_neg_2147483648000001 __pyx_number_tab[132]
#define __pyx_int_neg_2208988800000000 __pyx_number_tab[133]
#define __pyx_int_0x4000000000000000 __pyx_number_tab[134]
#define __pyx_int_0x4000000000000002 __pyx_number_tab[135]
#define __pyx_int_0x400000000000000a __pyx_number_tab[136]
#define __pyx_int_0x7fffffffffffffff __pyx_number_tab[137]
#define __pyx_int_neg_4611686018427387904 __pyx_number_tab[138]
#define __pyx_int_neg_4611686018427387906 __pyx_number_tab[139]
#define __pyx_int_neg_4611686018427387914 __pyx_number_tab[140]
#define __pyx_int_neg_9223372036854775807 __pyx_number_tab[141]
/* #### 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_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_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);
  for (int i=0; i<175; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<56; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<782; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<142; ++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_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_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);
  for (int i=0; i<175; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<56; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<782; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<142; ++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 ### */

/* "../../../../../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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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/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(2, 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(2, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 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(3, 289, __pyx_L1_error);
  __pyx_t_2 = ((PyObject *)PyDateTimeAPI->Date_FromTimestamp(((PyObject *)PyDateTimeAPI->DateType), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 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;
}

/* "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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":193
 *     >>> (num % div) + offset
 *     """
 *     if div == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:
*/
  }

  /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":195
 *     if div == 0:
 *         raise ZeroDivisionError("math_mod: division by zero.")
 *     if div == 1 or div == -1:             # <<<<<<<<<<<<<<
 *         return offset
 * 
*/
    break;
    default: break;
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":201
 *     with cython.cdivision(True):
 *         r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":203
 *     if r == 0:
 *         return offset
 *     if (r ^ div) < 0:  # different signs  adjust             # <<<<<<<<<<<<<<
 *         r += div
 *     return r + offset
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":228
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset          # exact division
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;
    }

    /* "cytimes/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:;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":263
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;
    }

    /* "cytimes/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:;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":298
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset        # exact division
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;
    }

    /* "cytimes/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:;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":333
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":337
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up
 *         q += 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q + 1);

    /* "cytimes/utils.pxd":336
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) >= 0:  # same sign  bump up             # <<<<<<<<<<<<<<
 *         q += 1
 *     return q + offset
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":361
 *     with cython.cdivision(True):
 *         q = num / div; r = num % div
 *     if r == 0:             # <<<<<<<<<<<<<<
 *         return q + offset         # exact division
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":365
 * 
 *     if (num ^ div) < 0:        # different sign  bump down
 *         q -= 1             # <<<<<<<<<<<<<<
 *     return q + offset
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "cytimes/utils.pxd":364
 *         return q + offset         # exact division
 * 
 *     if (num ^ div) < 0:        # different sign  bump down             # <<<<<<<<<<<<<<
 *         q -= 1
 *     return q + offset
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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")
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":525
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":526
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":542
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":543
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":561
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":562
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":580
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":581
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":599
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":600
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":618
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":619
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":637
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":638
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":657
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":658
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len != 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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))
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":676
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":675
 *     :returns `<'bool'>`: True if `token` only contains ASCII digits; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":677
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":679
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":699
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":700
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":702
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":722
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":723
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":725
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":745
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":746
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":748
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":768
 *     """
 *     if token is None:
 *         return False             # <<<<<<<<<<<<<<
 *     if token_len <= 0:
 *         token_len = str_len(token)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":767
 *     :returns `<'bool'>`: True if `token` only contains alphabetic characters; False otherwise.
 *     """
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return False
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":769
 *     if token is None:
 *         return False
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":771
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef Py_ssize_t i
*/
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/utils.pxd":777
 *         if not is_alpha(str_read(token, i)):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . parse
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":794
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return 0
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":796
 *     if token is None:
 *         return 0
 *     if token_len <= 0:             # <<<<<<<<<<<<<<
 *         token_len = str_len(token)
 *     if token_len == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":799
 *         token_len = str_len(token)
 *     if token_len == 0:
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     cdef:
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":798
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if token_len == 0:             # <<<<<<<<<<<<<<
 *         return 0
 * 
*/
  }

  /* "cytimes/utils.pxd":802
 * 
 *     cdef:
 *         bint has_num = False             # <<<<<<<<<<<<<<
 *         bint has_dot = False
 *         Py_ssize_t i
*/
  __pyx_v_has_num = 0;

  /* "cytimes/utils.pxd":803
 *     cdef:
 *         bint has_num = False
 *         bint has_dot = False             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_has_dot = 0;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "cytimes/utils.pxd":813
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 return 0             # <<<<<<<<<<<<<<
 *             has_dot = True
 *         else:
*/
        __pyx_r = 0;
        goto __pyx_L0;

        /* "cytimes/utils.pxd":812
 *             has_num = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 return 0
 *             has_dot = True
*/
      }

      /* "cytimes/utils.pxd":814
 *             if has_dot:
 *                 return 0
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
*/
      __pyx_v_has_dot = 1;

      /* "cytimes/utils.pxd":811
 *         if is_ascii_digit(ch):
 *             has_num = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 return 0
*/
      goto __pyx_L8;
    }

    /* "cytimes/utils.pxd":816
 *             has_dot = True
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if not has_num:
*/
    /*else*/ {
      __pyx_r = 0;
      goto __pyx_L0;
    }
    __pyx_L8:;
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":819
 * 
 *     if not has_num:
 *         return 0             # <<<<<<<<<<<<<<
 *     return 2 if has_dot else 1
 * 
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":818
 *             return 0
 * 
 *     if not has_num:             # <<<<<<<<<<<<<<
 *         return 0
 *     return 2 if has_dot else 1
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":839
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":843
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 4:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":886
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":890
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":925
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":929
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":964
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":968
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1002
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1006
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1033
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1037
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 3:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1076
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1080
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1115
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1119
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 2:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1172
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 *     if token_len <= 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1176
 *     if token_len <= 0:
 *         token_len = str_len(token)
 *     if pos < 0 or token_len - pos < 1:             # <<<<<<<<<<<<<<
 *         return -1  # exit: invalid
 * 
*/
  }

  /* "cytimes/utils.pxd":1181
 *     # Parse value
 *     cdef:
 *         int f_size = 0             # <<<<<<<<<<<<<<
 *         int out = 0
 *         Py_UCS4 ch
*/
  __pyx_v_f_size = 0;

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1225
 *     # Validate
 *     cdef sf out
 *     if token is None:             # <<<<<<<<<<<<<<
 *         out.second = out.microsecond = -1
 *         return out  # exit: invalid
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/utils.pxd":1240
 *         int f_size = 0
 *         bint has_dot = False
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         Py_UCS4 ch
 * 
*/
  __pyx_v_has_digit = 0;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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));

        /* "cytimes/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;
      }

      /* "cytimes/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));

        /* "cytimes/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:;

      /* "cytimes/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;

      /* "cytimes/utils.pxd":1252
 *                 f_size += 1
 *             has_digit = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         elif ch == 46:  # '.'
 *             if has_dot:
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "cytimes/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;
    }

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      if (__pyx_v_has_dot) {

        /* "cytimes/utils.pxd":1255
 *         elif ch == 46:  # '.'
 *             if has_dot:
 *                 break             # <<<<<<<<<<<<<<
 *             has_dot = True
 *             pos += 1
*/
        goto __pyx_L9_break;

        /* "cytimes/utils.pxd":1254
 *             pos += 1
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 break
 *             has_dot = True
*/
      }

      /* "cytimes/utils.pxd":1256
 *             if has_dot:
 *                 break
 *             has_dot = True             # <<<<<<<<<<<<<<
 *             pos += 1
 *         else:
*/
      __pyx_v_has_dot = 1;

      /* "cytimes/utils.pxd":1257
 *                 break
 *             has_dot = True
 *             pos += 1             # <<<<<<<<<<<<<<
 *         else:
 *             break
*/
      __pyx_v_pos = (__pyx_v_pos + 1);

      /* "cytimes/utils.pxd":1253
 *             has_digit = True
 *             pos += 1
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 break
*/
      goto __pyx_L12;
    }

    /* "cytimes/utils.pxd":1259
 *             pos += 1
 *         else:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     # No digits / second out of range: invalid
*/
    /*else*/ {
      goto __pyx_L9_break;
    }
    __pyx_L12:;
  }
  __pyx_L9_break:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1267
 *     elif not has_dot:
 *         out.second = i_part
 *         out.microsecond = -1             # <<<<<<<<<<<<<<
 *     # Float: second & microsecond
 *     else:
*/
    __pyx_v_out.microsecond = -1;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
  switch (__pyx_v_fraction_size) {
    case 6:

    /* "cytimes/utils.pxd":1292
 *     """
 *     if fraction_size == 6:
 *         return fraction             # <<<<<<<<<<<<<<
 *     elif fraction_size == 5:
 *         return fraction * 10
*/
    __pyx_r = __pyx_v_fraction;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":1291
 *         # 123 milliseconds  123000 microseconds
 *     """
 *     if fraction_size == 6:             # <<<<<<<<<<<<<<
 *         return fraction
 *     elif fraction_size == 5:
*/
    break;
    case 5:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1293
 *     if fraction_size == 6:
 *         return fraction
 *     elif fraction_size == 5:             # <<<<<<<<<<<<<<
 *         return fraction * 10
 *     elif fraction_size == 4:
*/
    break;
    case 4:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1295
 *     elif fraction_size == 5:
 *         return fraction * 10
 *     elif fraction_size == 4:             # <<<<<<<<<<<<<<
 *         return fraction * 100
 *     elif fraction_size == 3:
*/
    break;
    case 3:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1301
 *     elif fraction_size == 2:
 *         return fraction * 10_000
 *     elif fraction_size == 1:             # <<<<<<<<<<<<<<
 *         return fraction * 100_000
 *     else:
*/
    break;
    default:

    /* "cytimes/utils.pxd":1304
 *         return fraction * 100_000
 *     else:
 *         return -1             # <<<<<<<<<<<<<<
 * 
 * # . slice and convert
*/
    __pyx_r = -1;
    goto __pyx_L0;
    break;
  }

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":1331
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_uint: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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))
 * 
*/
  }

  /* "cytimes/utils.pxd":1345
 *     # Slice and convert
 *     cdef:
 *         unsigned long long out = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t i
 *         Py_UCS4 ch
*/
  __pyx_v_out = 0;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)) {

      /* "cytimes/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;

      /* "cytimes/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;

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

      /* "cytimes/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' "
*/
    }

    /* "cytimes/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));
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":1383
 *     """
 *     # Validate
 *     if token is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("slice_to_ufloat: 'token' cannot be None")
 *     if start < 0:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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))
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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));

        /* "cytimes/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;
      }

      /* "cytimes/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));

        /* "cytimes/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:;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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)) {

      /* "cytimes/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)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1415
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot convert '%s' to non-negative float: "
*/
      }

      /* "cytimes/utils.pxd":1420
 *                     "contains more than one decimal point." % (token[start: end])
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      __pyx_v_has_dot = 1;

      /* "cytimes/utils.pxd":1414
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L10;
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:;
  }

  /* "cytimes/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)) {

    /* "cytimes/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;

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

    /* "cytimes/utils.pxd":1427
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot convert '%s' to non-negative float: "
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1432
 *             "no digits found." % (token[start: end])
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         return (<double> i_part)
 *     else:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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)
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/utils.pxd":1467
 *     # Slice and convert
 *     cdef:
 *         long long out = 0             # <<<<<<<<<<<<<<
 *         bint has_digit = False
 *         bint has_pos = False
*/
  __pyx_v_out = 0;

  /* "cytimes/utils.pxd":1468
 *     cdef:
 *         long long out = 0
 *         bint has_digit = False             # <<<<<<<<<<<<<<
 *         bint has_pos = False
 *         bint neg = False
*/
  __pyx_v_has_digit = 0;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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));

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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) {

      /* "cytimes/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)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1480
 *             has_digit = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "cytimes/utils.pxd":1486
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

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

        /* "cytimes/utils.pxd":1485
 *                     "negative sign found after digits." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1491
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1490
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/utils.pxd":1495
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "cytimes/utils.pxd":1479
 *             out = out * 10 + (ord(ch) - 48)
 *             has_digit = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "cytimes/utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "cytimes/utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1497
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1503
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1502
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "cytimes/utils.pxd":1508
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to integer: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_9 = NULL;

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

        /* "cytimes/utils.pxd":1507
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to integer: "
*/
      }

      /* "cytimes/utils.pxd":1512
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "cytimes/utils.pxd":1496
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "cytimes/utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "cytimes/utils.pxd":1514
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "cytimes/utils.pxd":1513
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:;
  }

  /* "cytimes/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)) {

    /* "cytimes/utils.pxd":1522
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to integer: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

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

    /* "cytimes/utils.pxd":1521
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to integer: no digits found." % token
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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)
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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));

        /* "cytimes/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;
      }

      /* "cytimes/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));

        /* "cytimes/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:;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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) {

      /* "cytimes/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)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1579
 *             has_digit = True
 *         elif ch == 46:  # '.'
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/utils.pxd":1584
 *                     "contains more than one decimal point." % token
 *                 )
 *             has_dot = True             # <<<<<<<<<<<<<<
 *         elif ch == 45:  # '-'
 *             if has_digit:
*/
      __pyx_v_has_dot = 1;

      /* "cytimes/utils.pxd":1578
 *                 f_scale *= 0.1
 *             has_digit = True
 *         elif ch == 46:  # '.'             # <<<<<<<<<<<<<<
 *             if has_dot:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "cytimes/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) {

      /* "cytimes/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)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1586
 *             has_dot = True
 *         elif ch == 45:  # '-'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1592
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "negative sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1591
 *                     "negative sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "cytimes/utils.pxd":1597
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one negative sign." % token
*/
        __pyx_t_9 = NULL;

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

        /* "cytimes/utils.pxd":1596
 *                     "negative sign found after decimal point." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1602
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1601
 *                     "contains more than one negative sign." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/utils.pxd":1606
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             neg = True             # <<<<<<<<<<<<<<
 *         elif ch == 43:  # '+'
 *             if has_digit:
*/
      __pyx_v_neg = 1;

      /* "cytimes/utils.pxd":1585
 *                 )
 *             has_dot = True
 *         elif ch == 45:  # '-'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "cytimes/utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
    __pyx_t_1 = (__pyx_v_ch == 43);
    if (__pyx_t_1) {

      /* "cytimes/utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_has_digit)) {

        /* "cytimes/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;

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

        /* "cytimes/utils.pxd":1608
 *             neg = True
 *         elif ch == 43:  # '+'
 *             if has_digit:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1614
 *                 )
 *             if has_dot:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "positive sign found after decimal point." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1613
 *                     "positive sign found after digits." % token
 *                 )
 *             if has_dot:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/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)) {

        /* "cytimes/utils.pxd":1619
 *                 )
 *             if has_pos:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains more than one positive sign." % token
*/
        __pyx_t_9 = NULL;

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

        /* "cytimes/utils.pxd":1618
 *                     "positive sign found after decimal point." % token
 *                 )
 *             if has_pos:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      if (unlikely(__pyx_v_neg)) {

        /* "cytimes/utils.pxd":1624
 *                 )
 *             if neg:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     "Cannot parse '%s' to float: "
 *                     "contains mixed positive and negative sign." % token
*/
        __pyx_t_3 = NULL;

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

        /* "cytimes/utils.pxd":1623
 *                     "contains more than one positive sign." % token
 *                 )
 *             if neg:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     "Cannot parse '%s' to float: "
*/
      }

      /* "cytimes/utils.pxd":1628
 *                     "contains mixed positive and negative sign." % token
 *                 )
 *             has_pos = True             # <<<<<<<<<<<<<<
 *         elif not has_digit:
 *             continue
*/
      __pyx_v_has_pos = 1;

      /* "cytimes/utils.pxd":1607
 *                 )
 *             neg = True
 *         elif ch == 43:  # '+'             # <<<<<<<<<<<<<<
 *             if has_digit:
 *                 raise ValueError(
*/
      goto __pyx_L7;
    }

    /* "cytimes/utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    __pyx_t_1 = (!__pyx_v_has_digit);
    if (likely(__pyx_t_1)) {

      /* "cytimes/utils.pxd":1630
 *             has_pos = True
 *         elif not has_digit:
 *             continue             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError(
*/
      goto __pyx_L5_continue;

      /* "cytimes/utils.pxd":1629
 *                 )
 *             has_pos = True
 *         elif not has_digit:             # <<<<<<<<<<<<<<
 *             continue
 *         else:
*/
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:;
  }

  /* "cytimes/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)) {

    /* "cytimes/utils.pxd":1638
 * 
 *     if not has_digit:
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
*/
    __pyx_t_13 = NULL;

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

    /* "cytimes/utils.pxd":1637
 *             )
 * 
 *     if not has_digit:             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             "Cannot parse '%s' to float: no digits found." % token
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":1641
 *             "Cannot parse '%s' to float: no digits found." % token
 *         )
 *     elif not has_dot:             # <<<<<<<<<<<<<<
 *         out = (<double> i_part)
 *     else:
*/
    goto __pyx_L18;
  }

  /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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)) {

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

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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]);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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)) {

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

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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]);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":1774
 *     ```
 *     """
 *     if not math.isfinite(value):             # <<<<<<<<<<<<<<
 *         raise OverflowError("Seconds value must be finite, got '%s'" % value)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":1816
 *     """
 *     # Validate format
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":1818
 *     if fmt is None:
 *         raise ValueError("tm_strformat: 'fmt' cannot be None")
 *     if str_len(fmt) == 0:             # <<<<<<<<<<<<<<
 *         return fmt
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":1835
 *         size_t n
 * 
 *     while True:             # <<<<<<<<<<<<<<
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
*/
  while (1) {

    /* "cytimes/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));

    /* "cytimes/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)) {

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

      /* "cytimes/utils.pxd":1838
 *         # Allocate buffer
 *         buf = <char*> stdlib.malloc(cap)
 *         if buf == NULL:             # <<<<<<<<<<<<<<
 *             raise MemoryError("tm_strformat: failed to allocate buffer")
 * 
*/
    }

    /* "cytimes/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));

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":1845
 *         if n > 0:
 *             # Decode as UTF-8 (assumes UTF-8 C locale)
 *             try:             # <<<<<<<<<<<<<<
 *                 return PyUnicode_DecodeUTF8(buf, n, NULL)
 *             finally:
*/
      /*try:*/ {

        /* "cytimes/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;
      }

      /* "cytimes/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;
        }
      }

      /* "cytimes/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:
*/
    }

    /* "cytimes/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);

    /* "cytimes/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)) {

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

      /* "cytimes/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
*/
    }

    /* "cytimes/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);
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/utils.pxd":1930
 *         # Y/M/D from ordinal
 *         q = sec / SS_DAY; r = sec % SS_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *             r += SS_DAY
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/utils.pxd":1972
 *         # Hour
 *         r = value % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += US_DAY
 *         out.hour   = r / US_HOUR;   r %= US_HOUR
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":1980
 *         out.second = r / US_SECOND; r %= US_SECOND
 *         # Microsecond
 *         out.microsecond = r             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
  __pyx_v_out.microsecond = __pyx_v_r;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2007
 *     """
 *     with cython.cdivision(True):
 *         if (year % 4) != 0:             # <<<<<<<<<<<<<<
 *             return False
 *         if (year % 100) != 0:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2010
 *             return False
 *         if (year % 100) != 0:
 *             return True             # <<<<<<<<<<<<<<
 *         return (year % 400) == 0
 * 
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":2009
 *         if (year % 4) != 0:
 *             return False
 *         if (year % 100) != 0:             # <<<<<<<<<<<<<<
 *             return True
 *         return (year % 400) == 0
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":2046
 *     with cython.cdivision(True):
 *         # Positive
 *         if yy >= 0:             # <<<<<<<<<<<<<<
 *             out = (yy // 4) - (yy // 100) + (yy // 400)
 * 
*/
    goto __pyx_L3;
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":2053
 *             # floor(yy / 4)
 *             q4, r = yy / 4, yy % 4
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q4 -= 1
 *             # floor(yy / 100)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":2057
 *             # floor(yy / 100)
 *             q100, r = yy / 100, yy % 100
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q100 -= 1
 *             # floor(yy / 400)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":2061
 *             # floor(yy / 400)
 *             q400, r = yy / 400, yy % 400
 *             if r != 0:             # <<<<<<<<<<<<<<
 *                 q400 -= 1
 *             out = q4 - q100 + q400
*/
    }

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2133
 *     """
 *     # Jan - Mar & out-of-range: Q1
 *     if month < 4:             # <<<<<<<<<<<<<<
 *         return 1
 *     # Apr - Jun: Q2
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2137
 *     # Apr - Jun: Q2
 *     elif month < 7:
 *         return 2             # <<<<<<<<<<<<<<
 *     # Jul - Sep: Q3
 *     elif month < 10:
*/
    __pyx_r = 2;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":2136
 *         return 1
 *     # Apr - Jun: Q2
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 2
 *     # Jul - Sep: Q3
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2140
 *     # Jul - Sep: Q3
 *     elif month < 10:
 *         return 3             # <<<<<<<<<<<<<<
 *     # Oct - Dec & out-of-range: Q4
 *     else:
*/
    __pyx_r = 3;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":2139
 *         return 2
 *     # Jul - Sep: Q3
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 3
 *     # Oct - Dec & out-of-range: Q4
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2159
 *     if month < 4: # Q1
 *         return 91 if is_leap_year(year) else 90
 *     elif month < 7:             # <<<<<<<<<<<<<<
 *         return 91  # Q2
 *     else:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2180
 *         return 0  # Q1
 *     cdef int leap = <int> is_leap_year(year)
 *     if month < 7:             # <<<<<<<<<<<<<<
 *         return 90 + leap  # Q2
 *     elif month < 10:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2182
 *     if month < 7:
 *         return 90 + leap  # Q2
 *     elif month < 10:             # <<<<<<<<<<<<<<
 *         return 181 + leap # Q3
 *     else:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2233
 *     """
 *     # Jan(1) or out-of-range: 0 days
 *     if month <= 1:             # <<<<<<<<<<<<<<
 *         return 0
 *     # Feb(2): 31 days
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2236
 *         return 0
 *     # Feb(2): 31 days
 *     if month == 2:             # <<<<<<<<<<<<<<
 *         return 31
 *     # Mar(3)..Dec(12)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/utils.pxd":2283
 * 
 *     # ISO year
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         iso_year = year - 1
 *         w1 = iso_week1_mon_ord(iso_year)
*/
    goto __pyx_L3;
  }

  /* "cytimes/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));

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/utils.pxd":2292
 *             w1 = w1_next
 *         else:
 *             iso_year = year             # <<<<<<<<<<<<<<
 *             w1 = ord_w1
 * 
*/
    /*else*/ {
      __pyx_v_iso_year = __pyx_v_year;

      /* "cytimes/utils.pxd":2293
 *         else:
 *             iso_year = year
 *             w1 = ord_w1             # <<<<<<<<<<<<<<
 * 
 *     # ISO week & weekday
*/
      __pyx_v_w1 = __pyx_v_ord_w1;
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2300
 *         r = (ord - 1) % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         iso_wday = r + 1
 * 
*/
    __pyx_v_r = (__pyx_v_r + 7);

    /* "cytimes/utils.pxd":2299
 *         iso_week = (ord - w1) // 7 + 1
 *         r = (ord - 1) % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         iso_wday = r + 1
*/
  }

  /* "cytimes/utils.pxd":2301
 *         if r < 0:
 *             r += 7
 *         iso_wday = r + 1             # <<<<<<<<<<<<<<
 * 
 *     out.year = iso_year
*/
  __pyx_v_iso_wday = (__pyx_v_r + 1);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2323
 *         long long w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         return year - 1
 *     else:
*/
  }

  /* "cytimes/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));

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":2344
 *         long long w1, w1_next
 * 
 *     if ord < ord_w1:             # <<<<<<<<<<<<<<
 *         w1 = iso_week1_mon_ord(year - 1)
 *     else:
*/
    goto __pyx_L3;
  }

  /* "cytimes/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));

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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);

      /* "cytimes/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)
*/
    }

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2493
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:
 *         weekday = 1             # <<<<<<<<<<<<<<
 *     elif weekday > 7:
 *         weekday = 7
*/
    __pyx_v_weekday = 1;

    /* "cytimes/utils.pxd":2492
 *     """
 *     # Clamp weekday to [1..7]
 *     if weekday < 1:             # <<<<<<<<<<<<<<
 *         weekday = 1
 *     elif weekday > 7:
*/
    goto __pyx_L3;
  }

  /* "cytimes/utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  __pyx_t_1 = (__pyx_v_weekday > 7);
  if (__pyx_t_1) {

    /* "cytimes/utils.pxd":2495
 *         weekday = 1
 *     elif weekday > 7:
 *         weekday = 7             # <<<<<<<<<<<<<<
 * 
 *     # Clamp week to [1..53]
*/
    __pyx_v_weekday = 7;

    /* "cytimes/utils.pxd":2494
 *     if weekday < 1:
 *         weekday = 1
 *     elif weekday > 7:             # <<<<<<<<<<<<<<
 *         weekday = 7
 * 
*/
  }
  __pyx_L3:;

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2499
 *     # Clamp week to [1..53]
 *     if week < 1:
 *         week = 1             # <<<<<<<<<<<<<<
 *     elif week > 53:
 *         week = 53
*/
    __pyx_v_week = 1;

    /* "cytimes/utils.pxd":2498
 * 
 *     # Clamp week to [1..53]
 *     if week < 1:             # <<<<<<<<<<<<<<
 *         week = 1
 *     elif week > 53:
*/
    goto __pyx_L4;
  }

  /* "cytimes/utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  __pyx_t_1 = (__pyx_v_week > 53);
  if (__pyx_t_1) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2500
 *     if week < 1:
 *         week = 1
 *     elif week > 53:             # <<<<<<<<<<<<<<
 *         week = 53
 * 
*/
  }
  __pyx_L4:;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2536
 *     # Clamp days
 *     if doy < 1:
 *         doy = 1             # <<<<<<<<<<<<<<
 *     elif doy > max_d:
 *         doy = max_d
*/
    __pyx_v_doy = 1;

    /* "cytimes/utils.pxd":2535
 * 
 *     # Clamp days
 *     if doy < 1:             # <<<<<<<<<<<<<<
 *         doy = 1
 *     elif doy > max_d:
*/
    goto __pyx_L3;
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":2538
 *         doy = 1
 *     elif doy > max_d:
 *         doy = max_d             # <<<<<<<<<<<<<<
 * 
 *     # Fast-path: Jan
*/
    __pyx_v_doy = __pyx_v_max_d;

    /* "cytimes/utils.pxd":2537
 *     if doy < 1:
 *         doy = 1
 *     elif doy > max_d:             # <<<<<<<<<<<<<<
 *         doy = max_d
 * 
*/
  }
  __pyx_L3:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2541
 * 
 *     # Fast-path: Jan
 *     if doy <= 31:             # <<<<<<<<<<<<<<
 *         out.year, out.month, out.day = year, 1, doy
 *         return out
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/utils.pxd":2582
 *     if wkd < 0:
 *         wkd += 7
 *     return jan4 - wkd             # <<<<<<<<<<<<<<
 * 
 * # . date & time
*/
  __pyx_r = (__pyx_v_jan4 - __pyx_v_wkd);
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2660
 *     """
 *     # Valid millisecond
 *     if ms >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'ms' to 0..999
 *         ms = min(ms, 999) * 1_000
*/
    goto __pyx_L3;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2667
 * 
 *     # Valid microsecond
 *     elif us >= 0:             # <<<<<<<<<<<<<<
 *         # clamp 'us' to 0..999,999
 *         us = min(us, 999_999)
*/
    goto __pyx_L3;
  }

  /* "cytimes/utils.pxd":2673
 *     # Both invalid
 *     else:
 *         us = -1             # <<<<<<<<<<<<<<
 * 
 *     return us
*/
  /*else*/ {
    __pyx_v_us = -1;
  }
  __pyx_L3:;

  /* "cytimes/utils.pxd":2675
 *         us = -1
 * 
 *     return us             # <<<<<<<<<<<<<<
 * 
 * # datetime.date ----------------------------------------------------------------------------------------
*/
  __pyx_r = __pyx_v_us;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
          }
        }
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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:*/ {

        /* "cytimes/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;

        /* "cytimes/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;

      /* "cytimes/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:*/ {

          /* "cytimes/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)
        }

        /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":2781
 *         tm out
 * 
 *     out.tm_sec = 0             # <<<<<<<<<<<<<<
 *     out.tm_min = 0
 *     out.tm_hour = 0
*/
  __pyx_v_out.tm_sec = 0;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":2904
 *         with the same date fields.
 *     """
 *     if dclass is None:             # <<<<<<<<<<<<<<
 *         dclass = datetime.date
 *     if dclass is type(date):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
          }
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2946
 *     if day < 1:
 *         day = dd
 *     elif day > 28:             # <<<<<<<<<<<<<<
 *         day = min(day, days_in_month(year, month))
 * 
*/
  }
  __pyx_L3:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":2950
 * 
 *     # Fast-path: same fields
 *     if yy == year and mm == month and dd == day:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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);

    /* "cytimes/utils.pxd":3009
 *         long long q, r
 *     # . normalize month
 *     if mm != o_mm:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":3032
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         rel_days += q
*/
    }

    /* "cytimes/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);

    /* "cytimes/utils.pxd":3029
 *     )
 *     # . normalize time to days
 *     if us != 0:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = us / US_DAY; r = us % US_DAY
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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));

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3055
 * 
 *     # Compare new dates
 *     if yy == o_yy and mm == o_mm and dd == o_dd:             # <<<<<<<<<<<<<<
 *         return date_fr_date(date, dclass)
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3059
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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:*/ {

        /* "cytimes/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; 

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);
        }

        /* "cytimes/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;

        /* "cytimes/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;

      /* "cytimes/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:*/ {

          /* "cytimes/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)
        }

        /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/utils.pxd":3089
 *     # Construct datetime
 *     fold = fold == 1
 *     if dtclass is not None and dtclass is not datetime.datetime:             # <<<<<<<<<<<<<<
 *         try:
 *             return dtclass(
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

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

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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:
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3188
 *     u2 = t - adj2
 *     t2 = ts_localtime(u2)
 *     if t2 == t:             # <<<<<<<<<<<<<<
 *         return u2
 *     if t1 == t:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3190
 *     if t2 == t:
 *         return u2
 *     if t1 == t:             # <<<<<<<<<<<<<<
 *         return u1
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":3208
 *     >>> dt.strftime(fmt)
 *     """
 *     if fmt is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_strformat: 'fmt' cannot be None")
 *     cdef:
*/
  }

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3223
 *     while i < size:
 *         ch = str_read(fmt, i)
 *         i += 1             # <<<<<<<<<<<<<<
 * 
 *         # Format identifier: '%'
*/
    __pyx_v_i = (__pyx_v_i + 1);

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":3229
 *             if i < size:
 *                 ch = str_read(fmt, i)
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 # . fraction
 *                 if ch == "f":
*/
        __pyx_v_i = (__pyx_v_i + 1);

        /* "cytimes/utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
        switch (__pyx_v_ch) {
          case 0x66:

          /* "cytimes/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) {

            /* "cytimes/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;

            /* "cytimes/utils.pxd":3232
 *                 # . fraction
 *                 if ch == "f":
 *                     if frepl is None:             # <<<<<<<<<<<<<<
 *                         frepl = "%06d" % dt.microsecond
 *                     parts.append(frepl)
*/
          }

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

          /* "cytimes/utils.pxd":3231
 *                 i += 1
 *                 # . fraction
 *                 if ch == "f":             # <<<<<<<<<<<<<<
 *                     if frepl is None:
 *                         frepl = "%06d" % dt.microsecond
*/
          break;
          case 0x7A:

          /* "cytimes/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) {

            /* "cytimes/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;

            /* "cytimes/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;

            /* "cytimes/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
*/
          }

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

          /* "cytimes/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:

          /* "cytimes/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) {

            /* "cytimes/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;

            /* "cytimes/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;

            /* "cytimes/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
*/
          }

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

          /* "cytimes/utils.pxd":3242
 *                     parts.append(zrepl)
 *                 # . timezone name
 *                 elif ch == "Z":             # <<<<<<<<<<<<<<
 *                     if Zrepl is None:
 *                         s_tmp = dt_tzname(dt)
*/
          break;
          default:

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

          /* "cytimes/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;
        }

        /* "cytimes/utils.pxd":3227
 *         # Format identifier: '%'
 *         if ch == "%":
 *             if i < size:             # <<<<<<<<<<<<<<
 *                 ch = str_read(fmt, i)
 *                 i += 1
*/
        goto __pyx_L7;
      }

      /* "cytimes/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:;

      /* "cytimes/utils.pxd":3226
 * 
 *         # Format identifier: '%'
 *         if ch == "%":             # <<<<<<<<<<<<<<
 *             if i < size:
 *                 ch = str_read(fmt, i)
*/
      goto __pyx_L6;
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":3275
 *     :returns `<'str'>`: Formatted text.
 *     """
 *     if sep is None:             # <<<<<<<<<<<<<<
 *         raise ValueError("dt_isoformat: 'sep' cannot be None.")
 *     cdef:
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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,
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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" % (
*/
  }

  /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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,
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3341
 * 
 *     # Naive: utc=True -> treat as UTC
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         isdst = 0 if utc else -1
 * 
*/
    goto __pyx_L3;
  }

  /* "cytimes/utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3345
 * 
 *     # Aware -> UTC: subtract utcoffset
 *     elif utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(tzinfo, dt)
 *         if off is not None:
*/
    goto __pyx_L3;
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
  switch (__pyx_v_wkd) {
    case 0:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3389
 * 
 *     # Weekday
 *     if wkd == 0:             # <<<<<<<<<<<<<<
 *         s_wkd = "Mon"
 *     elif wkd == 1:
*/
    break;
    case 1:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3391
 *     if wkd == 0:
 *         s_wkd = "Mon"
 *     elif wkd == 1:             # <<<<<<<<<<<<<<
 *         s_wkd = "Tue"
 *     elif wkd == 2:
*/
    break;
    case 2:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3393
 *     elif wkd == 1:
 *         s_wkd = "Tue"
 *     elif wkd == 2:             # <<<<<<<<<<<<<<
 *         s_wkd = "Wed"
 *     elif wkd == 3:
*/
    break;
    case 3:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3395
 *     elif wkd == 2:
 *         s_wkd = "Wed"
 *     elif wkd == 3:             # <<<<<<<<<<<<<<
 *         s_wkd = "Thu"
 *     elif wkd == 4:
*/
    break;
    case 4:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3397
 *     elif wkd == 3:
 *         s_wkd = "Thu"
 *     elif wkd == 4:             # <<<<<<<<<<<<<<
 *         s_wkd = "Fri"
 *     elif wkd == 5:
*/
    break;
    case 5:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3399
 *     elif wkd == 4:
 *         s_wkd = "Fri"
 *     elif wkd == 5:             # <<<<<<<<<<<<<<
 *         s_wkd = "Sat"
 *     else:
*/
    break;
    default:

    /* "cytimes/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;
  }

  /* "cytimes/utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
  switch (__pyx_v_mm) {
    case 1:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3405
 * 
 *     # Month
 *     if mm == 1:             # <<<<<<<<<<<<<<
 *         s_mm = "Jan"
 *     elif mm == 2:
*/
    break;
    case 2:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3407
 *     if mm == 1:
 *         s_mm = "Jan"
 *     elif mm == 2:             # <<<<<<<<<<<<<<
 *         s_mm = "Feb"
 *     elif mm == 3:
*/
    break;
    case 3:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3409
 *     elif mm == 2:
 *         s_mm = "Feb"
 *     elif mm == 3:             # <<<<<<<<<<<<<<
 *         s_mm = "Mar"
 *     elif mm == 4:
*/
    break;
    case 4:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3411
 *     elif mm == 3:
 *         s_mm = "Mar"
 *     elif mm == 4:             # <<<<<<<<<<<<<<
 *         s_mm = "Apr"
 *     elif mm == 5:
*/
    break;
    case 5:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3413
 *     elif mm == 4:
 *         s_mm = "Apr"
 *     elif mm == 5:             # <<<<<<<<<<<<<<
 *         s_mm = "May"
 *     elif mm == 6:
*/
    break;
    case 6:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3415
 *     elif mm == 5:
 *         s_mm = "May"
 *     elif mm == 6:             # <<<<<<<<<<<<<<
 *         s_mm = "Jun"
 *     elif mm == 7:
*/
    break;
    case 7:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3417
 *     elif mm == 6:
 *         s_mm = "Jun"
 *     elif mm == 7:             # <<<<<<<<<<<<<<
 *         s_mm = "Jul"
 *     elif mm == 8:
*/
    break;
    case 8:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3419
 *     elif mm == 7:
 *         s_mm = "Jul"
 *     elif mm == 8:             # <<<<<<<<<<<<<<
 *         s_mm = "Aug"
 *     elif mm == 9:
*/
    break;
    case 9:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3421
 *     elif mm == 8:
 *         s_mm = "Aug"
 *     elif mm == 9:             # <<<<<<<<<<<<<<
 *         s_mm = "Sep"
 *     elif mm == 10:
*/
    break;
    case 10:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3423
 *     elif mm == 9:
 *         s_mm = "Sep"
 *     elif mm == 10:             # <<<<<<<<<<<<<<
 *         s_mm = "Oct"
 *     elif mm == 11:
*/
    break;
    case 11:

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3425
 *     elif mm == 10:
 *         s_mm = "Oct"
 *     elif mm == 11:             # <<<<<<<<<<<<<<
 *         s_mm = "Nov"
 *     else:
*/
    break;
    default:

    /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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)));

  /* "cytimes/utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  __pyx_t_3 = (!__pyx_v_utc);
  if (__pyx_t_3) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3456
 *             (<long long> dt.microsecond)
 *         )
 *     if not utc:             # <<<<<<<<<<<<<<
 *         return us
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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)));

  /* "cytimes/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)));

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3541
 *     """
 *     # Timezone-aware
 *     if dt.tzinfo is not None:             # <<<<<<<<<<<<<<
 *         return dt_to_sec(dt, True)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":3583
 *         * 'us' reproduces the exact microsecond field.
 *     """
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 *     cdef:
*/
  }

  /* "cytimes/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);

  /* "cytimes/utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  if (__pyx_v_utc) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
 * 
*/
    }

    /* "cytimes/utils.pxd":3592
 * 
 *     # Optional UTC adjustment
 *     if utc:             # <<<<<<<<<<<<<<
 *         off = tz_utcoffset(dt.tzinfo, dt)
 *         if off is not None:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":3601
 *         ch = str_read(as_unit, 0)
 *         # . year
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return dt.year - EPOCH_YEAR
 *         # . quarter
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":3615
 *                 q = n / 7; r = n % 7
 *                 if r < 0:
 *                     q -= 1             # <<<<<<<<<<<<<<
 *             return q
 *         # . day
*/
        __pyx_v_q = (__pyx_v_q - 1);

        /* "cytimes/utils.pxd":3614
 *             with cython.cdivision(True):
 *                 q = n / 7; r = n % 7
 *                 if r < 0:             # <<<<<<<<<<<<<<
 *                     q -= 1
 *             return q
*/
      }

      /* "cytimes/utils.pxd":3616
 *                 if r < 0:
 *                     q -= 1
 *             return q             # <<<<<<<<<<<<<<
 *         # . day
 *         if ch == "D":
*/
      __pyx_r = __pyx_v_q;
      goto __pyx_L0;

      /* "cytimes/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
*/
    }

    /* "cytimes/utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    __pyx_t_1 = (__pyx_v_ch == 68);
    if (__pyx_t_1) {

      /* "cytimes/utils.pxd":3619
 *         # . day
 *         if ch == "D":
 *             return n             # <<<<<<<<<<<<<<
 *         # . hour
 *         hh = dt.hour
*/
      __pyx_r = __pyx_v_n;
      goto __pyx_L0;

      /* "cytimes/utils.pxd":3618
 *             return q
 *         # . day
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return n
 *         # . hour
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":3622
 *         # . hour
 *         hh = dt.hour
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return n * 24 + hh
 *         # . minute
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":3626
 *         # . minute
 *         mi = dt.minute
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return n * 1_440 + hh * 60 + mi
 *         # . second
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":3630
 *         # . second
 *         ss = dt.second
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return n * SS_DAY + hh * SS_HOUR + mi * SS_MINUTE + ss
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:;

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

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":3684
 *         q = n / 7; r = n % 7
 *         if r < 0:
 *             q -= 1             # <<<<<<<<<<<<<<
 *     return q
 * 
*/
    __pyx_v_q = (__pyx_v_q - 1);

    /* "cytimes/utils.pxd":3683
 *     with cython.cdivision(True):
 *         q = n / 7; r = n % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *     return q
*/
  }

  /* "cytimes/utils.pxd":3685
 *         if r < 0:
 *             q -= 1
 *     return q             # <<<<<<<<<<<<<<
 * 
 * # . conversion: from
*/
  __pyx_r = __pyx_v_q;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":3797
 *         with the same fields and tzinfo.
 *     """
 *     if dtclass is None:             # <<<<<<<<<<<<<<
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3799
 *     if dtclass is None:
 *         dtclass = datetime.datetime
 *     if dtclass is type(dt):             # <<<<<<<<<<<<<<
 *         return dt
 *     return dt_new(
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3840
 * 
 *     # Time
 *     if time is None:             # <<<<<<<<<<<<<<
 *         hh = mi = ss = us = fold = 0
 *     else:
*/
    goto __pyx_L4;
  }

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
          }
        }
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":3875
 *     if seconds == 0 and microseconds == 0:
 *         # Early exit
 *         if days == 0:             # <<<<<<<<<<<<<<
 *             return dt_fr_dt(dt, dtclass)
 * 
*/
    }

    /* "cytimes/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));

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;

  /* "cytimes/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)));

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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);

    /* "cytimes/utils.pxd":3957
 *         long long q, r
 *     # . normalize month
 *     if not 0 < mm <= 12:             # <<<<<<<<<<<<<<
 *         mm -= 1
 *         with cython.cdivision(True):
*/
  }

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":3990
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         mi += q; ss = r
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3987
 *         ss += q; us = r
 *     # . normalize seconds
 *     if not 0 <= ss < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = ss / 60; r = ss % 60
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":3997
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1; r += 60
 *         hh += q; mi = r
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":3994
 *         mi += q; ss = r
 *     # . normalize minutes
 *     if not 0 <= mi < 60:             # <<<<<<<<<<<<<<
 *         with cython.cdivision(True):
 *             q = mi / 60; r = mi % 60
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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));

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4032
 * 
 *     # Clamp day to valid days in month
 *     if dd > 28:             # <<<<<<<<<<<<<<
 *         dd = min(dd, days_in_month(yy, mm))
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/utils.pxd":4098
 * 
 *     # New datetime
 *     return dt_new(             # <<<<<<<<<<<<<<
 *         year, month, day, hour, minute,
 *         second, microsecond, tzinfo, fold, dtclass,
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":4118
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4122
 * 
 *     # Same tzinfo and fold
 *     if tzinfo is dt.tzinfo and fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4145
 *     """
 *     # Same tzinfo
 *     if tzinfo is dt.tzinfo:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":4168
 *     """
 *     # Validate
 *     if fold != 0 and fold != 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("fold must be either 0 or 1, got %d" % (fold))
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4172
 * 
 *     # Fast-path: same fold
 *     if fold == dt.fold:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":4213
 *         bint dt2_aware = dt2_tz is not None
 *     if dt1_aware != dt2_aware:
 *         if allow_mixed:             # <<<<<<<<<<<<<<
 *             return 2
 *         raise TypeError(
*/
    }

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/utils.pxd":4227
 *         return 1
 *     elif dt1_us < dt2_us:
 *         return -1             # <<<<<<<<<<<<<<
 *     else:
 *         return 0
*/
    __pyx_r = -1;
    goto __pyx_L0;

    /* "cytimes/utils.pxd":4226
 *     if dt1_us > dt2_us:
 *         return 1
 *     elif dt1_us < dt2_us:             # <<<<<<<<<<<<<<
 *         return -1
 *     else:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4270
 *     """
 *     cdef int dd = dt.day
 *     if dd < 30:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef int mm = dt.month
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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):
*/
    }

    /* "cytimes/utils.pxd":4391
 * 
 *     # Resolve target tzinfo
 *     if to_tz is None:             # <<<<<<<<<<<<<<
 *         to_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L3;
  }

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4403
 * 
 *     # Fast-exit: exact same tzinfo
 *     if my_tz is to_tz:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4407
 * 
 *     # Naive datetime cases
 *     if my_tz is None:             # <<<<<<<<<<<<<<
 *         my_tz = tz_local()
 *         # Fast-exit: naive + local -> localize
*/
    goto __pyx_L6;
  }

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

      /* "cytimes/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:;

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4454
 *     # Timezone-naive: no-op
 *     cdef object tzinfo = dt.tzinfo
 *     if tzinfo is None:             # <<<<<<<<<<<<<<
 *         return dt_fr_dt(dt, dtclass)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;
                }
              }
            }
          }
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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:*/ {

        /* "cytimes/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; 

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);
        }

        /* "cytimes/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;

        /* "cytimes/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;

      /* "cytimes/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:*/ {

          /* "cytimes/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)
        }

        /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/utils.pxd":4503
 *     # Construct time
 *     fold = fold == 1
 *     if tclass is not None and tclass is not datetime.time:             # <<<<<<<<<<<<<<
 *         try:
 *             return tclass(
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":4642
 *         with the same time fields and tzinfo.
 *     """
 *     if tclass is None:             # <<<<<<<<<<<<<<
 *         tclass = datetime.time
 *     if tclass is type(time):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4644
 *     if tclass is None:
 *         tclass = datetime.time
 *     if tclass is type(time):             # <<<<<<<<<<<<<<
 *         return time
 *     return time_new(
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
          }
        }
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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:*/ {

        /* "cytimes/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;

        /* "cytimes/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;

      /* "cytimes/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:*/ {

          /* "cytimes/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)
        }

        /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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);

      /* "cytimes/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)
*/
    }

    /* "cytimes/utils.pxd":4727
 * 
 *     # Determine sign and normalize to absolute value without multiplying by 1e6.
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         neg = True
 *         sec = -sec
*/
    goto __pyx_L3;
  }

  /* "cytimes/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:;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4743
 * 
 *     # Emit
 *     if us == 0:             # <<<<<<<<<<<<<<
 *         return ("-%02d:%02d:%02d" if neg else "%02d:%02d:%02d") % (hh, mi, sec)
 *     else:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
  __pyx_t_1 = (__pyx_v_sec < 0);
  if (__pyx_t_1) {

    /* "cytimes/utils.pxd":4763
 *     # Check sign
 *     if sec < 0:
 *         sec = -sec             # <<<<<<<<<<<<<<
 *         neg = True
 *     else:
*/
    __pyx_v_sec = (-__pyx_v_sec);

    /* "cytimes/utils.pxd":4764
 *     if sec < 0:
 *         sec = -sec
 *         neg = True             # <<<<<<<<<<<<<<
 *     else:
 *         neg = False
*/
    __pyx_v_neg = 1;

    /* "cytimes/utils.pxd":4762
 * 
 *     # Check sign
 *     if sec < 0:             # <<<<<<<<<<<<<<
 *         sec = -sec
 *         neg = True
*/
    goto __pyx_L3;
  }

  /* "cytimes/utils.pxd":4766
 *         neg = True
 *     else:
 *         neg = False             # <<<<<<<<<<<<<<
 * 
 *     # Split absolute seconds into H:M
*/
  /*else*/ {
    __pyx_v_neg = 0;
  }
  __pyx_L3:;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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));

    /* "cytimes/utils.pxd":4842
 *         with the same days, seconds and microseconds.
 *     """
 *     if tdclass is None:             # <<<<<<<<<<<<<<
 *         tdclass = datetime.timedelta
 *     if tdclass is type(td):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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. "
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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) {
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":4909
 * 
 *     # Decide the timestamp (seconds since epoch)
 *     if dt is None:             # <<<<<<<<<<<<<<
 *         # current time
 *         ts = unix_time()
*/
    goto __pyx_L3;
  }

  /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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;
      }

      /* "cytimes/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:;

      /* "cytimes/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;
    }

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/utils.pxd":4961
 *     >>> type(obj) is datetime.date
 *     """
 *     return datetime.PyTZInfo_CheckExact(obj)             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = PyTZInfo_CheckExact(__pyx_v_obj);
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4975
 *     >>> tz.tzname(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "cytimes/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:*/ {

      /* "cytimes/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;

      /* "cytimes/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;

    /* "cytimes/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:*/ {

        /* "cytimes/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)) {

          /* "cytimes/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;

          /* "cytimes/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;

          /* "cytimes/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);
          }

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

          /* "cytimes/utils.pxd":4980
 *         return tz.tzname(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "cytimes/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)
      }

      /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":4998
 *     >>> tz.dst(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "cytimes/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:*/ {

      /* "cytimes/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;

      /* "cytimes/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;

    /* "cytimes/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:*/ {

        /* "cytimes/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)) {

          /* "cytimes/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;

          /* "cytimes/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;

          /* "cytimes/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);
          }

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

          /* "cytimes/utils.pxd":5003
 *         return tz.dst(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "cytimes/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)
      }

      /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5021
 *     >>> tz.utcoffset(dt)
 *     """
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return None
 *     try:
*/
  }

  /* "cytimes/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:*/ {

      /* "cytimes/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;

      /* "cytimes/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;

    /* "cytimes/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:*/ {

        /* "cytimes/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)) {

          /* "cytimes/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;

          /* "cytimes/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;

          /* "cytimes/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);
          }

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

          /* "cytimes/utils.pxd":5026
 *         return tz.utcoffset(dt)
 *     except Exception as err:
 *         if not is_tz(tz):             # <<<<<<<<<<<<<<
 *             raise TypeError(
 *                 "Expects an instance of 'datetime.tzinfo', "
*/
        }

        /* "cytimes/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)
      }

      /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5043
 *     """
 *     cdef datetime.timedelta off = tz_utcoffset(tz, dt)
 *     if off is None:             # <<<<<<<<<<<<<<
 *         return NULL_TZOFFSET
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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. "
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5075
 *     """
 *     # Common units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_ns:             # <<<<<<<<<<<<<<
 *         return "ns"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_us:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5087
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_h:
 *         return "h"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         return "D"
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5091
 * 
 *     # Uncommon units
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_Y:             # <<<<<<<<<<<<<<
 *         return "Y"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_M:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5101
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_fs:
 *         return "fs"
 *     if unit == np.NPY_DATETIMEUNIT.NPY_FR_as:             # <<<<<<<<<<<<<<
 *         return "as"
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":5155
 *     :returns `<'int'>`: The corresponding NPY_DATETIMEUNIT enum value.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5165
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_s
 *         if ch == "m":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5187
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_ns
 *         if ch == "u":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5198
 *         if ch == "f":
 *             return np.NPY_DATETIMEUNIT.NPY_FR_fs
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5202
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return np.NPY_DATETIMEUNIT.NPY_FR_m
 * 
*/
  }
  __pyx_L4:;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":5217
 *         np.dtype('datetime64[ns]'), np.dtype('datetime64[Y]'), etc.
 *     """
 *     if unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(unit)
 *     cdef:
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5227
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "s":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_SS
 *         if ch == "m":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5229
 *         if ch == "s":
 *             return DT64_DTYPE_SS
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MI
 *         if ch == "h":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5231
 *         if ch == "m":
 *             return DT64_DTYPE_MI
 *         if ch == "h":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_HH
 *         if ch == "D":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5233
 *         if ch == "h":
 *             return DT64_DTYPE_HH
 *         if ch == "D":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_DD
 *         # Uncommon units
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5236
 *             return DT64_DTYPE_DD
 *         # Uncommon units
 *         if ch == "Y":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_YY
 *         if ch == "M":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5238
 *         if ch == "Y":
 *             return DT64_DTYPE_YY
 *         if ch == "M":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MM
 *         if ch == "W":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5240
 *         if ch == "M":
 *             return DT64_DTYPE_MM
 *         if ch == "W":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_WW
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5247
 *         # Common units
 *         ch = str_read(unit, 0)
 *         if ch == "n":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_NS
 *         if ch == "u":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5249
 *         if ch == "n":
 *             return DT64_DTYPE_NS
 *         if ch == "u":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_US
 *         if ch == "m":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5251
 *         if ch == "u":
 *             return DT64_DTYPE_US
 *         if ch == "m":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_MS
 *         # Uncommon units
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5254
 *             return DT64_DTYPE_MS
 *         # Uncommon units
 *         if ch == "p":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_PS
 *         if ch == "f":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5256
 *         if ch == "p":
 *             return DT64_DTYPE_PS
 *         if ch == "f":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_FS
 *         if ch == "a":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":5258
 *         if ch == "f":
 *             return DT64_DTYPE_FS
 *         if ch == "a":             # <<<<<<<<<<<<<<
 *             return DT64_DTYPE_AS
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5262
 * 
 *     # Unit: 'min' for pandas compatibility
 *     elif size == 3 and unit == "min":             # <<<<<<<<<<<<<<
 *         return DT64_DTYPE_MI
 * 
*/
  }
  __pyx_L4:;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/utils.pxd":5277
 *     cdef:
 *         int dtype = np.PyArray_TYPE(arr)
 *         np.npy_int64 zero = 0             # <<<<<<<<<<<<<<
 *         object scalar
 * 
*/
  __pyx_v_zero = 0;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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', "
*/
  }

  /* "cytimes/utils.pxd":5348
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

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

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5372
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)));

  /* "cytimes/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);

  /* "cytimes/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:*/ {

      /* "cytimes/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;

      /* "cytimes/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:
*/
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;

    /* "cytimes/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:*/ {

        /* "cytimes/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;

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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;

        /* "cytimes/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);
        }

        /* "cytimes/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)
      }

      /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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', "
*/
  }

  /* "cytimes/utils.pxd":5506
 *             "instead got '%s' %s." % (obj, type(obj))
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

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

  /* "cytimes/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);

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5530
 *         with cython.cdivision(True):
 *             q = value / 1_000; r = value % 1_000
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5575
 *         with cython.cdivision(True):
 *             q = value / 400; r = value % 400
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5582
 *         with cython.cdivision(True):
 *             q = value / 50; r = value % 50
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5589
 *         with cython.cdivision(True):
 *             q = value / 5; r = value % 5
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5624
 *         with cython.cdivision(True):
 *             q = value / 1_600; r = value % 1_600
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5631
 *         with cython.cdivision(True):
 *             q = value / 200; r = value % 200
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":5638
 *         with cython.cdivision(True):
 *             q = value / 10; r = value % 10
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 q -= 1
 *         return q + offset
*/
    }

    /* "cytimes/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;

    /* "cytimes/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):
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5691
 *         otherwise, returns a contiguous copy.
 *     """
 *     if np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         return arr
 *     return np.PyArray_GETCONTIGUOUS(arr)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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);

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

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

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5748
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "cytimes/utils.pxd":5746
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

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

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5774
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "cytimes/utils.pxd":5772
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "cytimes/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);

  /* "cytimes/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;
  }

  /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5777
 * 
 *     # Assure dtype
 *     if np.PyArray_TYPE(arr) in (             # <<<<<<<<<<<<<<
 *         np.NPY_TYPES.NPY_INT64,
 *         np.NPY_TYPES.NPY_DATETIME,
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

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

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5803
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False             # <<<<<<<<<<<<<<
 * 
 *     # Assure dtype
*/
    __pyx_v_copy = 0;

    /* "cytimes/utils.pxd":5801
 * 
 *     # Assure contiguous
 *     if not np.PyArray_IS_C_CONTIGUOUS(arr):             # <<<<<<<<<<<<<<
 *         arr = np.PyArray_GETCONTIGUOUS(arr)
 *         copy = False
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  __pyx_t_1 = (__pyx_v_value == 0);
  if (__pyx_t_1) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":5837
 *     """
 *     # Fast-path
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return arr_zero_int64(size)
 * 
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":5841
 * 
 *     # New array
 *     if size < 1:             # <<<<<<<<<<<<<<
 *         raise ValueError("The size of a new array must be a positive integer.")
 *     cdef:
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":5873
 *     """
 *     # Validate
 *     if minimum > maximum:             # <<<<<<<<<<<<<<
 *         raise ValueError("minimum value cannot be greater than maximum value.")
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5890
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":5889
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":5892
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = maximum
 *             elif v < minimum:
*/
        goto __pyx_L8;
      }

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":5894
 *             if v > maximum:
 *                 out_ptr[i] = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = minimum
 * 
*/
      }
      __pyx_L8:;
      __pyx_L5_continue:;
    }

    /* "cytimes/utils.pxd":5885
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L4;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5903
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Clamp value
 *             if v > maximum:
*/
        goto __pyx_L9_continue;

        /* "cytimes/utils.pxd":5902
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Clamp value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5906
 *             # Clamp value
 *             if v > maximum:
 *                 v = maximum             # <<<<<<<<<<<<<<
 *             elif v < minimum:
 *                 v = minimum
*/
        __pyx_v_v = __pyx_v_maximum;

        /* "cytimes/utils.pxd":5905
 *                 continue
 *             # Clamp value
 *             if v > maximum:             # <<<<<<<<<<<<<<
 *                 v = maximum
 *             elif v < minimum:
*/
        goto __pyx_L12;
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5908
 *                 v = maximum
 *             elif v < minimum:
 *                 v = minimum             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_minimum;

        /* "cytimes/utils.pxd":5907
 *             if v > maximum:
 *                 v = maximum
 *             elif v < minimum:             # <<<<<<<<<<<<<<
 *                 v = minimum
 *             out_ptr[i] = v + offset
*/
      }
      __pyx_L12:;

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5946
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L4_continue;

        /* "cytimes/utils.pxd":5945
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5949
 *             # Min value
 *             if v > value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "cytimes/utils.pxd":5948
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "cytimes/utils.pxd":5941
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5957
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v > value:
*/
        goto __pyx_L8_continue;

        /* "cytimes/utils.pxd":5956
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Min value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5960
 *             # Min value
 *             if v > value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "cytimes/utils.pxd":5959
 *                 continue
 *             # Min value
 *             if v > value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":5998
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L4_continue;

        /* "cytimes/utils.pxd":5997
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6001
 *             # Max value
 *             if v < value:
 *                 out_ptr[i] = value             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_value;

        /* "cytimes/utils.pxd":6000
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = value
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "cytimes/utils.pxd":5993
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6009
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v < value:
*/
        goto __pyx_L8_continue;

        /* "cytimes/utils.pxd":6008
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Max value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6012
 *             # Max value
 *             if v < value:
 *                 v = value             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = __pyx_v_value;

        /* "cytimes/utils.pxd":6011
 *                 continue
 *             # Max value
 *             if v < value:             # <<<<<<<<<<<<<<
 *                 v = value
 *             out_ptr[i] = v + offset
*/
      }

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6061
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":6060
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":6065
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":6063
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6068
 *             # Min value
 *             if v1 > v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "cytimes/utils.pxd":6067
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "cytimes/utils.pxd":6056
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6076
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":6075
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":6080
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Min value
 *             if v1 > v2:
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":6078
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/utils.pxd":6082
 *                 continue
 *             # Min value
 *             if v1 > v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6132
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":6131
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":6136
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":6134
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6139
 *             # Max value
 *             if v1 < v2:
 *                 out_ptr[i] = v2             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = __pyx_v_v2;

        /* "cytimes/utils.pxd":6138
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 * 
*/
      }
      __pyx_L5_continue:;
    }

    /* "cytimes/utils.pxd":6127
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             # Propagate NaT
*/
    goto __pyx_L4;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6147
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":6146
 *             # Propagate NaT
 *             v1 = out_ptr[i]
 *             if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             v2 = arr_ptr[i]
*/
      }

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/utils.pxd":6151
 *             if v2 == LLONG_MIN:
 *                 out_ptr[i] = v2
 *                 continue             # <<<<<<<<<<<<<<
 *             # Max value
 *             if v1 < v2:
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":6149
 *                 continue
 *             v2 = arr_ptr[i]
 *             if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2
 *                 continue
*/
      }

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/utils.pxd":6153
 *                 continue
 *             # Max value
 *             if v1 < v2:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = v2 + offset
 *             else:
*/
        goto __pyx_L14;
      }

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6193
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L4_continue;

        /* "cytimes/utils.pxd":6192
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "cytimes/utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      __pyx_t_3 = (__pyx_v_v < 0);
      if (__pyx_t_3) {

        /* "cytimes/utils.pxd":6196
 *             # Abs value
 *             if v < 0:
 *                 out_ptr[i] = -v             # <<<<<<<<<<<<<<
 * 
 *     # With offset
*/
        (__pyx_v_out_ptr[__pyx_v_i]) = (-__pyx_v_v);

        /* "cytimes/utils.pxd":6195
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 out_ptr[i] = -v
 * 
*/
      }
      __pyx_L4_continue:;
    }

    /* "cytimes/utils.pxd":6188
 * 
 *     # No offset
 *     if offset == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
    goto __pyx_L3;
  }

  /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6204
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Abs value
 *             if v < 0:
*/
        goto __pyx_L8_continue;

        /* "cytimes/utils.pxd":6203
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Abs value
*/
      }

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6207
 *             # Abs value
 *             if v < 0:
 *                 v = -v             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v + offset
 * 
*/
        __pyx_v_v = (-__pyx_v_v);

        /* "cytimes/utils.pxd":6206
 *                 continue
 *             # Abs value
 *             if v < 0:             # <<<<<<<<<<<<<<
 *                 v = -v
 *             out_ptr[i] = v + offset
*/
      }

      /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6243
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Negate value
 *         out_ptr[i] = -v + offset
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":6242
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Negate value
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6269
 *     # Fast-path
 *     cdef np.ndarray out = arr_assure_int64_like(arr, copy)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *         return out
 * 
*/
  }

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6284
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Add value
 *         out_ptr[i] = v + value
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":6283
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Add value
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6310
 *     """
 *     # Fast-path
 *     if factor == 1:             # <<<<<<<<<<<<<<
 *         return arr_add(arr, offset, copy)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6327
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L5_continue;

        /* "cytimes/utils.pxd":6326
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "cytimes/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:;
    }

    /* "cytimes/utils.pxd":6322
 * 
 *     # Zero factor
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             v = out_ptr[i]
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6336
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply value
 *         out_ptr[i] = v * factor + offset
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6335
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Multiply value
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/utils.pxd":6363
 *     """
 *     # Validate
 *     if factor == 0:             # <<<<<<<<<<<<<<
 *         raise ZeroDivisionError("arr_mod: division by zero.")
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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);

  /* "cytimes/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:

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":6381
 *             # Preserve NaT
 *             if v == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Set to offset
 *             out_ptr[i] = offset
*/
        goto __pyx_L4_continue;

        /* "cytimes/utils.pxd":6380
 *             v = out_ptr[i]
 *             # Preserve NaT
 *             if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Set to offset
*/
      }

      /* "cytimes/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:;
    }

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6391
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Modulo value
 *         with cython.cdivision(True):
*/
      goto __pyx_L7_continue;

      /* "cytimes/utils.pxd":6390
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Modulo value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6442
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6441
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6477
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6502
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6501
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6553
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6552
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6585
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6610
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6609
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6662
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6661
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6694
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6719
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide & Multiply
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6718
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide & Multiply
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6772
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6771
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6804
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6828
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6827
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6878
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6877
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":6910
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6934
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":6933
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":6981
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":6980
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7008
 *     """
 *     # Validate / Fast-path
 *     if multiple == 0:             # <<<<<<<<<<<<<<
 *         return arr_mul(arr, 0, offset, copy)
 *     if multiple == 1:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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)) {

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

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7032
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Divide value
 *         with cython.cdivision(True):
*/
      goto __pyx_L8_continue;

      /* "cytimes/utils.pxd":7031
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Divide value
*/
    }

    /* "cytimes/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);

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7083
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7082
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7087
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Add values
 *         out_ptr[i] = v1 + v2 + offset
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7085
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7136
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7135
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7140
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Subtract values
 *         out_ptr[i] = v1 - v2 + offset
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7138
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7189
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7188
 *         # Propagate NaT
 *         v1 = out_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         v2 = arr_ptr[i]
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7193
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = v2
 *             continue             # <<<<<<<<<<<<<<
 *         # Multiply values
 *         out_ptr[i] = v1 * v2 + offset
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7191
 *             continue
 *         v2 = arr_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = v2
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7229
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7240
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v == value
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":7238
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7274
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7285
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v > value
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":7283
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7319
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7330
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v >= value
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":7328
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7364
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7375
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v < value
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":7373
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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) {

    /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":7409
 * 
 *     # Fast-path: value is NaT
 *     if value == LLONG_MIN:             # <<<<<<<<<<<<<<
 *         for i in range(size):
 *             out_ptr[i] = False
*/
  }

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7420
 *         if v == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare value
 *         out_ptr[i] = v <= value
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":7418
 *         # Preserve NaT
 *         v = arr_ptr[i]
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7468
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7466
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7472
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 == v2
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7470
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7520
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7518
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7524
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 > v2
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7522
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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]);

  /* "cytimes/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)) {

    /* "cytimes/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;

    /* "cytimes/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;

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

    /* "cytimes/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"
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7572
 *         if v1 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7570
 *         # Preserve NaT
 *         v1 = arr1_ptr[i]
 *         if v1 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7576
 *         if v2 == LLONG_MIN:
 *             out_ptr[i] = False
 *             continue             # <<<<<<<<<<<<<<
 *         # Compare values
 *         out_ptr[i] = v1 >= v2
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":7574
 *             continue
 *         v2 = arr2_ptr[i]
 *         if v2 == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

    /* "cytimes/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;

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

    /* "cytimes/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[*]]', "
*/
  }

  /* "cytimes/utils.pxd":7598
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . range check
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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
*/
    }
  }

  /* "cytimes/utils.pxd":7667
 *         if not minimum < v < maximum and v != LLONG_MIN:
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . access
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7725
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Convert to quarter
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":7724
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to quarter
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":7729
 *         with cython.cdivision(True):
 *             r = v % 12
 *             if r < 0:             # <<<<<<<<<<<<<<
 *                 r += 12
 *             out_ptr[i] = (r / 3) + 1 + offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":7789
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to weekday (0=Monday, 6=Sunday)
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7795
 *             r = v % 7
 *         if r < 0:
 *             r += 7             # <<<<<<<<<<<<<<
 *         # Anchor to Thursday (3)
 *         r += 3
*/
      __pyx_v_r = (__pyx_v_r + 7);

      /* "cytimes/utils.pxd":7794
 *         with cython.cdivision(True):
 *             r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             r += 7
 *         # Anchor to Thursday (3)
*/
    }

    /* "cytimes/utils.pxd":7797
 *             r += 7
 *         # Anchor to Thursday (3)
 *         r += 3             # <<<<<<<<<<<<<<
 *         if r >= 7:
 *             r -= 7
*/
    __pyx_v_r = (__pyx_v_r + 3);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7799
 *         r += 3
 *         if r >= 7:
 *             r -= 7             # <<<<<<<<<<<<<<
 *         out_ptr[i] = r + offset
 * 
*/
      __pyx_v_r = (__pyx_v_r - 7);

      /* "cytimes/utils.pxd":7798
 *         # Anchor to Thursday (3)
 *         r += 3
 *         if r >= 7:             # <<<<<<<<<<<<<<
 *             r -= 7
 *         out_ptr[i] = r + offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":7832
 *         # Propagate NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":7831
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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));

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8021
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         out_ptr[i] = offset
 *     return out
*/
      goto __pyx_L6_continue;

      /* "cytimes/utils.pxd":8020
 *     for i in range(size):
 *         # Propagate NaT
 *         if out_ptr[i] == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         out_ptr[i] = offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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 (
*/
  }

  /* "cytimes/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:

    /* "cytimes/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:

    /* "cytimes/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:

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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;
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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));

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:;

    /* "cytimes/utils.pxd":8132
 *             out_ptr[2] = _iso.weekday
 *         # Increment +3
 *         out_ptr += 3             # <<<<<<<<<<<<<<
 * 
 *     return out
*/
    __pyx_v_out_ptr = (__pyx_v_out_ptr + 3);
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8166
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO year
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":8165
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO year
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8203
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO week
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":8202
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO week
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8240
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Calculate ISO weekday
 *         _ymd = ymd_fr_ord(v + EPOCH_DAY)
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":8239
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate ISO weekday
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8278
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8317
 *         v = arr_ptr[i]
 *         # Handle NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = False
 *             continue
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8356
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Calculate leap years between
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8391
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days in year
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8427
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days before year
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8463
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Get days of year
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8501
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in quarter
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8540
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before quarter
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8578
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days of quarter
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8616
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days in month
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":8655
 *         v = out_ptr[i]
 *         # Propagate NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Compute days before month
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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) {

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

    /* "cytimes/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:
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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":
*/
    }

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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)
 * 
*/
    }

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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:;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8797
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "cytimes/utils.pxd":8796
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8857
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert months to quarters
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":8856
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert months to quarters
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":8861
 *         with cython.cdivision(True):
 *             q = v / 3; r = v % 3
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8918
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # Convert to 0-based offset from 0001-01-01
*/
      goto __pyx_L7_continue;

      /* "cytimes/utils.pxd":8917
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 * 
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/utils.pxd":8942
 *         else:
 *             mm = (n + 50) >> 5  # initial 1..12 estimate
 *             if days_bf_month(yy, mm) > n:             # <<<<<<<<<<<<<<
 *                 mm -= 1
 * 
*/
      }
    }
    __pyx_L11:;

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":8984
 *         # preserve NaT value
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # convert days to weeks
 *         with cython.cdivision(True):
*/
      goto __pyx_L3_continue;

      /* "cytimes/utils.pxd":8983
 *         v = out_ptr[i]
 *         # preserve NaT value
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # convert days to weeks
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":8988
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":9398
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/utils.pxd":9431
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Convert to day resolution
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/utils.pxd":9484
 *         # Preserve NaT
 *         if v == LLONG_MIN:
 *             continue             # <<<<<<<<<<<<<<
 *         # Aligned to the specified weekday
 *         v += adj
*/
      goto __pyx_L4_continue;

      /* "cytimes/utils.pxd":9483
 *         v = out_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             continue
 *         # Aligned to the specified weekday
*/
    }

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/utils.pxd":9490
 *         with cython.cdivision(True):
 *             q = v / 7; r = v % 7
 *         if r < 0:             # <<<<<<<<<<<<<<
 *             q -= 1
 *         out_ptr[i] = q + offset
*/
    }

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
        }
      }
    }
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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]);

  /* "cytimes/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;

  /* "cytimes/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));

  /* "cytimes/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));

  /* "cytimes/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;

    /* "cytimes/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]);

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/utils.pxd":9562
 *         v = arr_ptr[i]
 *         # Preserve NaT
 *         if v == LLONG_MIN:             # <<<<<<<<<<<<<<
 *             out_ptr[i] = math.NAN
 *             continue
*/
    }

    /* "cytimes/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);

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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
*/
    }

    /* "cytimes/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));

    /* "cytimes/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:;
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":9611
 *     """
 *     # Guard
 *     if as_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(as_unit)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  if (__pyx_v_limit) {

    /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;
    }

    /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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:;

    /* "cytimes/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)) {

      /* "cytimes/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;

      /* "cytimes/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;

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

      /* "cytimes/utils.pxd":9626
 *     # Check limit
 *     if limit:
 *         if as_reso not in (             # <<<<<<<<<<<<<<
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
 *             np.NPY_DATETIMEUNIT.NPY_FR_us,
*/
    }

    /* "cytimes/utils.pxd":9625
 * 
 *     # Check limit
 *     if limit:             # <<<<<<<<<<<<<<
 *         if as_reso not in (
 *             np.NPY_DATETIMEUNIT.NPY_FR_ns,
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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))
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":9644
 * 
 *     # Fast-path: same unit
 *     if arr_reso == as_reso:             # <<<<<<<<<<<<<<
 *         if is_dt64:
 *             return arr_add(arr, 0, copy)  # honor 'copy' flag
*/
  }

  /* "cytimes/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;

  /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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) {

          /* "cytimes/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;

          /* "cytimes/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))
*/
        }

        /* "cytimes/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;

        /* "cytimes/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
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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:

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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);

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/utils.pxd":9791
 * 
 *     # Fallback
 *     if not is_dt64:             # <<<<<<<<<<<<<<
 *         arr = arr.astype(nptime_unit_int2dt64(arr_reso))
 *     if as_dtype is None:
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;

    /* "cytimes/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,
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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);

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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;
  }

  /* "cytimes/utils.pxd":9862
 *         )
 *     else:
 *         delta = 0             # <<<<<<<<<<<<<<
 * 
 *     # Resolution: 'us'
*/
  /*else*/ {
    __pyx_v_delta = 0;
  }
  __pyx_L7:;

  /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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);

      /* "cytimes/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;

      /* "cytimes/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
*/
    }

    /* "cytimes/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;

    /* "cytimes/utils.pxd":9912
 * 
 *     # Resolution: 'D'
 *     elif arr_reso == np.NPY_DATETIMEUNIT.NPY_FR_D:             # <<<<<<<<<<<<<<
 *         if delta != 0:
 *             with cython.cdivision(True):
*/
    break;
    default: break;
  }

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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);

    /* "cytimes/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));

    /* "cytimes/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));

    /* "cytimes/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]);

    /* "cytimes/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;

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":10048
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":10047
 *             # Preserve NaT
 *             d = dates_ptr[i]
 *             if d == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             t = times_ptr[i]
*/
      }

      /* "cytimes/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]);

      /* "cytimes/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) {

        /* "cytimes/utils.pxd":10051
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:
 *                 continue             # <<<<<<<<<<<<<<
 *             # Add delta & Normalize time
 *             t += delta
*/
        goto __pyx_L10_continue;

        /* "cytimes/utils.pxd":10050
 *                 continue
 *             t = times_ptr[i]
 *             if t == LLONG_MIN:             # <<<<<<<<<<<<<<
 *                 continue
 *             # Add delta & Normalize time
*/
      }

      /* "cytimes/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);

      /* "cytimes/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);

      /* "cytimes/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) {

        /* "cytimes/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);

        /* "cytimes/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
*/
      }

      /* "cytimes/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);

      /* "cytimes/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:;
    }

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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) {

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

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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:;

  /* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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;
    }
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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:

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

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

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;

    /* "cytimes/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;

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

      /* "cytimes/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:;

    /* "cytimes/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;
  }

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:;

    /* "cytimes/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:;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;

      /* "cytimes/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:;

    /* "cytimes/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:
*/
  }

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":10290
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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))
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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)
*/
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":10474
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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))
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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)
*/
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

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

    /* "cytimes/utils.pxd":10658
 *     """
 *     # Guard
 *     if to_unit is None:             # <<<<<<<<<<<<<<
 *         _raise_invalid_nptime_str_unit_error(to_unit)
 * 
*/
  }

  /* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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) {

      /* "cytimes/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;

      /* "cytimes/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))
*/
    }

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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;

  /* "cytimes/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:

    /* "cytimes/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) {

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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)
*/
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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:

    /* "cytimes/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:

      /* "cytimes/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) {

        /* "cytimes/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;

        /* "cytimes/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;

        /* "cytimes/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)
*/
      }

      /* "cytimes/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;

        /* "cytimes/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;
      }

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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:

      /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;
    }

    /* "cytimes/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;
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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:*/ {

      /* "cytimes/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;

      /* "cytimes/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:
*/
    }

    /* "cytimes/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;

      /* "cytimes/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;

      /* "cytimes/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;

    /* "cytimes/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:*/ {

        /* "cytimes/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;

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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);

        /* "cytimes/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;

        /* "cytimes/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);
        }

        /* "cytimes/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)
      }

      /* "cytimes/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;

    /* "cytimes/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;
  }

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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;

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

  /* "cytimes/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;
}

/* "cytimes/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;

  /* "cytimes/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;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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)) {

    /* "cytimes/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;

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

    /* "cytimes/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[*]]', "
*/
  }

  /* "cytimes/utils.pxd":10894
 *             "instead got 'np.ndarray[%s]'." % arr.dtype
 *         )
 *     return True             # <<<<<<<<<<<<<<
 * 
 * # . conversion
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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) {

    /* "cytimes/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) {

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

      /* "cytimes/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)
*/
    }

    /* "cytimes/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;

    /* "cytimes/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)
*/
  }

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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;
}

/* "cytimes/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);

  /* "cytimes/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;

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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
*/
  }

  /* "cytimes/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) {

    /* "cytimes/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;

    /* "cytimes/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)
 * 
*/
  }

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

  /* "cytimes/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/utils.py":147
 * 
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * def _get_local_timezone() -> object:             # <<<<<<<<<<<<<<
 *     """(internal) Get the process-local timezone `<'datetime.tzinfo'>`.
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_5_get_local_timezone(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_7cytimes_5utils_4_get_local_timezone, "(internal) Get the process-local timezone `<'datetime.tzinfo'>`.\n\n    :returns `<'zoneinfo.ZoneInfo/datetime.timezone'>`: The local timezone.\n\n        - Returns a concrete IANA zone (`zoneinfo.ZoneInfo`) when possible\n          using [babel](https://github.com/python-babel/babel) `LOCALTZ` name.\n        - If that fails, falls back to a fixed-offset `datetime.timezone` using\n          the **current** local UTC offset (but no DST rules).\n\n    ## Notice\n    - The fixed-offset fallback reflects the offset *at the moment of call* and\n      does not track historical or future transitions.\n    ");
static PyMethodDef __pyx_mdef_7cytimes_5utils_5_get_local_timezone = {"_get_local_timezone", (PyCFunction)__pyx_pw_7cytimes_5utils_5_get_local_timezone, METH_NOARGS, __pyx_doc_7cytimes_5utils_4_get_local_timezone};
static PyObject *__pyx_pw_7cytimes_5utils_5_get_local_timezone(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_local_timezone (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_4_get_local_timezone(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_4_get_local_timezone(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_LOCALTZ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_tz_local_sec __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_tz_new __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_local_timezone", 0);

  /* "cytimes/utils.py":161
 *       does not track historical or future transitions.
 *     """
 *     from babel.dates import LOCALTZ             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(LOCALTZ, T_ZONEINFO):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LOCALTZ};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_babel_dates, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LOCALTZ};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_LOCALTZ = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":163
 *     from babel.dates import LOCALTZ
 * 
 *     if isinstance(LOCALTZ, T_ZONEINFO):             # <<<<<<<<<<<<<<
 *         return LOCALTZ
 *     try:
*/
  __pyx_t_1 = __pyx_v_7cytimes_5utils_T_ZONEINFO;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_LOCALTZ, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cytimes/utils.py":164
 * 
 *     if isinstance(LOCALTZ, T_ZONEINFO):
 *         return LOCALTZ             # <<<<<<<<<<<<<<
 *     try:
 *         return T_ZONEINFO(LOCALTZ.zone)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_LOCALTZ);
    __pyx_r = __pyx_v_LOCALTZ;
    goto __pyx_L0;

    /* "cytimes/utils.py":163
 *     from babel.dates import LOCALTZ
 * 
 *     if isinstance(LOCALTZ, T_ZONEINFO):             # <<<<<<<<<<<<<<
 *         return LOCALTZ
 *     try:
*/
  }

  /* "cytimes/utils.py":165
 *     if isinstance(LOCALTZ, T_ZONEINFO):
 *         return LOCALTZ
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(LOCALTZ.zone)
 *     except Exception:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cytimes/utils.py":166
 *         return LOCALTZ
 *     try:
 *         return T_ZONEINFO(LOCALTZ.zone)             # <<<<<<<<<<<<<<
 *     except Exception:
 *         return tz_new(0, 0, tz_local_sec(None))  # type: ignore
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_T_ZONEINFO);
      __pyx_t_8 = __pyx_v_7cytimes_5utils_T_ZONEINFO; 
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_LOCALTZ, __pyx_mstate_global->__pyx_n_u_zone); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 166, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
        __pyx_t_10 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L8_try_return;

      /* "cytimes/utils.py":165
 *     if isinstance(LOCALTZ, T_ZONEINFO):
 *         return LOCALTZ
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(LOCALTZ.zone)
 *     except Exception:
*/
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cytimes/utils.py":167
 *     try:
 *         return T_ZONEINFO(LOCALTZ.zone)
 *     except Exception:             # <<<<<<<<<<<<<<
 *         return tz_new(0, 0, tz_local_sec(None))  # type: ignore
 * 
*/
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("cytimes.utils._get_local_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 167, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);

      /* "cytimes/utils.py":168
 *         return T_ZONEINFO(LOCALTZ.zone)
 *     except Exception:
 *         return tz_new(0, 0, tz_local_sec(None))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_12.__pyx_n = 1;
      __pyx_t_12.dt = ((PyDateTime_DateTime *)Py_None);
      __pyx_t_11 = __pyx_f_7cytimes_5utils_tz_local_sec(&__pyx_t_12); if (unlikely(__pyx_t_11 == ((int)-200000))) __PYX_ERR(0, 168, __pyx_L6_except_error)
      __pyx_t_13.__pyx_n = 3;
      __pyx_t_13.hours = 0;
      __pyx_t_13.minites = 0;
      __pyx_t_13.seconds = __pyx_t_11;
      __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_new(&__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_except_return;
    }
    goto __pyx_L6_except_error;

    /* "cytimes/utils.py":165
 *     if isinstance(LOCALTZ, T_ZONEINFO):
 *         return LOCALTZ
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(LOCALTZ.zone)
 *     except Exception:
*/
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
  }

  /* "cytimes/utils.py":147
 * 
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * def _get_local_timezone() -> object:             # <<<<<<<<<<<<<<
 *     """(internal) Get the process-local timezone `<'datetime.tzinfo'>`.
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._get_local_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_LOCALTZ);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":174
 * 
 * 
 * @_lru_cache(maxsize=128)             # <<<<<<<<<<<<<<
 * def _get_zoneinfo(name: str) -> zoneinfo.ZoneInfo | datetime.timezone:
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_7_get_zoneinfo(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_6_get_zoneinfo, "(internal) Get `zoneinfo.ZoneInfo` object by name with caching.");
static PyMethodDef __pyx_mdef_7cytimes_5utils_7_get_zoneinfo = {"_get_zoneinfo", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7cytimes_5utils_7_get_zoneinfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7cytimes_5utils_6_get_zoneinfo};
static PyObject *__pyx_pw_7cytimes_5utils_7_get_zoneinfo(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_name = 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("_get_zoneinfo (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_name,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, 174, __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, 174, __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, "_get_zoneinfo", 0) < (0)) __PYX_ERR(0, 174, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_zoneinfo", 1, 1, 1, i); __PYX_ERR(0, 174, __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, 174, __pyx_L3_error)
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_zoneinfo", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 174, __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._get_zoneinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 0, "name", 2))) __PYX_ERR(0, 175, __pyx_L1_error)
  __pyx_r = __pyx_pf_7cytimes_5utils_6_get_zoneinfo(__pyx_self, __pyx_v_name);

  /* 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_6_get_zoneinfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_name_lower = 0;
  PyObject *__pyx_v_err = NULL;
  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;
  size_t __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;
  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("_get_zoneinfo", 0);

  /* "cytimes/utils.py":177
 * def _get_zoneinfo(name: str) -> zoneinfo.ZoneInfo | datetime.timezone:
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
 *     name_lower: str = name.lower()             # <<<<<<<<<<<<<<
 *     if name_lower == "local":
 *         return _LOCAL_TIMEZONE  # type: ignore
*/
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__lower, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name_lower = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":178
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
 *     name_lower: str = name.lower()
 *     if name_lower == "local":             # <<<<<<<<<<<<<<
 *         return _LOCAL_TIMEZONE  # type: ignore
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
*/
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name_lower, __pyx_mstate_global->__pyx_n_u_local, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 178, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "cytimes/utils.py":179
 *     name_lower: str = name.lower()
 *     if name_lower == "local":
 *         return _LOCAL_TIMEZONE  # type: ignore             # <<<<<<<<<<<<<<
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
 *         return UTC
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE);
    __pyx_r = __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE;
    goto __pyx_L0;

    /* "cytimes/utils.py":178
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
 *     name_lower: str = name.lower()
 *     if name_lower == "local":             # <<<<<<<<<<<<<<
 *         return _LOCAL_TIMEZONE  # type: ignore
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
*/
  }

  /* "cytimes/utils.py":180
 *     if name_lower == "local":
 *         return _LOCAL_TIMEZONE  # type: ignore
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore             # <<<<<<<<<<<<<<
 *         return UTC
 *     try:
*/
  __pyx_t_1 = __pyx_v_7cytimes_5utils__UTC_ALIASES;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PySet_Contains(__pyx_t_1, __pyx_v_name_lower); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cytimes/utils.py":181
 *         return _LOCAL_TIMEZONE  # type: ignore
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
 *         return UTC             # <<<<<<<<<<<<<<
 *     try:
 *         return T_ZONEINFO(name)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_7cytimes_5utils_UTC);
    __pyx_r = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
    goto __pyx_L0;

    /* "cytimes/utils.py":180
 *     if name_lower == "local":
 *         return _LOCAL_TIMEZONE  # type: ignore
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore             # <<<<<<<<<<<<<<
 *         return UTC
 *     try:
*/
  }

  /* "cytimes/utils.py":182
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
 *         return UTC
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(name)
 *     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:*/ {

      /* "cytimes/utils.py":183
 *         return UTC
 *     try:
 *         return T_ZONEINFO(name)             # <<<<<<<<<<<<<<
 *     except Exception as err:
 *         raise errors.InvalidTimezoneError("Invalid timezone name '%s'" % name) from err
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_7cytimes_5utils_T_ZONEINFO);
      __pyx_t_7 = __pyx_v_7cytimes_5utils_T_ZONEINFO; 
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_name};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L9_try_return;

      /* "cytimes/utils.py":182
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
 *         return UTC
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(name)
 *     except Exception as err:
*/
    }
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cytimes/utils.py":184
 *     try:
 *         return T_ZONEINFO(name)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise errors.InvalidTimezoneError("Invalid timezone name '%s'" % name) from err
 * 
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("cytimes.utils._get_zoneinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 184, __pyx_L7_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __pyx_v_err = __pyx_t_7;
      /*try:*/ {

        /* "cytimes/utils.py":185
 *         return T_ZONEINFO(name)
 *     except Exception as err:
 *         raise errors.InvalidTimezoneError("Invalid timezone name '%s'" % name) from err             # <<<<<<<<<<<<<<
 * 
 * 
*/
        __pyx_t_11 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_InvalidTimezoneError); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 185, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Invalid_timezone_name_s, __pyx_v_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
          assert(__pyx_t_11);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
          __pyx_t_8 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12};
          __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 185, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __Pyx_Raise(__pyx_t_10, 0, 0, __pyx_v_err);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(0, 185, __pyx_L16_error)
      }

      /* "cytimes/utils.py":184
 *     try:
 *         return T_ZONEINFO(name)
 *     except Exception as err:             # <<<<<<<<<<<<<<
 *         raise errors.InvalidTimezoneError("Invalid timezone name '%s'" % name) from err
 * 
*/
      /*finally:*/ {
        __pyx_L16_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_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_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_9 = __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_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
          goto __pyx_L7_except_error;
        }
      }
    }
    goto __pyx_L7_except_error;

    /* "cytimes/utils.py":182
 *     if set_contains(_UTC_ALIASES, name_lower):  # type: ignore
 *         return UTC
 *     try:             # <<<<<<<<<<<<<<
 *         return T_ZONEINFO(name)
 *     except Exception as err:
*/
    __pyx_L7_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_L9_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;
  }

  /* "cytimes/utils.py":174
 * 
 * 
 * @_lru_cache(maxsize=128)             # <<<<<<<<<<<<<<
 * def _get_zoneinfo(name: str) -> zoneinfo.ZoneInfo | datetime.timezone:
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._get_zoneinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_lower);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":208
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def tz_parse(tz: zoneinfo.ZoneInfo | datetime.timezone | str | None) -> object:
*/

static PyObject *__pyx_f_7cytimes_5utils_tz_parse(PyObject *__pyx_v_tz) {
  PyTypeObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_exc = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13[4];
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15[6];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tz_parse", 0);

  /* "cytimes/utils.py":229
 *     """
 *     # None
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return tz  # exit: as-is
 * 
*/
  __pyx_t_1 = (__pyx_v_tz == Py_None);
  if (__pyx_t_1) {

    /* "cytimes/utils.py":230
 *     # None
 *     if tz is None:
 *         return tz  # exit: as-is             # <<<<<<<<<<<<<<
 * 
 *     # zoneinfo.ZoneInfo / datetime.timezone
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_tz);
    __pyx_r = __pyx_v_tz;
    goto __pyx_L0;

    /* "cytimes/utils.py":229
 *     """
 *     # None
 *     if tz is None:             # <<<<<<<<<<<<<<
 *         return tz  # exit: as-is
 * 
*/
  }

  /* "cytimes/utils.py":233
 * 
 *     # zoneinfo.ZoneInfo / datetime.timezone
 *     dtype = type(tz)             # <<<<<<<<<<<<<<
 *     if dtype is T_ZONEINFO or dtype is T_TIMEZONE:
 *         return tz  # exit: as-is
*/
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_tz)));
  __pyx_v_dtype = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_tz)));

  /* "cytimes/utils.py":234
 *     # zoneinfo.ZoneInfo / datetime.timezone
 *     dtype = type(tz)
 *     if dtype is T_ZONEINFO or dtype is T_TIMEZONE:             # <<<<<<<<<<<<<<
 *         return tz  # exit: as-is
 * 
*/
  __pyx_t_2 = (__pyx_v_dtype == ((PyTypeObject*)__pyx_v_7cytimes_5utils_T_ZONEINFO));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dtype == ((PyTypeObject*)__pyx_v_7cytimes_5utils_T_TIMEZONE));
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cytimes/utils.py":235
 *     dtype = type(tz)
 *     if dtype is T_ZONEINFO or dtype is T_TIMEZONE:
 *         return tz  # exit: as-is             # <<<<<<<<<<<<<<
 * 
 *     # 'str' timezone name
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_tz);
    __pyx_r = __pyx_v_tz;
    goto __pyx_L0;

    /* "cytimes/utils.py":234
 *     # zoneinfo.ZoneInfo / datetime.timezone
 *     dtype = type(tz)
 *     if dtype is T_ZONEINFO or dtype is T_TIMEZONE:             # <<<<<<<<<<<<<<
 *         return tz  # exit: as-is
 * 
*/
  }

  /* "cytimes/utils.py":238
 * 
 *     # 'str' timezone name
 *     if isinstance(tz, str):             # <<<<<<<<<<<<<<
 *         return _get_zoneinfo(tz)
 * 
*/
  __pyx_t_1 = PyUnicode_Check(__pyx_v_tz); 
  if (__pyx_t_1) {

    /* "cytimes/utils.py":239
 *     # 'str' timezone name
 *     if isinstance(tz, str):
 *         return _get_zoneinfo(tz)             # <<<<<<<<<<<<<<
 * 
 *     # 'key' attribute: ZoneInfo subclass
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_zoneinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_tz};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cytimes/utils.py":238
 * 
 *     # 'str' timezone name
 *     if isinstance(tz, str):             # <<<<<<<<<<<<<<
 *         return _get_zoneinfo(tz)
 * 
*/
  }

  /* "cytimes/utils.py":242
 * 
 *     # 'key' attribute: ZoneInfo subclass
 *     exc = None             # <<<<<<<<<<<<<<
 *     if hasattr(tz, "key"):
 *         try:
*/
  __Pyx_INCREF(Py_None);
  __pyx_v_exc = ((PyObject*)Py_None);

  /* "cytimes/utils.py":243
 *     # 'key' attribute: ZoneInfo subclass
 *     exc = None
 *     if hasattr(tz, "key"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.key)
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 243, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/utils.py":244
 *     exc = None
 *     if hasattr(tz, "key"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.key)
 *         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/utils.py":245
 *     if hasattr(tz, "key"):
 *         try:
 *             return _get_zoneinfo(tz.key)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             exc = err
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_zoneinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          assert(__pyx_t_5);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L13_try_return;

        /* "cytimes/utils.py":244
 *     exc = None
 *     if hasattr(tz, "key"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.key)
 *         except Exception as err:
*/
      }
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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/utils.py":246
 *         try:
 *             return _get_zoneinfo(tz.key)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cytimes.utils.tz_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(0, 246, __pyx_L11_except_error)
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_err = __pyx_t_4;
        /*try:*/ {

          /* "cytimes/utils.py":247
 *             return _get_zoneinfo(tz.key)
 *         except Exception as err:
 *             exc = err             # <<<<<<<<<<<<<<
 * 
 *     # name attribute: ZoneInfo subclass
*/
          __Pyx_INCREF(__pyx_v_err);
          __Pyx_DECREF_SET(__pyx_v_exc, __pyx_v_err);
        }

        /* "cytimes/utils.py":246
 *         try:
 *             return _get_zoneinfo(tz.key)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L21;
          }
          __pyx_L21:;
        }
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L10_exception_handled;
      }
      goto __pyx_L11_except_error;

      /* "cytimes/utils.py":244
 *     exc = None
 *     if hasattr(tz, "key"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.key)
 *         except Exception as err:
*/
      __pyx_L11_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_L13_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_L10_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/utils.py":243
 *     # 'key' attribute: ZoneInfo subclass
 *     exc = None
 *     if hasattr(tz, "key"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.key)
*/
  }

  /* "cytimes/utils.py":250
 * 
 *     # name attribute: ZoneInfo subclass
 *     if hasattr(tz, "name"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.name)
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 250, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/utils.py":251
 *     # name attribute: ZoneInfo subclass
 *     if hasattr(tz, "name"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "cytimes/utils.py":252
 *     if hasattr(tz, "name"):
 *         try:
 *             return _get_zoneinfo(tz.name)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             exc = err
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_zoneinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
          __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 252, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_10);
        }
        __pyx_r = __pyx_t_10;
        __pyx_t_10 = 0;
        goto __pyx_L27_try_return;

        /* "cytimes/utils.py":251
 *     # name attribute: ZoneInfo subclass
 *     if hasattr(tz, "name"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:
*/
      }
      __pyx_L23_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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/utils.py":253
 *         try:
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cytimes.utils.tz_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 253, __pyx_L25_except_error)
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_err = __pyx_t_3;
        /*try:*/ {

          /* "cytimes/utils.py":254
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:
 *             exc = err             # <<<<<<<<<<<<<<
 * 
 *     # 'zone' attribute: pytz
*/
          __Pyx_INCREF(__pyx_v_err);
          __Pyx_DECREF_SET(__pyx_v_exc, __pyx_v_err);
        }

        /* "cytimes/utils.py":253
 *         try:
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L35;
          }
          __pyx_L35:;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L24_exception_handled;
      }
      goto __pyx_L25_except_error;

      /* "cytimes/utils.py":251
 *     # name attribute: ZoneInfo subclass
 *     if hasattr(tz, "name"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.name)
 *         except Exception as err:
*/
      __pyx_L25_except_error:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L27_try_return:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      goto __pyx_L0;
      __pyx_L24_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
    }

    /* "cytimes/utils.py":250
 * 
 *     # name attribute: ZoneInfo subclass
 *     if hasattr(tz, "name"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.name)
*/
  }

  /* "cytimes/utils.py":257
 * 
 *     # 'zone' attribute: pytz
 *     if hasattr(tz, "zone"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.zone)
*/
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_zone); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 257, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cytimes/utils.py":258
 *     # 'zone' attribute: pytz
 *     if hasattr(tz, "zone"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.zone)
 *         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/utils.py":259
 *     if hasattr(tz, "zone"):
 *         try:
 *             return _get_zoneinfo(tz.zone)             # <<<<<<<<<<<<<<
 *         except Exception as err:
 *             exc = err
*/
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_get_zoneinfo); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 259, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tz, __pyx_mstate_global->__pyx_n_u_zone); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L37_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L41_try_return;

        /* "cytimes/utils.py":258
 *     # 'zone' attribute: pytz
 *     if hasattr(tz, "zone"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.zone)
 *         except Exception as err:
*/
      }
      __pyx_L37_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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/utils.py":260
 *         try:
 *             return _get_zoneinfo(tz.zone)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("cytimes.utils.tz_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_10, &__pyx_t_4) < 0) __PYX_ERR(0, 260, __pyx_L39_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __pyx_v_err = __pyx_t_10;
        /*try:*/ {

          /* "cytimes/utils.py":261
 *             return _get_zoneinfo(tz.zone)
 *         except Exception as err:
 *             exc = err             # <<<<<<<<<<<<<<
 * 
 *     # Unsupported type
*/
          __Pyx_INCREF(__pyx_v_err);
          __Pyx_DECREF_SET(__pyx_v_exc, __pyx_v_err);
        }

        /* "cytimes/utils.py":260
 *         try:
 *             return _get_zoneinfo(tz.zone)
 *         except Exception as err:             # <<<<<<<<<<<<<<
 *             exc = err
 * 
*/
        /*finally:*/ {
          /*normal exit:*/{
            __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
            goto __pyx_L49;
          }
          __pyx_L49:;
        }
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L38_exception_handled;
      }
      goto __pyx_L39_except_error;

      /* "cytimes/utils.py":258
 *     # 'zone' attribute: pytz
 *     if hasattr(tz, "zone"):
 *         try:             # <<<<<<<<<<<<<<
 *             return _get_zoneinfo(tz.zone)
 *         except Exception as err:
*/
      __pyx_L39_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_L41_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_L38_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/utils.py":257
 * 
 *     # 'zone' attribute: pytz
 *     if hasattr(tz, "zone"):             # <<<<<<<<<<<<<<
 *         try:
 *             return _get_zoneinfo(tz.zone)
*/
  }

  /* "cytimes/utils.py":264
 * 
 *     # Unsupported type
 *     if exc is None:             # <<<<<<<<<<<<<<
 *         raise errors.InvalidTimezoneError(
 *             "Unsupported timezone '%s' %s" % (tz, type(tz))
*/
  __pyx_t_1 = (__pyx_v_exc == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_1)) {

    /* "cytimes/utils.py":265
 *     # Unsupported type
 *     if exc is None:
 *         raise errors.InvalidTimezoneError(             # <<<<<<<<<<<<<<
 *             "Unsupported timezone '%s' %s" % (tz, type(tz))
 *         )
*/
    __pyx_t_10 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_InvalidTimezoneError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/utils.py":266
 *     if exc is None:
 *         raise errors.InvalidTimezoneError(
 *             "Unsupported timezone '%s' %s" % (tz, type(tz))             # <<<<<<<<<<<<<<
 *         )
 *     else:
*/
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_timezone;
    __pyx_t_13[1] = __pyx_t_5;
    __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_13[3] = __pyx_t_12;
    __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_10);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 265, __pyx_L1_error)

    /* "cytimes/utils.py":264
 * 
 *     # Unsupported type
 *     if exc is None:             # <<<<<<<<<<<<<<
 *         raise errors.InvalidTimezoneError(
 *             "Unsupported timezone '%s' %s" % (tz, type(tz))
*/
  }

  /* "cytimes/utils.py":269
 *         )
 *     else:
 *         raise errors.InvalidTimezoneError(             # <<<<<<<<<<<<<<
 *             "Unsupported timezone '%s' %s\nError: %s" % (tz, type(tz), exc)
 *         ) from exc
*/
  /*else*/ {
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_errors); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_InvalidTimezoneError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "cytimes/utils.py":270
 *     else:
 *         raise errors.InvalidTimezoneError(
 *             "Unsupported timezone '%s' %s\nError: %s" % (tz, type(tz), exc)             # <<<<<<<<<<<<<<
 *         ) from exc
 * 
*/
    __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_tz), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_tz))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_exc), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Unsupported_timezone;
    __pyx_t_15[1] = __pyx_t_14;
    __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9;
    __pyx_t_15[3] = __pyx_t_12;
    __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u_Error;
    __pyx_t_15[5] = __pyx_t_5;
    __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 6, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_16};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __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_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }

    /* "cytimes/utils.py":271
 *         raise errors.InvalidTimezoneError(
 *             "Unsupported timezone '%s' %s\nError: %s" % (tz, type(tz), exc)
 *         ) from exc             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_Raise(__pyx_t_4, 0, 0, __pyx_v_exc);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 269, __pyx_L1_error)
  }

  /* "cytimes/utils.py":208
 * 
 * 
 * @cython.cfunc             # <<<<<<<<<<<<<<
 * @cython.inline(True)
 * def tz_parse(tz: zoneinfo.ZoneInfo | datetime.timezone | str | None) -> object:
*/

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils.tz_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dtype);
  __Pyx_XDECREF(__pyx_v_exc);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":276
 * ########## The REST utility functions are in the utils.pxd file ##########
 * ########## The following functions are for testing purpose only ##########
 * def _test_utils() -> None:             # <<<<<<<<<<<<<<
 *     # Parser
 *     _test_parser()
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_9_test_utils(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_9_test_utils = {"_test_utils", (PyCFunction)__pyx_pw_7cytimes_5utils_9_test_utils, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_9_test_utils(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_utils (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_8_test_utils(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_8_test_utils(CYTHON_UNUSED PyObject *__pyx_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("_test_utils", 0);

  /* "cytimes/utils.py":278
 * def _test_utils() -> None:
 *     # Parser
 *     _test_parser()             # <<<<<<<<<<<<<<
 *     # Time
 *     _test_localtime_n_gmtime()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_parser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __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, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":280
 *     _test_parser()
 *     # Time
 *     _test_localtime_n_gmtime()             # <<<<<<<<<<<<<<
 *     # Calendar
 *     _test_is_leap_year()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_localtime_n_gmtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":282
 *     _test_localtime_n_gmtime()
 *     # Calendar
 *     _test_is_leap_year()             # <<<<<<<<<<<<<<
 *     _test_days_bf_year()
 *     _test_doy()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_is_leap_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __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, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":283
 *     # Calendar
 *     _test_is_leap_year()
 *     _test_days_bf_year()             # <<<<<<<<<<<<<<
 *     _test_doy()
 *     _test_quarter_of_month()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_days_bf_year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":284
 *     _test_is_leap_year()
 *     _test_days_bf_year()
 *     _test_doy()             # <<<<<<<<<<<<<<
 *     _test_quarter_of_month()
 *     _test_days_in_quarter()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_doy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __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, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":285
 *     _test_days_bf_year()
 *     _test_doy()
 *     _test_quarter_of_month()             # <<<<<<<<<<<<<<
 *     _test_days_in_quarter()
 *     _test_days_in_month()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_quarter_of_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":286
 *     _test_doy()
 *     _test_quarter_of_month()
 *     _test_days_in_quarter()             # <<<<<<<<<<<<<<
 *     _test_days_in_month()
 *     _test_days_bf_month()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_days_in_quarter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __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, 286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":287
 *     _test_quarter_of_month()
 *     _test_days_in_quarter()
 *     _test_days_in_month()             # <<<<<<<<<<<<<<
 *     _test_days_bf_month()
 *     _test_weekday()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_days_in_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":288
 *     _test_days_in_quarter()
 *     _test_days_in_month()
 *     _test_days_bf_month()             # <<<<<<<<<<<<<<
 *     _test_weekday()
 *     _test_isocalendar()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_days_bf_month); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __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, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":289
 *     _test_days_in_month()
 *     _test_days_bf_month()
 *     _test_weekday()             # <<<<<<<<<<<<<<
 *     _test_isocalendar()
 *     _test_iso_week1_mon_ord()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_weekday); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":290
 *     _test_days_bf_month()
 *     _test_weekday()
 *     _test_isocalendar()             # <<<<<<<<<<<<<<
 *     _test_iso_week1_mon_ord()
 *     _test_ymd_to_ord()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_isocalendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __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, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":291
 *     _test_weekday()
 *     _test_isocalendar()
 *     _test_iso_week1_mon_ord()             # <<<<<<<<<<<<<<
 *     _test_ymd_to_ord()
 *     _test_ymd_fr_ord()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_iso_week1_mon_ord); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":292
 *     _test_isocalendar()
 *     _test_iso_week1_mon_ord()
 *     _test_ymd_to_ord()             # <<<<<<<<<<<<<<
 *     _test_ymd_fr_ord()
 *     _test_ymd_fr_iso()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ymd_to_ord); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __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, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":293
 *     _test_iso_week1_mon_ord()
 *     _test_ymd_to_ord()
 *     _test_ymd_fr_ord()             # <<<<<<<<<<<<<<
 *     _test_ymd_fr_iso()
 *     # datetime.date
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_ord); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":294
 *     _test_ymd_to_ord()
 *     _test_ymd_fr_ord()
 *     _test_ymd_fr_iso()             # <<<<<<<<<<<<<<
 *     # datetime.date
 *     _test_date_generate()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_iso); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __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, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":296
 *     _test_ymd_fr_iso()
 *     # datetime.date
 *     _test_date_generate()             # <<<<<<<<<<<<<<
 *     _test_date_type_check()
 *     _test_date_conversion()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_date_generate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":297
 *     # datetime.date
 *     _test_date_generate()
 *     _test_date_type_check()             # <<<<<<<<<<<<<<
 *     _test_date_conversion()
 *     # datetime.datetime
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_date_type_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __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, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":298
 *     _test_date_generate()
 *     _test_date_type_check()
 *     _test_date_conversion()             # <<<<<<<<<<<<<<
 *     # datetime.datetime
 *     _test_dt_generate()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_date_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":300
 *     _test_date_conversion()
 *     # datetime.datetime
 *     _test_dt_generate()             # <<<<<<<<<<<<<<
 *     _test_dt_type_check()
 *     _test_dt_tzinfo()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_dt_generate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __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, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":301
 *     # datetime.datetime
 *     _test_dt_generate()
 *     _test_dt_type_check()             # <<<<<<<<<<<<<<
 *     _test_dt_tzinfo()
 *     _test_dt_conversion()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_dt_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":302
 *     _test_dt_generate()
 *     _test_dt_type_check()
 *     _test_dt_tzinfo()             # <<<<<<<<<<<<<<
 *     _test_dt_conversion()
 *     _test_dt_mainipulate()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_dt_tzinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __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, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":303
 *     _test_dt_type_check()
 *     _test_dt_tzinfo()
 *     _test_dt_conversion()             # <<<<<<<<<<<<<<
 *     _test_dt_mainipulate()
 *     _test_dt_arithmetic()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_dt_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":304
 *     _test_dt_tzinfo()
 *     _test_dt_conversion()
 *     _test_dt_mainipulate()             # <<<<<<<<<<<<<<
 *     _test_dt_arithmetic()
 *     _test_dt_normalize_tz()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_dt_mainipulate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __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, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":305
 *     _test_dt_conversion()
 *     _test_dt_mainipulate()
 *     _test_dt_arithmetic()             # <<<<<<<<<<<<<<
 *     _test_dt_normalize_tz()
 *     # datetime.time
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_dt_arithmetic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":306
 *     _test_dt_mainipulate()
 *     _test_dt_arithmetic()
 *     _test_dt_normalize_tz()             # <<<<<<<<<<<<<<
 *     # datetime.time
 *     _test_time_generate()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_dt_normalize_tz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __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, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":308
 *     _test_dt_normalize_tz()
 *     # datetime.time
 *     _test_time_generate()             # <<<<<<<<<<<<<<
 *     _test_time_type_check()
 *     _test_time_conversion()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_time_generate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":309
 *     # datetime.time
 *     _test_time_generate()
 *     _test_time_type_check()             # <<<<<<<<<<<<<<
 *     _test_time_conversion()
 *     # datetime.timedelta
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_time_type_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __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, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":310
 *     _test_time_generate()
 *     _test_time_type_check()
 *     _test_time_conversion()             # <<<<<<<<<<<<<<
 *     # datetime.timedelta
 *     _test_timedelta_generate()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_time_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":312
 *     _test_time_conversion()
 *     # datetime.timedelta
 *     _test_timedelta_generate()             # <<<<<<<<<<<<<<
 *     _test_timedelta_type_check()
 *     _test_timedelta_conversion()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_timedelta_generate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __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, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":313
 *     # datetime.timedelta
 *     _test_timedelta_generate()
 *     _test_timedelta_type_check()             # <<<<<<<<<<<<<<
 *     _test_timedelta_conversion()
 *     # datetime.tzinfo
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_timedelta_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":314
 *     _test_timedelta_generate()
 *     _test_timedelta_type_check()
 *     _test_timedelta_conversion()             # <<<<<<<<<<<<<<
 *     # datetime.tzinfo
 *     _test_tzinfo_generate()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_timedelta_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __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, 314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":316
 *     _test_timedelta_conversion()
 *     # datetime.tzinfo
 *     _test_tzinfo_generate()             # <<<<<<<<<<<<<<
 *     _test_tzinfo_type_check()
 *     _test_tzinfo_access()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_tzinfo_generate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":317
 *     # datetime.tzinfo
 *     _test_tzinfo_generate()
 *     _test_tzinfo_type_check()             # <<<<<<<<<<<<<<
 *     _test_tzinfo_access()
 *     # numpy.share
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_tzinfo_type_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __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, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":318
 *     _test_tzinfo_generate()
 *     _test_tzinfo_type_check()
 *     _test_tzinfo_access()             # <<<<<<<<<<<<<<
 *     # numpy.share
 *     _test_numpy_share()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_tzinfo_access); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":320
 *     _test_tzinfo_access()
 *     # numpy.share
 *     _test_numpy_share()             # <<<<<<<<<<<<<<
 *     # numpy.datetime64
 *     _test_datetime64_type_check()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_numpy_share); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __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, 320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":322
 *     _test_numpy_share()
 *     # numpy.datetime64
 *     _test_datetime64_type_check()             # <<<<<<<<<<<<<<
 *     _test_datetime64_conversion()
 *     # numpy.timedelta64
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_datetime64_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":323
 *     # numpy.datetime64
 *     _test_datetime64_type_check()
 *     _test_datetime64_conversion()             # <<<<<<<<<<<<<<
 *     # numpy.timedelta64
 *     _test_timedelta64_type_check()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_datetime64_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __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, 323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":325
 *     _test_datetime64_conversion()
 *     # numpy.timedelta64
 *     _test_timedelta64_type_check()             # <<<<<<<<<<<<<<
 *     _test_timedelta64_conversion()
 *     # numpy.ndarray
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_timedelta64_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":326
 *     # numpy.timedelta64
 *     _test_timedelta64_type_check()
 *     _test_timedelta64_conversion()             # <<<<<<<<<<<<<<
 *     # numpy.ndarray
 *     _test_ndarray_type_check()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_timedelta64_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __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, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":328
 *     _test_timedelta64_conversion()
 *     # numpy.ndarray
 *     _test_ndarray_type_check()             # <<<<<<<<<<<<<<
 *     _test_ndarray_generate()
 *     _test_ndarray_dt64_type_check()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_ndarray_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":329
 *     # numpy.ndarray
 *     _test_ndarray_type_check()
 *     _test_ndarray_generate()             # <<<<<<<<<<<<<<
 *     _test_ndarray_dt64_type_check()
 *     _test_ndarray_dt64_conversion()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ndarray_generate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __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, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":330
 *     _test_ndarray_type_check()
 *     _test_ndarray_generate()
 *     _test_ndarray_dt64_type_check()             # <<<<<<<<<<<<<<
 *     _test_ndarray_dt64_conversion()
 *     _test_ndarray_td64_type_check()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":331
 *     _test_ndarray_generate()
 *     _test_ndarray_dt64_type_check()
 *     _test_ndarray_dt64_conversion()             # <<<<<<<<<<<<<<
 *     _test_ndarray_td64_type_check()
 *     _test_ndarray_td64_conversion()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __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, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":332
 *     _test_ndarray_dt64_type_check()
 *     _test_ndarray_dt64_conversion()
 *     _test_ndarray_td64_type_check()             # <<<<<<<<<<<<<<
 *     _test_ndarray_td64_conversion()
 *     # math
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_type_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":333
 *     _test_ndarray_dt64_conversion()
 *     _test_ndarray_td64_type_check()
 *     _test_ndarray_td64_conversion()             # <<<<<<<<<<<<<<
 *     # math
 *     _test_math()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __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, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":335
 *     _test_ndarray_td64_conversion()
 *     # math
 *     _test_math()             # <<<<<<<<<<<<<<
 *     _test_ndarray_math()
 *     _test_slice_to_uint()
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":336
 *     # math
 *     _test_math()
 *     _test_ndarray_math()             # <<<<<<<<<<<<<<
 *     _test_slice_to_uint()
 *     _test_slice_to_ufloat()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_ndarray_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __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, 336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":337
 *     _test_math()
 *     _test_ndarray_math()
 *     _test_slice_to_uint()             # <<<<<<<<<<<<<<
 *     _test_slice_to_ufloat()
 *     # hmsf
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_slice_to_uint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":338
 *     _test_ndarray_math()
 *     _test_slice_to_uint()
 *     _test_slice_to_ufloat()             # <<<<<<<<<<<<<<
 *     # hmsf
 *     _test_sec_to_us()
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_test_slice_to_ufloat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __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, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":340
 *     _test_slice_to_ufloat()
 *     # hmsf
 *     _test_sec_to_us()             # <<<<<<<<<<<<<<
 *     _cross_test_with_ndarray()
 * 
*/
  __pyx_t_3 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_test_sec_to_us); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    assert(__pyx_t_3);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
    __pyx_t_4 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":341
 *     # hmsf
 *     _test_sec_to_us()
 *     _cross_test_with_ndarray()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cross_test_with_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __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, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":276
 * ########## The REST utility functions are in the utils.pxd file ##########
 * ########## The following functions are for testing purpose only ##########
 * def _test_utils() -> None:             # <<<<<<<<<<<<<<
 *     # Parser
 *     _test_parser()
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cytimes.utils._test_utils", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":345
 * 
 * # Parser
 * def _test_parser() -> None:             # <<<<<<<<<<<<<<
 *     # boolean
 *     for i in range(128):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_11_test_parser(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_11_test_parser = {"_test_parser", (PyCFunction)__pyx_pw_7cytimes_5utils_11_test_parser, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_11_test_parser(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_parser (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_10_test_parser(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_10_test_parser(CYTHON_UNUSED PyObject *__pyx_self) {
  long __pyx_v_i;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_t = 0;
  PyObject *__pyx_v_ss = NULL;
  PyObject *__pyx_v_us = NULL;
  __pyx_t_7cytimes_5utils_sf __pyx_v_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_parse_numeric_kind __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  __pyx_t_7cytimes_5utils_sf __pyx_t_13;
  PyObject *__pyx_t_14[5];
  size_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_parser", 0);

  /* "cytimes/utils.py":347
 * def _test_parser() -> None:
 *     # boolean
 *     for i in range(128):             # <<<<<<<<<<<<<<
 *         s = chr(i)
 *         # is_iso_sep
*/
  for (__pyx_t_1 = 0; __pyx_t_1 < 0x80; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cytimes/utils.py":348
 *     # boolean
 *     for i in range(128):
 *         s = chr(i)             # <<<<<<<<<<<<<<
 *         # is_iso_sep
 *         if s in ("t", "T", " "):
*/
    __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cytimes/utils.py":350
 *         s = chr(i)
 *         # is_iso_sep
 *         if s in ("t", "T", " "):             # <<<<<<<<<<<<<<
 *             assert is_iso_sep(i)  # type: ignore
 *             assert is_str_iso_sep(s)  # type: ignore
*/
    __Pyx_INCREF(__pyx_v_s);
    __pyx_t_3 = __pyx_v_s;
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_t, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 350, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_T, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 350, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 350, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
    if (__pyx_t_5) {

      /* "cytimes/utils.py":351
 *         # is_iso_sep
 *         if s in ("t", "T", " "):
 *             assert is_iso_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_iso_sep(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_iso_sep(__pyx_v_i);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 351, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 351, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":352
 *         if s in ("t", "T", " "):
 *             assert is_iso_sep(i)  # type: ignore
 *             assert is_str_iso_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_iso_sep(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_iso_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 352, __pyx_L1_error)
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 352, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 352, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":350
 *         s = chr(i)
 *         # is_iso_sep
 *         if s in ("t", "T", " "):             # <<<<<<<<<<<<<<
 *             assert is_iso_sep(i)  # type: ignore
 *             assert is_str_iso_sep(s)  # type: ignore
*/
      goto __pyx_L5;
    }

    /* "cytimes/utils.py":354
 *             assert is_str_iso_sep(s)  # type: ignore
 *         else:
 *             assert not is_iso_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_iso_sep(s)  # type: ignore
 *         # is_date_sep
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_iso_sep(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 354, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 354, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":355
 *         else:
 *             assert not is_iso_sep(i)  # type: ignore
 *             assert not is_str_iso_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_date_sep
 *         if s in ("-", "/", "."):
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_iso_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 355, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 355, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 355, __pyx_L1_error)
      #endif
    }
    __pyx_L5:;

    /* "cytimes/utils.py":357
 *             assert not is_str_iso_sep(s)  # type: ignore
 *         # is_date_sep
 *         if s in ("-", "/", "."):             # <<<<<<<<<<<<<<
 *             assert is_date_sep(i)  # type: ignore
 *             assert is_str_date_sep(s)  # type: ignore
*/
    __Pyx_INCREF(__pyx_v_s);
    __pyx_t_3 = __pyx_v_s;
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 357, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__12, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 357, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 357, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_5;
    __pyx_L10_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
    if (__pyx_t_5) {

      /* "cytimes/utils.py":358
 *         # is_date_sep
 *         if s in ("-", "/", "."):
 *             assert is_date_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_date_sep(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_date_sep(__pyx_v_i);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 358, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 358, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":359
 *         if s in ("-", "/", "."):
 *             assert is_date_sep(i)  # type: ignore
 *             assert is_str_date_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_date_sep(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_date_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 359, __pyx_L1_error)
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 359, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 359, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":357
 *             assert not is_str_iso_sep(s)  # type: ignore
 *         # is_date_sep
 *         if s in ("-", "/", "."):             # <<<<<<<<<<<<<<
 *             assert is_date_sep(i)  # type: ignore
 *             assert is_str_date_sep(s)  # type: ignore
*/
      goto __pyx_L9;
    }

    /* "cytimes/utils.py":361
 *             assert is_str_date_sep(s)  # type: ignore
 *         else:
 *             assert not is_date_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_date_sep(s)  # type: ignore
 *         # is_time_sep
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_date_sep(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 361, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 361, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":362
 *         else:
 *             assert not is_date_sep(i)  # type: ignore
 *             assert not is_str_date_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_time_sep
 *         if s == ":":
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_date_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 362, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 362, __pyx_L1_error)
      #endif
    }
    __pyx_L9:;

    /* "cytimes/utils.py":364
 *             assert not is_str_date_sep(s)  # type: ignore
 *         # is_time_sep
 *         if s == ":":             # <<<<<<<<<<<<<<
 *             assert is_time_sep(i)  # type: ignore
 *             assert is_str_time_sep(s)  # type: ignore
*/
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_s, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 364, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "cytimes/utils.py":365
 *         # is_time_sep
 *         if s == ":":
 *             assert is_time_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_time_sep(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_time_sep(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 365, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 365, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":366
 *         if s == ":":
 *             assert is_time_sep(i)  # type: ignore
 *             assert is_str_time_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_time_sep(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_time_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 366, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 366, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":364
 *             assert not is_str_date_sep(s)  # type: ignore
 *         # is_time_sep
 *         if s == ":":             # <<<<<<<<<<<<<<
 *             assert is_time_sep(i)  # type: ignore
 *             assert is_str_time_sep(s)  # type: ignore
*/
      goto __pyx_L13;
    }

    /* "cytimes/utils.py":368
 *             assert is_str_time_sep(s)  # type: ignore
 *         else:
 *             assert not is_time_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_time_sep(s)  # type: ignore
 *         # is_isoweek_sep
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (!__pyx_f_7cytimes_5utils_is_time_sep(__pyx_v_i));
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 368, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 368, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":369
 *         else:
 *             assert not is_time_sep(i)  # type: ignore
 *             assert not is_str_time_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_isoweek_sep
 *         if s in ("w", "W"):
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_time_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
        __pyx_t_5 = (!__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 369, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 369, __pyx_L1_error)
      #endif
    }
    __pyx_L13:;

    /* "cytimes/utils.py":371
 *             assert not is_str_time_sep(s)  # type: ignore
 *         # is_isoweek_sep
 *         if s in ("w", "W"):             # <<<<<<<<<<<<<<
 *             assert is_isoweek_sep(i)  # type: ignore
 *             assert is_str_isoweek_sep(s)  # type: ignore
*/
    __Pyx_INCREF(__pyx_v_s);
    __pyx_t_3 = __pyx_v_s;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_w, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 371, __pyx_L1_error)
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_W, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 371, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_4;
    __pyx_L15_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __pyx_t_5;
    if (__pyx_t_4) {

      /* "cytimes/utils.py":372
 *         # is_isoweek_sep
 *         if s in ("w", "W"):
 *             assert is_isoweek_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_isoweek_sep(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_isoweek_sep(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 372, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 372, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":373
 *         if s in ("w", "W"):
 *             assert is_isoweek_sep(i)  # type: ignore
 *             assert is_str_isoweek_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_isoweek_sep(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_isoweek_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 373, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 373, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 373, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":371
 *             assert not is_str_time_sep(s)  # type: ignore
 *         # is_isoweek_sep
 *         if s in ("w", "W"):             # <<<<<<<<<<<<<<
 *             assert is_isoweek_sep(i)  # type: ignore
 *             assert is_str_isoweek_sep(s)  # type: ignore
*/
      goto __pyx_L14;
    }

    /* "cytimes/utils.py":375
 *             assert is_str_isoweek_sep(s)  # type: ignore
 *         else:
 *             assert not is_isoweek_sep(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_isoweek_sep(s)  # type: ignore
 *         # is_ascii_digit
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (!__pyx_f_7cytimes_5utils_is_isoweek_sep(__pyx_v_i));
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 375, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 375, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":376
 *         else:
 *             assert not is_isoweek_sep(i)  # type: ignore
 *             assert not is_str_isoweek_sep(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_ascii_digit
 *         if s in "0123456789":
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_isoweek_sep(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error)
        __pyx_t_5 = (!__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 376, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 376, __pyx_L1_error)
      #endif
    }
    __pyx_L14:;

    /* "cytimes/utils.py":378
 *             assert not is_str_isoweek_sep(s)  # type: ignore
 *         # is_ascii_digit
 *         if s in "0123456789":             # <<<<<<<<<<<<<<
 *             assert is_ascii_digit(i)  # type: ignore
 *             assert is_str_ascii_digits(s)  # type: ignore
*/
    __pyx_t_5 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_s, __pyx_mstate_global->__pyx_kp_u_0123456789, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 378, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cytimes/utils.py":379
 *         # is_ascii_digit
 *         if s in "0123456789":
 *             assert is_ascii_digit(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_digits(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_i);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 379, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 379, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":380
 *         if s in "0123456789":
 *             assert is_ascii_digit(i)  # type: ignore
 *             assert is_str_ascii_digits(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_digit(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_digits(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 380, __pyx_L1_error)
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 380, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 380, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":378
 *             assert not is_str_isoweek_sep(s)  # type: ignore
 *         # is_ascii_digit
 *         if s in "0123456789":             # <<<<<<<<<<<<<<
 *             assert is_ascii_digit(i)  # type: ignore
 *             assert is_str_ascii_digits(s)  # type: ignore
*/
      goto __pyx_L17;
    }

    /* "cytimes/utils.py":382
 *             assert is_str_ascii_digits(s)  # type: ignore
 *         else:
 *             assert not is_ascii_digit(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_digits(s)  # type: ignore
 *         # is_ascii_letter_upper
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_ascii_digit(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 382, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 382, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":383
 *         else:
 *             assert not is_ascii_digit(i)  # type: ignore
 *             assert not is_str_ascii_digits(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_ascii_letter_upper
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_digits(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 383, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 383, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 383, __pyx_L1_error)
      #endif
    }
    __pyx_L17:;

    /* "cytimes/utils.py":385
 *             assert not is_str_ascii_digits(s)  # type: ignore
 *         # is_ascii_letter_upper
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter_upper(i)  # type: ignore
 *             assert is_str_ascii_letters_upper(s)  # type: ignore
*/
    __pyx_t_4 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZ, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 385, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "cytimes/utils.py":386
 *         # is_ascii_letter_upper
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
 *             assert is_ascii_letter_upper(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_letters_upper(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 386, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 386, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":387
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
 *             assert is_ascii_letter_upper(i)  # type: ignore
 *             assert is_str_ascii_letters_upper(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_letter_upper(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 387, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 387, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 387, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":385
 *             assert not is_str_ascii_digits(s)  # type: ignore
 *         # is_ascii_letter_upper
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter_upper(i)  # type: ignore
 *             assert is_str_ascii_letters_upper(s)  # type: ignore
*/
      goto __pyx_L18;
    }

    /* "cytimes/utils.py":389
 *             assert is_str_ascii_letters_upper(s)  # type: ignore
 *         else:
 *             assert not is_ascii_letter_upper(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_letters_upper(s)  # type: ignore
 *         # is_ascii_letter_lower
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_upper(__pyx_v_i));
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 389, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 389, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":390
 *         else:
 *             assert not is_ascii_letter_upper(i)  # type: ignore
 *             assert not is_str_ascii_letters_upper(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # is_ascii_letter_lower
 *         if s in "abcdefghijklmnopqrstuvwxyz":
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 390, __pyx_L1_error)
        __pyx_t_5 = (!__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 390, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 390, __pyx_L1_error)
      #endif
    }
    __pyx_L18:;

    /* "cytimes/utils.py":392
 *             assert not is_str_ascii_letters_upper(s)  # type: ignore
 *         # is_ascii_letter_lower
 *         if s in "abcdefghijklmnopqrstuvwxyz":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter_lower(i)  # type: ignore
 *             assert is_str_ascii_letters_lower(s)  # type: ignore
*/
    __pyx_t_5 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_abcdefghijklmnopqrstuvwxyz, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 392, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "cytimes/utils.py":393
 *         # is_ascii_letter_lower
 *         if s in "abcdefghijklmnopqrstuvwxyz":
 *             assert is_ascii_letter_lower(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_letters_lower(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_v_i);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 393, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 393, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":394
 *         if s in "abcdefghijklmnopqrstuvwxyz":
 *             assert is_ascii_letter_lower(i)  # type: ignore
 *             assert is_str_ascii_letters_lower(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_letter_lower(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L1_error)
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 394, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 394, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":392
 *             assert not is_str_ascii_letters_upper(s)  # type: ignore
 *         # is_ascii_letter_lower
 *         if s in "abcdefghijklmnopqrstuvwxyz":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter_lower(i)  # type: ignore
 *             assert is_str_ascii_letters_lower(s)  # type: ignore
*/
      goto __pyx_L19;
    }

    /* "cytimes/utils.py":396
 *             assert is_str_ascii_letters_lower(s)  # type: ignore
 *         else:
 *             assert not is_ascii_letter_lower(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_letters_lower(s)  # type: ignore
 *         # alphabetic
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_ascii_letter_lower(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 396, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 396, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":397
 *         else:
 *             assert not is_ascii_letter_lower(i)  # type: ignore
 *             assert not is_str_ascii_letters_lower(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # alphabetic
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 397, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 397, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 397, __pyx_L1_error)
      #endif
    }
    __pyx_L19:;

    /* "cytimes/utils.py":399
 *             assert not is_str_ascii_letters_lower(s)  # type: ignore
 *         # alphabetic
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter(i)  # type: ignore
 *             assert is_str_ascii_letters(s)  # type: ignore
*/
    __pyx_t_4 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 399, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "cytimes/utils.py":400
 *         # alphabetic
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":
 *             assert is_ascii_letter(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_letters(s)  # type: ignore
 *             assert is_alpha(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 400, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 400, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":401
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":
 *             assert is_ascii_letter(i)  # type: ignore
 *             assert is_str_ascii_letters(s)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_alpha(i)  # type: ignore
 *             assert is_str_alphas(s)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_letters(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 401, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 401, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 401, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":402
 *             assert is_ascii_letter(i)  # type: ignore
 *             assert is_str_ascii_letters(s)  # type: ignore
 *             assert is_alpha(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_alphas(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 402, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 402, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":403
 *             assert is_str_ascii_letters(s)  # type: ignore
 *             assert is_alpha(i)  # type: ignore
 *             assert is_str_alphas(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_letter(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_alphas(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 403, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 403, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 403, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":399
 *             assert not is_str_ascii_letters_lower(s)  # type: ignore
 *         # alphabetic
 *         if s in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":             # <<<<<<<<<<<<<<
 *             assert is_ascii_letter(i)  # type: ignore
 *             assert is_str_ascii_letters(s)  # type: ignore
*/
      goto __pyx_L20;
    }

    /* "cytimes/utils.py":405
 *             assert is_str_alphas(s)  # type: ignore
 *         else:
 *             assert not is_ascii_letter(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_letters(s)  # type: ignore
 *             assert not is_alpha(i)  # type: ignore
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (!__pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_v_i));
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 405, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 405, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":406
 *         else:
 *             assert not is_ascii_letter(i)  # type: ignore
 *             assert not is_str_ascii_letters(s)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_alpha(i)  # type: ignore
 *             assert not is_str_alphas(s)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_letters(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 406, __pyx_L1_error)
        __pyx_t_5 = (!__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 406, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 406, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":407
 *             assert not is_ascii_letter(i)  # type: ignore
 *             assert not is_str_ascii_letters(s)  # type: ignore
 *             assert not is_alpha(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_alphas(s)  # type: ignore
 *         # ctl
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_alpha(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 407, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 407, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":408
 *             assert not is_str_ascii_letters(s)  # type: ignore
 *             assert not is_alpha(i)  # type: ignore
 *             assert not is_str_alphas(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # ctl
 *         if i < 32 or i == 127:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_alphas(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 408, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 408, __pyx_L1_error)
      #endif
    }
    __pyx_L20:;

    /* "cytimes/utils.py":410
 *             assert not is_str_alphas(s)  # type: ignore
 *         # ctl
 *         if i < 32 or i == 127:             # <<<<<<<<<<<<<<
 *             assert is_ascii_ctl(i)  # type: ignore
 *             assert is_str_ascii_ctl(s)  # type: ignore
*/
    __pyx_t_5 = (__pyx_v_i < 32);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_i == 0x7F);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_4) {

      /* "cytimes/utils.py":411
 *         # ctl
 *         if i < 32 or i == 127:
 *             assert is_ascii_ctl(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_ctl(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_ascii_ctl(__pyx_v_i);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 411, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 411, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":412
 *         if i < 32 or i == 127:
 *             assert is_ascii_ctl(i)  # type: ignore
 *             assert is_str_ascii_ctl(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_ctl(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 412, __pyx_L1_error)
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 412, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 412, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":410
 *             assert not is_str_alphas(s)  # type: ignore
 *         # ctl
 *         if i < 32 or i == 127:             # <<<<<<<<<<<<<<
 *             assert is_ascii_ctl(i)  # type: ignore
 *             assert is_str_ascii_ctl(s)  # type: ignore
*/
      goto __pyx_L21;
    }

    /* "cytimes/utils.py":414
 *             assert is_str_ascii_ctl(s)  # type: ignore
 *         else:
 *             assert not is_ascii_ctl(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_ctl(s)  # type: ignore
 *         # ctl or space
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = (!__pyx_f_7cytimes_5utils_is_ascii_ctl(__pyx_v_i));
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 414, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 414, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":415
 *         else:
 *             assert not is_ascii_ctl(i)  # type: ignore
 *             assert not is_str_ascii_ctl(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         # ctl or space
 *         if i <= 32 or i == 127:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl(__pyx_v_s, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L1_error)
        __pyx_t_5 = (!__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 415, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 415, __pyx_L1_error)
      #endif
    }
    __pyx_L21:;

    /* "cytimes/utils.py":417
 *             assert not is_str_ascii_ctl(s)  # type: ignore
 *         # ctl or space
 *         if i <= 32 or i == 127:             # <<<<<<<<<<<<<<
 *             assert is_ascii_ctl_or_space(i)  # type: ignore
 *             assert is_str_ascii_ctl_or_space(s)  # type: ignore
*/
    __pyx_t_4 = (__pyx_v_i <= 32);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L25_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_i == 0x7F);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L25_bool_binop_done:;
    if (__pyx_t_5) {

      /* "cytimes/utils.py":418
 *         # ctl or space
 *         if i <= 32 or i == 127:
 *             assert is_ascii_ctl_or_space(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert is_str_ascii_ctl_or_space(s)  # type: ignore
 *         else:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_v_i);
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 418, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 418, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":419
 *         if i <= 32 or i == 127:
 *             assert is_ascii_ctl_or_space(i)  # type: ignore
 *             assert is_str_ascii_ctl_or_space(s)  # type: ignore             # <<<<<<<<<<<<<<
 *         else:
 *             assert not is_ascii_ctl_or_space(i)  # type: ignore
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 419, __pyx_L1_error)
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 419, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 419, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":417
 *             assert not is_str_ascii_ctl(s)  # type: ignore
 *         # ctl or space
 *         if i <= 32 or i == 127:             # <<<<<<<<<<<<<<
 *             assert is_ascii_ctl_or_space(i)  # type: ignore
 *             assert is_str_ascii_ctl_or_space(s)  # type: ignore
*/
      goto __pyx_L24;
    }

    /* "cytimes/utils.py":421
 *             assert is_str_ascii_ctl_or_space(s)  # type: ignore
 *         else:
 *             assert not is_ascii_ctl_or_space(i)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert not is_str_ascii_ctl_or_space(s)  # type: ignore
 * 
*/
    /*else*/ {
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_ascii_ctl_or_space(__pyx_v_i));
        if (unlikely(!__pyx_t_5)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 421, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 421, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":422
 *         else:
 *             assert not is_ascii_ctl_or_space(i)  # type: ignore
 *             assert not is_str_ascii_ctl_or_space(s)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for k in (None, ""):
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(__pyx_v_s, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 422, __pyx_L1_error)
        __pyx_t_4 = (!__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 422, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 422, __pyx_L1_error)
      #endif
    }
    __pyx_L24:;
  }

  /* "cytimes/utils.py":424
 *             assert not is_str_ascii_ctl_or_space(s)  # type: ignore
 * 
 *     for k in (None, ""):             # <<<<<<<<<<<<<<
 *         assert not is_str_iso_sep(k)  # type: ignore
 *         assert not is_str_date_sep(k)  # type: ignore
*/
  __pyx_t_2 = __pyx_mstate_global->__pyx_tuple[0]; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= 2) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
    #else
    __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
    #endif
    ++__pyx_t_6;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_k, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":425
 * 
 *     for k in (None, ""):
 *         assert not is_str_iso_sep(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_date_sep(k)  # type: ignore
 *         assert not is_str_time_sep(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_iso_sep(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 425, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 425, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 425, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":426
 *     for k in (None, ""):
 *         assert not is_str_iso_sep(k)  # type: ignore
 *         assert not is_str_date_sep(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_time_sep(k)  # type: ignore
 *         assert not is_str_isoweek_sep(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_date_sep(__pyx_v_k, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 426, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 426, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 426, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":427
 *         assert not is_str_iso_sep(k)  # type: ignore
 *         assert not is_str_date_sep(k)  # type: ignore
 *         assert not is_str_time_sep(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_isoweek_sep(k)  # type: ignore
 *         assert not is_str_ascii_ctl(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_time_sep(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 427, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 427, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 427, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":428
 *         assert not is_str_date_sep(k)  # type: ignore
 *         assert not is_str_time_sep(k)  # type: ignore
 *         assert not is_str_isoweek_sep(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_ctl(k)  # type: ignore
 *         assert not is_str_ascii_ctl_or_space(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_isoweek_sep(__pyx_v_k, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 428, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 428, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":429
 *         assert not is_str_time_sep(k)  # type: ignore
 *         assert not is_str_isoweek_sep(k)  # type: ignore
 *         assert not is_str_ascii_ctl(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_ctl_or_space(k)  # type: ignore
 *         assert not is_str_ascii_digits(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 429, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 429, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 429, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":430
 *         assert not is_str_isoweek_sep(k)  # type: ignore
 *         assert not is_str_ascii_ctl(k)  # type: ignore
 *         assert not is_str_ascii_ctl_or_space(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_digits(k)  # type: ignore
 *         assert not is_str_ascii_letters_upper(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_ctl_or_space(__pyx_v_k, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 430, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 430, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 430, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":431
 *         assert not is_str_ascii_ctl(k)  # type: ignore
 *         assert not is_str_ascii_ctl_or_space(k)  # type: ignore
 *         assert not is_str_ascii_digits(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_letters_upper(k)  # type: ignore
 *         assert not is_str_ascii_letters_lower(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_digits(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 431, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 431, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":432
 *         assert not is_str_ascii_ctl_or_space(k)  # type: ignore
 *         assert not is_str_ascii_digits(k)  # type: ignore
 *         assert not is_str_ascii_letters_upper(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_letters_lower(k)  # type: ignore
 *         assert not is_str_ascii_letters(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_upper(__pyx_v_k, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 432, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 432, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":433
 *         assert not is_str_ascii_digits(k)  # type: ignore
 *         assert not is_str_ascii_letters_upper(k)  # type: ignore
 *         assert not is_str_ascii_letters_lower(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_letters(k)  # type: ignore
 *         assert not is_str_alphas(k)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_ascii_letters_lower(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 433, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 433, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 433, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":434
 *         assert not is_str_ascii_letters_upper(k)  # type: ignore
 *         assert not is_str_ascii_letters_lower(k)  # type: ignore
 *         assert not is_str_ascii_letters(k)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_alphas(k)  # type: ignore
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_letters(__pyx_v_k, NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 434, __pyx_L1_error)
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 434, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 434, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":435
 *         assert not is_str_ascii_letters_lower(k)  # type: ignore
 *         assert not is_str_ascii_letters(k)  # type: ignore
 *         assert not is_str_alphas(k)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Alphabetic extend case
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_alphas(__pyx_v_k, NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 435, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_4);
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 435, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 435, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":424
 *             assert not is_str_ascii_ctl_or_space(s)  # type: ignore
 * 
 *     for k in (None, ""):             # <<<<<<<<<<<<<<
 *         assert not is_str_iso_sep(k)  # type: ignore
 *         assert not is_str_date_sep(k)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":438
 * 
 *     # Alphabetic extend case
 *     for i in range(192, 208):             # <<<<<<<<<<<<<<
 *         assert not is_ascii_letter(i)  # type: ignore
 *         assert not is_str_ascii_letters(chr(i))  # type: ignore
*/
  for (__pyx_t_1 = 0xC0; __pyx_t_1 < 0xD0; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cytimes/utils.py":439
 *     # Alphabetic extend case
 *     for i in range(192, 208):
 *         assert not is_ascii_letter(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert not is_str_ascii_letters(chr(i))  # type: ignore
 *         assert is_alpha(i)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = (!__pyx_f_7cytimes_5utils_is_ascii_letter(__pyx_v_i));
      if (unlikely(!__pyx_t_5)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 439, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 439, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":440
 *     for i in range(192, 208):
 *         assert not is_ascii_letter(i)  # type: ignore
 *         assert not is_str_ascii_letters(chr(i))  # type: ignore             # <<<<<<<<<<<<<<
 *         assert is_alpha(i)  # type: ignore
 *         assert is_str_alphas(chr(i))  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_f_7cytimes_5utils_is_str_ascii_letters(((PyObject*)__pyx_t_2), NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (!__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 440, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 440, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":441
 *         assert not is_ascii_letter(i)  # type: ignore
 *         assert not is_str_ascii_letters(chr(i))  # type: ignore
 *         assert is_alpha(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert is_str_alphas(chr(i))  # type: ignore
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_alpha(__pyx_v_i);
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 441, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 441, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":442
 *         assert not is_str_ascii_letters(chr(i))  # type: ignore
 *         assert is_alpha(i)  # type: ignore
 *         assert is_str_alphas(chr(i))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Parse
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = PyUnicode_FromOrdinal(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __pyx_f_7cytimes_5utils_is_str_alphas(((PyObject*)__pyx_t_2), NULL); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 442, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 442, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 442, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":446
 *     # Parse
 *     # . parse_numeric_kind
 *     assert parse_numeric_kind("1", 0) == 1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind("1.", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("1.1", 0) == 2  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_1, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 446, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 1);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 446, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 446, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":447
 *     # . parse_numeric_kind
 *     assert parse_numeric_kind("1", 0) == 1  # type: ignore
 *     assert parse_numeric_kind("1.", 0) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind("1.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind(".1", 0) == 2  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_1_2, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 447, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 447, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 447, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":448
 *     assert parse_numeric_kind("1", 0) == 1  # type: ignore
 *     assert parse_numeric_kind("1.", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("1.1", 0) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind(".1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("0.1", 0) == 2  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_1_1, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 448, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 448, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 448, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":449
 *     assert parse_numeric_kind("1.", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("1.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind(".1", 0) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind("0.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("", 0) == 0  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_1_3, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 449, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 449, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":450
 *     assert parse_numeric_kind("1.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind(".1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("0.1", 0) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind("", 0) == 0  # type: ignore
 *     assert parse_numeric_kind(None, 0) == 0  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_0_1, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 450, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 450, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 450, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":451
 *     assert parse_numeric_kind(".1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("0.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("", 0) == 0  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind(None, 0) == 0  # type: ignore
 *     assert parse_numeric_kind("1a", 0) == 0  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u__5, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 451, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 451, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 451, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":452
 *     assert parse_numeric_kind("0.1", 0) == 2  # type: ignore
 *     assert parse_numeric_kind("", 0) == 0  # type: ignore
 *     assert parse_numeric_kind(None, 0) == 0  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_numeric_kind("1a", 0) == 0  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(((PyObject*)Py_None), &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 452, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 452, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 452, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":453
 *     assert parse_numeric_kind("", 0) == 0  # type: ignore
 *     assert parse_numeric_kind(None, 0) == 0  # type: ignore
 *     assert parse_numeric_kind("1a", 0) == 0  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isoyear
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.token_len = 0;
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_numeric_kind(__pyx_mstate_global->__pyx_kp_u_1a, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 453, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 453, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 453, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":456
 * 
 *     # . parse_isoyear
 *     t: str = "2021-01-02T03:04:05.006007"             # <<<<<<<<<<<<<<
 *     assert parse_isoyear(t, 0) == 2021  # type: ignore
 *     assert parse_isoyear(t, 1) == -1  # type: ignore
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_2021_01_02T03_04_05_006007);
  __pyx_v_t = __pyx_mstate_global->__pyx_kp_u_2021_01_02T03_04_05_006007;

  /* "cytimes/utils.py":457
 *     # . parse_isoyear
 *     t: str = "2021-01-02T03:04:05.006007"
 *     assert parse_isoyear(t, 0) == 2021  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoyear(t, 1) == -1  # type: ignore
 *     assert parse_isoyear(None, 1) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoyear(__pyx_v_t, 0, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 457, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x7E5);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 457, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 457, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":458
 *     t: str = "2021-01-02T03:04:05.006007"
 *     assert parse_isoyear(t, 0) == 2021  # type: ignore
 *     assert parse_isoyear(t, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoyear(None, 1) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoyear(__pyx_v_t, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 458, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 458, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 458, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":459
 *     assert parse_isoyear(t, 0) == 2021  # type: ignore
 *     assert parse_isoyear(t, 1) == -1  # type: ignore
 *     assert parse_isoyear(None, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isomonth
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoyear(((PyObject*)Py_None), 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 459, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 459, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 459, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":462
 * 
 *     # . parse_isomonth
 *     assert parse_isomonth(t, 5) == 1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isomonth(t, 6) == -1  # type: ignore
 *     assert parse_isomonth(None, 6) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isomonth(__pyx_v_t, 5, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 462, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 1);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 462, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 462, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":463
 *     # . parse_isomonth
 *     assert parse_isomonth(t, 5) == 1  # type: ignore
 *     assert parse_isomonth(t, 6) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isomonth(None, 6) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isomonth(__pyx_v_t, 6, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 463, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 463, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 463, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":464
 *     assert parse_isomonth(t, 5) == 1  # type: ignore
 *     assert parse_isomonth(t, 6) == -1  # type: ignore
 *     assert parse_isomonth(None, 6) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isoday
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isomonth(((PyObject*)Py_None), 6, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 464, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 464, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 464, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":467
 * 
 *     # . parse_isoday
 *     assert parse_isoday(t, 8) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoday(t, 9) == -1  # type: ignore
 *     assert parse_isoday(None, 9) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoday(__pyx_v_t, 8, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 467, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 467, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 467, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":468
 *     # . parse_isoday
 *     assert parse_isoday(t, 8) == 2  # type: ignore
 *     assert parse_isoday(t, 9) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoday(None, 9) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoday(__pyx_v_t, 9, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 468, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 468, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 468, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":469
 *     assert parse_isoday(t, 8) == 2  # type: ignore
 *     assert parse_isoday(t, 9) == -1  # type: ignore
 *     assert parse_isoday(None, 9) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isoweek
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoday(((PyObject*)Py_None), 9, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 469, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 469, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 469, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":472
 * 
 *     # . parse_isoweek
 *     t = "2021-W52-6"             # <<<<<<<<<<<<<<
 *     assert parse_isoweek(t, 6) == 52  # type: ignore
 *     assert parse_isoweek(t, 7) == -1  # type: ignore
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_2021_W52_6);
  __Pyx_DECREF_SET(__pyx_v_t, __pyx_mstate_global->__pyx_kp_u_2021_W52_6);

  /* "cytimes/utils.py":473
 *     # . parse_isoweek
 *     t = "2021-W52-6"
 *     assert parse_isoweek(t, 6) == 52  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweek(t, 7) == -1  # type: ignore
 *     assert parse_isoweek(None, 7) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweek(__pyx_v_t, 6, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 473, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 52);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 473, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 473, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":474
 *     t = "2021-W52-6"
 *     assert parse_isoweek(t, 6) == 52  # type: ignore
 *     assert parse_isoweek(t, 7) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweek(None, 7) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweek(__pyx_v_t, 7, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 474, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 474, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 474, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":475
 *     assert parse_isoweek(t, 6) == 52  # type: ignore
 *     assert parse_isoweek(t, 7) == -1  # type: ignore
 *     assert parse_isoweek(None, 7) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isoweekday
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweek(((PyObject*)Py_None), 7, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 475, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 475, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 475, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":478
 * 
 *     # . parse_isoweekday
 *     assert parse_isoweekday(t, 9) == 6  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweekday(t, 8) == -1  # type: ignore
 *     assert parse_isoweekday(t, 10) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(__pyx_v_t, 9, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 478, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 6);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 478, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 478, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":479
 *     # . parse_isoweekday
 *     assert parse_isoweekday(t, 9) == 6  # type: ignore
 *     assert parse_isoweekday(t, 8) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweekday(t, 10) == -1  # type: ignore
 *     assert parse_isoweekday(t, 1) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(__pyx_v_t, 8, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 479, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 479, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 479, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":480
 *     assert parse_isoweekday(t, 9) == 6  # type: ignore
 *     assert parse_isoweekday(t, 8) == -1  # type: ignore
 *     assert parse_isoweekday(t, 10) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweekday(t, 1) == -1  # type: ignore
 *     assert parse_isoweekday(t, 0) == 2  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(__pyx_v_t, 10, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 480, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 480, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 480, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":481
 *     assert parse_isoweekday(t, 8) == -1  # type: ignore
 *     assert parse_isoweekday(t, 10) == -1  # type: ignore
 *     assert parse_isoweekday(t, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweekday(t, 0) == 2  # type: ignore
 *     assert parse_isoweekday(None, 0) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(__pyx_v_t, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 481, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 481, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 481, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":482
 *     assert parse_isoweekday(t, 10) == -1  # type: ignore
 *     assert parse_isoweekday(t, 1) == -1  # type: ignore
 *     assert parse_isoweekday(t, 0) == 2  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isoweekday(None, 0) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(__pyx_v_t, 0, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 482, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 2);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 482, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 482, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":483
 *     assert parse_isoweekday(t, 1) == -1  # type: ignore
 *     assert parse_isoweekday(t, 0) == 2  # type: ignore
 *     assert parse_isoweekday(None, 0) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isodoy
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isoweekday(((PyObject*)Py_None), 0, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 483, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 483, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 483, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":486
 * 
 *     # . parse_isodoy
 *     t = "2021-365"             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(t, 5) == 365  # type: ignore
 *     assert parse_isodoy(t, 6) == -1  # type: ignore
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_2021_365);
  __Pyx_DECREF_SET(__pyx_v_t, __pyx_mstate_global->__pyx_kp_u_2021_365);

  /* "cytimes/utils.py":487
 *     # . parse_isodoy
 *     t = "2021-365"
 *     assert parse_isodoy(t, 5) == 365  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(t, 6) == -1  # type: ignore
 *     assert parse_isodoy(t, 4) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(__pyx_v_t, 5, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 487, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x16D);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 487, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 487, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":488
 *     t = "2021-365"
 *     assert parse_isodoy(t, 5) == 365  # type: ignore
 *     assert parse_isodoy(t, 6) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(t, 4) == -1  # type: ignore
 *     t = "2021-367"
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(__pyx_v_t, 6, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 488, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 488, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 488, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":489
 *     assert parse_isodoy(t, 5) == 365  # type: ignore
 *     assert parse_isodoy(t, 6) == -1  # type: ignore
 *     assert parse_isodoy(t, 4) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     t = "2021-367"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(__pyx_v_t, 4, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 489, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 489, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 489, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":490
 *     assert parse_isodoy(t, 6) == -1  # type: ignore
 *     assert parse_isodoy(t, 4) == -1  # type: ignore
 *     t = "2021-367"             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
 *     t = "2021-000"
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_2021_367);
  __Pyx_DECREF_SET(__pyx_v_t, __pyx_mstate_global->__pyx_kp_u_2021_367);

  /* "cytimes/utils.py":491
 *     assert parse_isodoy(t, 4) == -1  # type: ignore
 *     t = "2021-367"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     t = "2021-000"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(__pyx_v_t, 5, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 491, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 491, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 491, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":492
 *     t = "2021-367"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
 *     t = "2021-000"             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
 *     assert parse_isodoy(None, 4) == -1  # type: ignore
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_2021_000);
  __Pyx_DECREF_SET(__pyx_v_t, __pyx_mstate_global->__pyx_kp_u_2021_000);

  /* "cytimes/utils.py":493
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
 *     t = "2021-000"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isodoy(None, 4) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(__pyx_v_t, 5, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 493, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 493, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 493, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":494
 *     t = "2021-000"
 *     assert parse_isodoy(t, 5) == -1  # type: ignore
 *     assert parse_isodoy(None, 4) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isohour
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isodoy(((PyObject*)Py_None), 4, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 494, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 494, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 494, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":497
 * 
 *     # . parse_isohour
 *     t = "03:04:05"             # <<<<<<<<<<<<<<
 *     assert parse_isohour(t, 0) == 3  # type: ignore
 *     assert parse_isohour(t, 1) == -1  # type: ignore
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_03_04_05);
  __Pyx_DECREF_SET(__pyx_v_t, __pyx_mstate_global->__pyx_kp_u_03_04_05);

  /* "cytimes/utils.py":498
 *     # . parse_isohour
 *     t = "03:04:05"
 *     assert parse_isohour(t, 0) == 3  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isohour(t, 1) == -1  # type: ignore
 *     assert parse_isohour(None, 1) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isohour(__pyx_v_t, 0, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 498, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 3);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 498, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 498, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":499
 *     t = "03:04:05"
 *     assert parse_isohour(t, 0) == 3  # type: ignore
 *     assert parse_isohour(t, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isohour(None, 1) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isohour(__pyx_v_t, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 499, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 499, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 499, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":500
 *     assert parse_isohour(t, 0) == 3  # type: ignore
 *     assert parse_isohour(t, 1) == -1  # type: ignore
 *     assert parse_isohour(None, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isominute
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isohour(((PyObject*)Py_None), 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 500, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 500, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 500, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":503
 * 
 *     # . parse_isominute
 *     assert parse_isominute(t, 3) == 4  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isominute(t, 4) == -1  # type: ignore
 *     assert parse_isominute(None, 4) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isominute(__pyx_v_t, 3, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 503, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 4);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 503, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 503, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":504
 *     # . parse_isominute
 *     assert parse_isominute(t, 3) == 4  # type: ignore
 *     assert parse_isominute(t, 4) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isominute(None, 4) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isominute(__pyx_v_t, 4, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 504, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 504, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 504, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":505
 *     assert parse_isominute(t, 3) == 4  # type: ignore
 *     assert parse_isominute(t, 4) == -1  # type: ignore
 *     assert parse_isominute(None, 4) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isosecond
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isominute(((PyObject*)Py_None), 4, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 505, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 505, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 505, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":508
 * 
 *     # . parse_isosecond
 *     assert parse_isosecond(t, 6) == 5  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isosecond(t, 7) == -1  # type: ignore
 *     assert parse_isosecond(None, 7) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isosecond(__pyx_v_t, 6, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 508, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 5);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 508, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 508, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":509
 *     # . parse_isosecond
 *     assert parse_isosecond(t, 6) == 5  # type: ignore
 *     assert parse_isosecond(t, 7) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isosecond(None, 7) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isosecond(__pyx_v_t, 7, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 509, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 509, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 509, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":510
 *     assert parse_isosecond(t, 6) == 5  # type: ignore
 *     assert parse_isosecond(t, 7) == -1  # type: ignore
 *     assert parse_isosecond(None, 7) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_isofraction
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isosecond(((PyObject*)Py_None), 7, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 510, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 510, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 510, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":513
 * 
 *     # . parse_isofraction
 *     assert parse_isofraction(".1", 1) == 100_000  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isofraction(".01", 1) == 10_000  # type: ignore
 *     assert parse_isofraction(".123456", 1) == 123456  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(__pyx_mstate_global->__pyx_kp_u_1_3, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 513, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x186A0);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 513, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 513, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":514
 *     # . parse_isofraction
 *     assert parse_isofraction(".1", 1) == 100_000  # type: ignore
 *     assert parse_isofraction(".01", 1) == 10_000  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isofraction(".123456", 1) == 123456  # type: ignore
 *     assert parse_isofraction(".1234567", 1) == 123456  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(__pyx_mstate_global->__pyx_kp_u_01, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 514, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x2710);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 514, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 514, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":515
 *     assert parse_isofraction(".1", 1) == 100_000  # type: ignore
 *     assert parse_isofraction(".01", 1) == 10_000  # type: ignore
 *     assert parse_isofraction(".123456", 1) == 123456  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isofraction(".1234567", 1) == 123456  # type: ignore
 *     assert parse_isofraction("", 1) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(__pyx_mstate_global->__pyx_kp_u_123456, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 515, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x1E240);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 515, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 515, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":516
 *     assert parse_isofraction(".01", 1) == 10_000  # type: ignore
 *     assert parse_isofraction(".123456", 1) == 123456  # type: ignore
 *     assert parse_isofraction(".1234567", 1) == 123456  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isofraction("", 1) == -1  # type: ignore
 *     assert parse_isofraction(None, 1) == -1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(__pyx_mstate_global->__pyx_kp_u_1234567, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 516, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == 0x1E240);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 516, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 516, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":517
 *     assert parse_isofraction(".123456", 1) == 123456  # type: ignore
 *     assert parse_isofraction(".1234567", 1) == 123456  # type: ignore
 *     assert parse_isofraction("", 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert parse_isofraction(None, 1) == -1  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(__pyx_mstate_global->__pyx_kp_u__5, 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 517, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 517, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 517, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":518
 *     assert parse_isofraction(".1234567", 1) == 123456  # type: ignore
 *     assert parse_isofraction("", 1) == -1  # type: ignore
 *     assert parse_isofraction(None, 1) == -1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # . parse_second_and_fraction
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __pyx_f_7cytimes_5utils_parse_isofraction(((PyObject*)Py_None), 1, NULL); if (unlikely(__pyx_t_8 == ((int)-2))) __PYX_ERR(0, 518, __pyx_L1_error)
    __pyx_t_4 = (__pyx_t_8 == -1L);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 518, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 518, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":521
 * 
 *     # . parse_second_and_fraction
 *     for t, ss, us in (             # <<<<<<<<<<<<<<
 *         ("1", 1, -1),
 *         ("1.", 1, -1),
*/
  __pyx_t_2 = __pyx_mstate_global->__pyx_tuple[15]; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= 14) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6));
    #else
    __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6);
    #endif
    ++__pyx_t_6;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(__pyx_t_7 != Py_None)) {
      PyObject* sequence = __pyx_t_7;
      Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 521, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2);
      __Pyx_INCREF(__pyx_t_12);
      #else
      __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      #endif
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 521, __pyx_L1_error)
    }
    if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_10))) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_t, ((PyObject*)__pyx_t_10));
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ss, __pyx_t_11);
    __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_us, __pyx_t_12);
    __pyx_t_12 = 0;

    /* "cytimes/utils.py":537
 *         (".1234567", 0, 123_456),
 *     ):
 *         out = parse_second_and_fraction(t, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert out.second == ss, f"{t}: {out.second} != {ss}"
 *         assert out.microsecond == us, f"{t}: {out.microsecond} != {us}"
*/
    __pyx_t_13 = __pyx_f_7cytimes_5utils_parse_second_and_fraction(__pyx_v_t, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L1_error)
    __pyx_v_out = __pyx_t_13;

    /* "cytimes/utils.py":538
 *     ):
 *         out = parse_second_and_fraction(t, 0)  # type: ignore
 *         assert out.second == ss, f"{t}: {out.second} != {ss}"             # <<<<<<<<<<<<<<
 *         assert out.microsecond == us, f"{t}: {out.microsecond} != {us}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_out.second); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_7, __pyx_v_ss, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) {
        __pyx_t_12 = __Pyx_PyUnicode_Unicode(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_7 = __Pyx_PyUnicode_From_int(__pyx_v_out.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_ss, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_14[0] = __pyx_t_12;
        __pyx_t_14[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_14[2] = __pyx_t_7;
        __pyx_t_14[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_14[4] = __pyx_t_11;
        __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_10, 0, 0);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __PYX_ERR(0, 538, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 538, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":539
 *         out = parse_second_and_fraction(t, 0)  # type: ignore
 *         assert out.second == ss, f"{t}: {out.second} != {ss}"
 *         assert out.microsecond == us, f"{t}: {out.microsecond} != {us}"             # <<<<<<<<<<<<<<
 * 
 *     out = parse_second_and_fraction("", 0)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_out.microsecond); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_v_us, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) {
        __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_t); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_out.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_us, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_14[0] = __pyx_t_11;
        __pyx_t_14[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_14[2] = __pyx_t_10;
        __pyx_t_14[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_14[4] = __pyx_t_7;
        __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_12, 0, 0);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __PYX_ERR(0, 539, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 539, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":521
 * 
 *     # . parse_second_and_fraction
 *     for t, ss, us in (             # <<<<<<<<<<<<<<
 *         ("1", 1, -1),
 *         ("1.", 1, -1),
*/
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":541
 *         assert out.microsecond == us, f"{t}: {out.microsecond} != {us}"
 * 
 *     out = parse_second_and_fraction("", 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert out.second == -1, f"{out.second} != -1"
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
*/
  __pyx_t_13 = __pyx_f_7cytimes_5utils_parse_second_and_fraction(__pyx_mstate_global->__pyx_kp_u__5, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L1_error)
  __pyx_v_out = __pyx_t_13;

  /* "cytimes/utils.py":542
 * 
 *     out = parse_second_and_fraction("", 0)  # type: ignore
 *     assert out.second == -1, f"{out.second} != -1"             # <<<<<<<<<<<<<<
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
 *     out = parse_second_and_fraction(None, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = (__pyx_v_out.second == -1L);
    if (unlikely(!__pyx_t_4)) {
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_out.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_1_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_12, 0, 0);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __PYX_ERR(0, 542, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 542, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":543
 *     out = parse_second_and_fraction("", 0)  # type: ignore
 *     assert out.second == -1, f"{out.second} != -1"
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"             # <<<<<<<<<<<<<<
 *     out = parse_second_and_fraction(None, 0)  # type: ignore
 *     assert out.second == -1, f"{out.second} != -1"
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = (__pyx_v_out.microsecond == -1L);
    if (unlikely(!__pyx_t_4)) {
      __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_out.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_1_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 543, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 543, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":544
 *     assert out.second == -1, f"{out.second} != -1"
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
 *     out = parse_second_and_fraction(None, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert out.second == -1, f"{out.second} != -1"
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
*/
  __pyx_t_13 = __pyx_f_7cytimes_5utils_parse_second_and_fraction(((PyObject*)Py_None), 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 544, __pyx_L1_error)
  __pyx_v_out = __pyx_t_13;

  /* "cytimes/utils.py":545
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
 *     out = parse_second_and_fraction(None, 0)  # type: ignore
 *     assert out.second == -1, f"{out.second} != -1"             # <<<<<<<<<<<<<<
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = (__pyx_v_out.second == -1L);
    if (unlikely(!__pyx_t_4)) {
      __pyx_t_2 = __Pyx_PyUnicode_From_int(__pyx_v_out.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_1_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_12, 0, 0);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __PYX_ERR(0, 545, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 545, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":546
 *     out = parse_second_and_fraction(None, 0)  # type: ignore
 *     assert out.second == -1, f"{out.second} != -1"
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: parser")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = (__pyx_v_out.microsecond == -1L);
    if (unlikely(!__pyx_t_4)) {
      __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_out.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_1_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 546, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 546, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":548
 *     assert out.microsecond == -1, f"{out.microsecond} != -1"
 * 
 *     print("Passed: parser")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_12 = NULL;
  __pyx_t_15 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Passed_parser};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":345
 * 
 * # Parser
 * def _test_parser() -> None:             # <<<<<<<<<<<<<<
 *     # boolean
 *     for i in range(128):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils._test_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_ss);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":552
 * 
 * # Time
 * def _test_localtime_n_gmtime() -> None:             # <<<<<<<<<<<<<<
 *     import time, numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_13_test_localtime_n_gmtime(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_13_test_localtime_n_gmtime = {"_test_localtime_n_gmtime", (PyCFunction)__pyx_pw_7cytimes_5utils_13_test_localtime_n_gmtime, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_13_test_localtime_n_gmtime(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_localtime_n_gmtime (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_12_test_localtime_n_gmtime(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_12_test_localtime_n_gmtime(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_time = NULL;
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_cmp = NULL;
  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;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  double __pyx_t_7;
  struct tm __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11[3];
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_localtime_n_gmtime", 0);

  /* "cytimes/utils.py":553
 * # Time
 * def _test_localtime_n_gmtime() -> None:
 *     import time, numpy as np             # <<<<<<<<<<<<<<
 * 
 *     for t in (-0.6, -0.5, -0.4, -0.1, 0, 0.1, 0.4, 0.5, 0.6, time.time()):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_time = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":555
 *     import time, numpy as np
 * 
 *     for t in (-0.6, -0.5, -0.4, -0.1, 0, 0.1, 0.4, 0.5, 0.6, time.time()):             # <<<<<<<<<<<<<<
 *         cmp = time.localtime(t)
 *         _tm = tm_localtime(t)  # type: ignore
*/
  __pyx_t_3 = __pyx_v_time;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_3 = PyTuple_New(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_neg_0_6);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_neg_0_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_float_neg_0_6) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_neg_0_5);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_neg_0_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_float_neg_0_5) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_neg_0_4);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_neg_0_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_float_neg_0_4) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_neg_0_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_neg_0_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_mstate_global->__pyx_float_neg_0_1) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_0_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_mstate_global->__pyx_float_0_1) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_4);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_0_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_mstate_global->__pyx_float_0_4) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_5);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_0_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_mstate_global->__pyx_float_0_5) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_float_0_6);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_float_0_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_mstate_global->__pyx_float_0_6) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_t_1) != (0)) __PYX_ERR(0, 555, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_5 >= 10) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5);
    #endif
    ++__pyx_t_5;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":556
 * 
 *     for t in (-0.6, -0.5, -0.4, -0.1, 0, 0.1, 0.4, 0.5, 0.6, time.time()):
 *         cmp = time.localtime(t)             # <<<<<<<<<<<<<<
 *         _tm = tm_localtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    __pyx_t_6 = __pyx_v_time;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_t};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_localtime, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":557
 *     for t in (-0.6, -0.5, -0.4, -0.1, 0, 0.1, 0.4, 0.5, 0.6, time.time()):
 *         cmp = time.localtime(t)
 *         _tm = tm_localtime(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_localtime(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
    __pyx_v__tm = __pyx_t_8;

    /* "cytimes/utils.py":558
 *         cmp = time.localtime(t)
 *         _tm = tm_localtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 558, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 558, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":559
 *         _tm = tm_localtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 559, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 559, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":560
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 560, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 560, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":561
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_mday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 561, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 561, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":562
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_mon); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 562, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 562, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 562, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":563
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 563, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 563, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":564
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_wday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 564, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 564, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":565
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_yday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 565, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 565, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 565, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":566
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 * 
 *         cmp = time.gmtime(t)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_isdst); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 566, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 566, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 566, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":568
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
 * 
 *         cmp = time.gmtime(t)             # <<<<<<<<<<<<<<
 *         _tm = tm_gmtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    __pyx_t_3 = __pyx_v_time;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_t};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_gmtime, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_DECREF_SET(__pyx_v_cmp, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":569
 * 
 *         cmp = time.gmtime(t)
 *         _tm = tm_gmtime(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L1_error)
    __pyx_t_8 = __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L1_error)
    __pyx_v__tm = __pyx_t_8;

    /* "cytimes/utils.py":570
 *         cmp = time.gmtime(t)
 *         _tm = tm_gmtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 570, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 570, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":571
 *         _tm = tm_gmtime(t)  # type: ignore
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_min); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 571, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 571, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 571, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":572
 *         assert _tm.tm_sec == cmp.tm_sec, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_hour); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 572, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 572, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":573
 *         assert _tm.tm_min == cmp.tm_min, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_mday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 573, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 573, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":574
 *         assert _tm.tm_hour == cmp.tm_hour, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_mon); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 574, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 574, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":575
 *         assert _tm.tm_mday == cmp.tm_mday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_year); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 575, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 575, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 575, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":576
 *         assert _tm.tm_mon == cmp.tm_mon, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_wday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 576, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 576, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":577
 *         assert _tm.tm_year == cmp.tm_year, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_yday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_3;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 577, __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 577, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 577, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":578
 *         assert _tm.tm_wday == cmp.tm_wday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_yday == cmp.tm_yday, f"{_tm.tm_sec} != {cmp.tm_sec}"
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"             # <<<<<<<<<<<<<<
 * 
 *     for t in (np.inf, -np.inf):
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_isdst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_tm_sec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11[0] = __pyx_t_9;
        __pyx_t_11[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_11[2] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 578, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 578, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":555
 *     import time, numpy as np
 * 
 *     for t in (-0.6, -0.5, -0.4, -0.1, 0, 0.1, 0.4, 0.5, 0.6, time.time()):             # <<<<<<<<<<<<<<
 *         cmp = time.localtime(t)
 *         _tm = tm_localtime(t)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":580
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
 * 
 *     for t in (np.inf, -np.inf):             # <<<<<<<<<<<<<<
 *         try:
 *             tm_localtime(t)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_inf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_inf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 580, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 580, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_5 >= 2) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_5);
    #endif
    ++__pyx_t_5;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":581
 * 
 *     for t in (np.inf, -np.inf):
 *         try:             # <<<<<<<<<<<<<<
 *             tm_localtime(t)  # type: ignore
 *         except RuntimeError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      /*try:*/ {

        /* "cytimes/utils.py":582
 *     for t in (np.inf, -np.inf):
 *         try:
 *             tm_localtime(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         except RuntimeError:
 *             pass
*/
        __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 582, __pyx_L8_error)
        __pyx_f_7cytimes_5utils_tm_localtime(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 582, __pyx_L8_error)

        /* "cytimes/utils.py":581
 * 
 *     for t in (np.inf, -np.inf):
 *         try:             # <<<<<<<<<<<<<<
 *             tm_localtime(t)  # type: ignore
 *         except RuntimeError:
*/
      }

      /* "cytimes/utils.py":586
 *             pass
 *         else:
 *             raise AssertionError("Should raise RuntimeError")             # <<<<<<<<<<<<<<
 *         try:
 *             tm_gmtime(t)  # type: ignore
*/
      /*else:*/ {
        __pyx_t_1 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Should_raise_RuntimeError};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 586, __pyx_L10_except_error)
      }
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cytimes/utils.py":583
 *         try:
 *             tm_localtime(t)  # type: ignore
 *         except RuntimeError:             # <<<<<<<<<<<<<<
 *             pass
 *         else:
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_RuntimeError))));
      if (__pyx_t_14) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L9_exception_handled;
      }
      goto __pyx_L10_except_error;

      /* "cytimes/utils.py":581
 * 
 *     for t in (np.inf, -np.inf):
 *         try:             # <<<<<<<<<<<<<<
 *             tm_localtime(t)  # type: ignore
 *         except RuntimeError:
*/
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_12, __pyx_t_13);
      goto __pyx_L1_error;
      __pyx_L9_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_12, __pyx_t_13);
    }

    /* "cytimes/utils.py":587
 *         else:
 *             raise AssertionError("Should raise RuntimeError")
 *         try:             # <<<<<<<<<<<<<<
 *             tm_gmtime(t)  # type: ignore
 *         except RuntimeError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_2);
      /*try:*/ {

        /* "cytimes/utils.py":588
 *             raise AssertionError("Should raise RuntimeError")
 *         try:
 *             tm_gmtime(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         except RuntimeError:
 *             pass
*/
        __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L18_error)
        __pyx_f_7cytimes_5utils_tm_gmtime(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L18_error)

        /* "cytimes/utils.py":587
 *         else:
 *             raise AssertionError("Should raise RuntimeError")
 *         try:             # <<<<<<<<<<<<<<
 *             tm_gmtime(t)  # type: ignore
 *         except RuntimeError:
*/
      }

      /* "cytimes/utils.py":592
 *             pass
 *         else:
 *             raise AssertionError("Should raise RuntimeError")             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: localtime & gmtime")
*/
      /*else:*/ {
        __pyx_t_1 = NULL;
        __pyx_t_4 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Should_raise_RuntimeError};
          __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L20_except_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 592, __pyx_L20_except_error)
      }
      __pyx_L18_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cytimes/utils.py":589
 *         try:
 *             tm_gmtime(t)  # type: ignore
 *         except RuntimeError:             # <<<<<<<<<<<<<<
 *             pass
 *         else:
*/
      __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_RuntimeError))));
      if (__pyx_t_14) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L19_exception_handled;
      }
      goto __pyx_L20_except_error;

      /* "cytimes/utils.py":587
 *         else:
 *             raise AssertionError("Should raise RuntimeError")
 *         try:             # <<<<<<<<<<<<<<
 *             tm_gmtime(t)  # type: ignore
 *         except RuntimeError:
*/
      __pyx_L20_except_error:;
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_2);
      goto __pyx_L1_error;
      __pyx_L19_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_2);
    }

    /* "cytimes/utils.py":580
 *         assert _tm.tm_isdst == cmp.tm_isdst, f"{_tm.tm_sec} != {cmp.tm_sec}"
 * 
 *     for t in (np.inf, -np.inf):             # <<<<<<<<<<<<<<
 *         try:
 *             tm_localtime(t)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/utils.py":594
 *             raise AssertionError("Should raise RuntimeError")
 * 
 *     print("Passed: localtime & gmtime")             # <<<<<<<<<<<<<<
 * 
 *     del time
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_localtime_gmtime};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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_6)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/utils.py":596
 *     print("Passed: localtime & gmtime")
 * 
 *     del time             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_time); __pyx_v_time = 0;

  /* "cytimes/utils.py":552
 * 
 * # Time
 * def _test_localtime_n_gmtime() -> None:             # <<<<<<<<<<<<<<
 *     import time, numpy as np
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._test_localtime_n_gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":600
 * 
 * # Calendar
 * def _test_is_leap_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _is_leap  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_15_test_is_leap_year(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_15_test_is_leap_year = {"_test_is_leap_year", (PyCFunction)__pyx_pw_7cytimes_5utils_15_test_is_leap_year, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_15_test_is_leap_year(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_is_leap_year (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_14_test_is_leap_year(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_14_test_is_leap_year(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__is_leap = NULL;
  long __pyx_v_i;
  int __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_is_leap_year", 0);

  /* "cytimes/utils.py":601
 * # Calendar
 * def _test_is_leap_year() -> None:
 *     from _pydatetime import _is_leap  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for i in range(-10000, 10001):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_leap};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_leap};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__is_leap = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":603
 *     from _pydatetime import _is_leap  # type: ignore
 * 
 *     for i in range(-10000, 10001):             # <<<<<<<<<<<<<<
 *         val = is_leap_year(i)  # type: ignore
 *         cmp = _is_leap(i)
*/
  for (__pyx_t_5 = -10000L; __pyx_t_5 < 0x2711; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cytimes/utils.py":604
 * 
 *     for i in range(-10000, 10001):
 *         val = is_leap_year(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         cmp = _is_leap(i)
 *         assert val == cmp, f"{i}: {val} != {cmp}"
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_is_leap_year(__pyx_v_i);

    /* "cytimes/utils.py":605
 *     for i in range(-10000, 10001):
 *         val = is_leap_year(i)  # type: ignore
 *         cmp = _is_leap(i)             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v__is_leap);
    __pyx_t_6 = __pyx_v__is_leap; 
    __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":606
 *         val = is_leap_year(i)  # type: ignore
 *         cmp = _is_leap(i)
 *         assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 * 
 *     assert is_leap_year(0)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_9)) {
        __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyUnicode_FromBInt_bint(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10[0] = __pyx_t_6;
        __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_10[2] = __pyx_t_1;
        __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_10[4] = __pyx_t_7;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 606, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 606, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":608
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 * 
 *     assert is_leap_year(0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_leap_year(-4)  # type: ignore
 *     assert not is_leap_year(-100)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_leap_year(0);
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 608, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 608, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":609
 * 
 *     assert is_leap_year(0)  # type: ignore
 *     assert is_leap_year(-4)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_leap_year(-100)  # type: ignore
 *     assert is_leap_year(-400)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_leap_year(-4LL);
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 609, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 609, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":610
 *     assert is_leap_year(0)  # type: ignore
 *     assert is_leap_year(-4)  # type: ignore
 *     assert not is_leap_year(-100)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_leap_year(-400)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = (!__pyx_f_7cytimes_5utils_is_leap_year(-100LL));
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 610, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 610, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":611
 *     assert is_leap_year(-4)  # type: ignore
 *     assert not is_leap_year(-100)  # type: ignore
 *     assert is_leap_year(-400)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     del _is_leap
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_f_7cytimes_5utils_is_leap_year(-400LL);
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 611, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 611, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":613
 *     assert is_leap_year(-400)  # type: ignore
 * 
 *     del _is_leap             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__is_leap); __pyx_v__is_leap = 0;

  /* "cytimes/utils.py":600
 * 
 * # Calendar
 * def _test_is_leap_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _is_leap  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_is_leap_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__is_leap);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":616
 * 
 * 
 * def _test_days_bf_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_year  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_17_test_days_bf_year(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_17_test_days_bf_year = {"_test_days_bf_year", (PyCFunction)__pyx_pw_7cytimes_5utils_17_test_days_bf_year, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_17_test_days_bf_year(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_days_bf_year (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_16_test_days_bf_year(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_16_test_days_bf_year(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__days_before_year = NULL;
  long __pyx_v_i;
  PY_LONG_LONG __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_days_bf_year", 0);

  /* "cytimes/utils.py":617
 * 
 * def _test_days_bf_year() -> None:
 *     from _pydatetime import _days_before_year  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for i in range(-10000, 10001):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_before_year};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_before_year};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__days_before_year = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":619
 *     from _pydatetime import _days_before_year  # type: ignore
 * 
 *     for i in range(-10000, 10001):             # <<<<<<<<<<<<<<
 *         val = days_bf_year(i)  # type: ignore
 *         cmp = _days_before_year(i)
*/
  for (__pyx_t_5 = -10000L; __pyx_t_5 < 0x2711; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cytimes/utils.py":620
 * 
 *     for i in range(-10000, 10001):
 *         val = days_bf_year(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         cmp = _days_before_year(i)
 *         assert val == cmp, f"{i}: {val} != {cmp}"
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_days_bf_year(__pyx_v_i);

    /* "cytimes/utils.py":621
 *     for i in range(-10000, 10001):
 *         val = days_bf_year(i)  # type: ignore
 *         cmp = _days_before_year(i)             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v__days_before_year);
    __pyx_t_6 = __pyx_v__days_before_year; 
    __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":622
 *         val = days_bf_year(i)  # type: ignore
 *         cmp = _days_before_year(i)
 *         assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: days_bf_year")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_1 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_9)) {
        __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10[0] = __pyx_t_6;
        __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_10[2] = __pyx_t_1;
        __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_10[4] = __pyx_t_7;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 622, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 622, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":624
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 * 
 *     print("Passed: days_bf_year")             # <<<<<<<<<<<<<<
 * 
 *     del _days_before_year
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Passed_days_bf_year};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":626
 *     print("Passed: days_bf_year")
 * 
 *     del _days_before_year             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__days_before_year); __pyx_v__days_before_year = 0;

  /* "cytimes/utils.py":616
 * 
 * 
 * def _test_days_bf_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_year  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_days_bf_year", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__days_before_year);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":629
 * 
 * 
 * def _test_doy() -> None:             # <<<<<<<<<<<<<<
 * 
 *     for y in range(-10000, 10001):
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_19_test_doy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_19_test_doy = {"_test_doy", (PyCFunction)__pyx_pw_7cytimes_5utils_19_test_doy, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_19_test_doy(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_doy (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_18_test_doy(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_18_test_doy(CYTHON_UNUSED PyObject *__pyx_self) {
  long __pyx_v_y;
  long __pyx_v_m;
  long __pyx_v_d;
  int __pyx_v_doy;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  long __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  long __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[9];
  PyObject *__pyx_t_13 = NULL;
  size_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_doy", 0);

  /* "cytimes/utils.py":631
 * def _test_doy() -> None:
 * 
 *     for y in range(-10000, 10001):             # <<<<<<<<<<<<<<
 *         for m in range(1, 13):
 *             for d in range(1, 32):
*/
  for (__pyx_t_1 = -10000L; __pyx_t_1 < 0x2711; __pyx_t_1+=1) {
    __pyx_v_y = __pyx_t_1;

    /* "cytimes/utils.py":632
 * 
 *     for y in range(-10000, 10001):
 *         for m in range(1, 13):             # <<<<<<<<<<<<<<
 *             for d in range(1, 32):
 *                 if d > 28:
*/
    for (__pyx_t_2 = 1; __pyx_t_2 < 13; __pyx_t_2+=1) {
      __pyx_v_m = __pyx_t_2;

      /* "cytimes/utils.py":633
 *     for y in range(-10000, 10001):
 *         for m in range(1, 13):
 *             for d in range(1, 32):             # <<<<<<<<<<<<<<
 *                 if d > 28:
 *                     d = min(d, days_in_month(y, m))  # type: ignore
*/
      for (__pyx_t_3 = 1; __pyx_t_3 < 32; __pyx_t_3+=1) {
        __pyx_v_d = __pyx_t_3;

        /* "cytimes/utils.py":634
 *         for m in range(1, 13):
 *             for d in range(1, 32):
 *                 if d > 28:             # <<<<<<<<<<<<<<
 *                     d = min(d, days_in_month(y, m))  # type: ignore
 *                 doy = day_of_year(y, m, d)  # type: ignore
*/
        __pyx_t_4 = (__pyx_v_d > 28);
        if (__pyx_t_4) {

          /* "cytimes/utils.py":635
 *             for d in range(1, 32):
 *                 if d > 28:
 *                     d = min(d, days_in_month(y, m))  # type: ignore             # <<<<<<<<<<<<<<
 *                 doy = day_of_year(y, m, d)  # type: ignore
 *                 _ymd = ymd_fr_doy(y, doy)  # type: ignore
*/
          __pyx_t_5 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_y, __pyx_v_m);
          __pyx_t_6 = __pyx_v_d;
          __pyx_t_4 = (__pyx_t_5 < __pyx_t_6);
          if (__pyx_t_4) {
            __pyx_t_7 = __pyx_t_5;
          } else {
            __pyx_t_7 = __pyx_t_6;
          }
          __pyx_v_d = __pyx_t_7;

          /* "cytimes/utils.py":634
 *         for m in range(1, 13):
 *             for d in range(1, 32):
 *                 if d > 28:             # <<<<<<<<<<<<<<
 *                     d = min(d, days_in_month(y, m))  # type: ignore
 *                 doy = day_of_year(y, m, d)  # type: ignore
*/
        }

        /* "cytimes/utils.py":636
 *                 if d > 28:
 *                     d = min(d, days_in_month(y, m))  # type: ignore
 *                 doy = day_of_year(y, m, d)  # type: ignore             # <<<<<<<<<<<<<<
 *                 _ymd = ymd_fr_doy(y, doy)  # type: ignore
 *                 assert _ymd.year == y, f"{y}-{m}-{d}: {y} != {_ymd.year}"
*/
        __pyx_v_doy = __pyx_f_7cytimes_5utils_day_of_year(__pyx_v_y, __pyx_v_m, __pyx_v_d);

        /* "cytimes/utils.py":637
 *                     d = min(d, days_in_month(y, m))  # type: ignore
 *                 doy = day_of_year(y, m, d)  # type: ignore
 *                 _ymd = ymd_fr_doy(y, doy)  # type: ignore             # <<<<<<<<<<<<<<
 *                 assert _ymd.year == y, f"{y}-{m}-{d}: {y} != {_ymd.year}"
 *                 assert _ymd.month == m, f"{y}-{m}-{d}: {m} != {_ymd.month}"
*/
        __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_doy(__pyx_v_y, __pyx_v_doy);

        /* "cytimes/utils.py":638
 *                 doy = day_of_year(y, m, d)  # type: ignore
 *                 _ymd = ymd_fr_doy(y, doy)  # type: ignore
 *                 assert _ymd.year == y, f"{y}-{m}-{d}: {y} != {_ymd.year}"             # <<<<<<<<<<<<<<
 *                 assert _ymd.month == m, f"{y}-{m}-{d}: {m} != {_ymd.month}"
 *                 assert _ymd.day == d, f"{y}-{m}-{d}: {d} != {_ymd.day}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_4 = (__pyx_v__ymd.year == __pyx_v_y);
          if (unlikely(!__pyx_t_4)) {
            __pyx_t_8 = __Pyx_PyUnicode_From_long(__pyx_v_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 638, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = __Pyx_PyUnicode_From_long(__pyx_v_m, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 638, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_v_d, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 638, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 638, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12[0] = __pyx_t_8;
            __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[2] = __pyx_t_9;
            __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[4] = __pyx_t_10;
            __pyx_t_12[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_12[6] = __pyx_t_8;
            __pyx_t_12[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_12[8] = __pyx_t_11;
            __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) * 2 + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 2 + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127);
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 638, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_13, 0, 0);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __PYX_ERR(0, 638, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 638, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":639
 *                 _ymd = ymd_fr_doy(y, doy)  # type: ignore
 *                 assert _ymd.year == y, f"{y}-{m}-{d}: {y} != {_ymd.year}"
 *                 assert _ymd.month == m, f"{y}-{m}-{d}: {m} != {_ymd.month}"             # <<<<<<<<<<<<<<
 *                 assert _ymd.day == d, f"{y}-{m}-{d}: {d} != {_ymd.day}"
 * 
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_4 = (__pyx_v__ymd.month == __pyx_v_m);
          if (unlikely(!__pyx_t_4)) {
            __pyx_t_13 = __Pyx_PyUnicode_From_long(__pyx_v_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_11 = __Pyx_PyUnicode_From_long(__pyx_v_m, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_v_d, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_12[0] = __pyx_t_13;
            __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[2] = __pyx_t_11;
            __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[4] = __pyx_t_10;
            __pyx_t_12[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_12[6] = __pyx_t_11;
            __pyx_t_12[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_12[8] = __pyx_t_9;
            __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_12, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 2 + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127);
            if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 639, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __PYX_ERR(0, 639, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 639, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":640
 *                 assert _ymd.year == y, f"{y}-{m}-{d}: {y} != {_ymd.year}"
 *                 assert _ymd.month == m, f"{y}-{m}-{d}: {m} != {_ymd.month}"
 *                 assert _ymd.day == d, f"{y}-{m}-{d}: {d} != {_ymd.day}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ymd_fr_doy")
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_4 = (__pyx_v__ymd.day == __pyx_v_d);
          if (unlikely(!__pyx_t_4)) {
            __pyx_t_8 = __Pyx_PyUnicode_From_long(__pyx_v_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 640, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = __Pyx_PyUnicode_From_long(__pyx_v_m, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 640, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = __Pyx_PyUnicode_From_long(__pyx_v_d, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 640, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 640, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12[0] = __pyx_t_8;
            __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[2] = __pyx_t_9;
            __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_12[4] = __pyx_t_10;
            __pyx_t_12[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_12[6] = __pyx_t_10;
            __pyx_t_12[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_12[8] = __pyx_t_11;
            __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) * 2 + 2 + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127);
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 640, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_13, 0, 0);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __PYX_ERR(0, 640, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 640, __pyx_L1_error)
        #endif
      }
    }
  }

  /* "cytimes/utils.py":642
 *                 assert _ymd.day == d, f"{y}-{m}-{d}: {d} != {_ymd.day}"
 * 
 *     print("Passed: ymd_fr_doy")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_11 = NULL;
  __pyx_t_14 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Passed_ymd_fr_doy};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "cytimes/utils.py":629
 * 
 * 
 * def _test_doy() -> None:             # <<<<<<<<<<<<<<
 * 
 *     for y in range(-10000, 10001):
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __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_AddTraceback("cytimes.utils._test_doy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":645
 * 
 * 
 * def _test_quarter_of_month() -> None:             # <<<<<<<<<<<<<<
 *     count: cython.int = 0
 *     value: cython.int = 1
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_21_test_quarter_of_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_21_test_quarter_of_month = {"_test_quarter_of_month", (PyCFunction)__pyx_pw_7cytimes_5utils_21_test_quarter_of_month, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_21_test_quarter_of_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_quarter_of_month (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_20_test_quarter_of_month(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_20_test_quarter_of_month(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_count;
  int __pyx_v_value;
  long __pyx_v_i;
  int __pyx_v_val;
  int __pyx_v_cmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __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[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("_test_quarter_of_month", 0);

  /* "cytimes/utils.py":646
 * 
 * def _test_quarter_of_month() -> None:
 *     count: cython.int = 0             # <<<<<<<<<<<<<<
 *     value: cython.int = 1
 *     for i in range(1, 13):
*/
  __pyx_v_count = 0;

  /* "cytimes/utils.py":647
 * def _test_quarter_of_month() -> None:
 *     count: cython.int = 0
 *     value: cython.int = 1             # <<<<<<<<<<<<<<
 *     for i in range(1, 13):
 *         val = quarter_of_month(i)  # type: ignore
*/
  __pyx_v_value = 1;

  /* "cytimes/utils.py":648
 *     count: cython.int = 0
 *     value: cython.int = 1
 *     for i in range(1, 13):             # <<<<<<<<<<<<<<
 *         val = quarter_of_month(i)  # type: ignore
 *         cmp = value
*/
  for (__pyx_t_1 = 1; __pyx_t_1 < 13; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cytimes/utils.py":649
 *     value: cython.int = 1
 *     for i in range(1, 13):
 *         val = quarter_of_month(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         cmp = value
 *         assert val == cmp, f"{i}: {val} != {cmp}"
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_i);

    /* "cytimes/utils.py":650
 *     for i in range(1, 13):
 *         val = quarter_of_month(i)  # type: ignore
 *         cmp = value             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *         count += 1
*/
    __pyx_v_cmp = __pyx_v_value;

    /* "cytimes/utils.py":651
 *         val = quarter_of_month(i)  # type: ignore
 *         cmp = value
 *         assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *         count += 1
 *         if count == 3:
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = (__pyx_v_val == __pyx_v_cmp);
      if (unlikely(!__pyx_t_2)) {
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_cmp, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6[0] = __pyx_t_3;
        __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_6[2] = __pyx_t_4;
        __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_6[4] = __pyx_t_5;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 651, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 651, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":652
 *         cmp = value
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *         count += 1             # <<<<<<<<<<<<<<
 *         if count == 3:
 *             count = 0
*/
    __pyx_v_count = (__pyx_v_count + 1);

    /* "cytimes/utils.py":653
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *         count += 1
 *         if count == 3:             # <<<<<<<<<<<<<<
 *             count = 0
 *             value += 1
*/
    __pyx_t_2 = (__pyx_v_count == 3);
    if (__pyx_t_2) {

      /* "cytimes/utils.py":654
 *         count += 1
 *         if count == 3:
 *             count = 0             # <<<<<<<<<<<<<<
 *             value += 1
 *     print("Passed: quarter_of_month")
*/
      __pyx_v_count = 0;

      /* "cytimes/utils.py":655
 *         if count == 3:
 *             count = 0
 *             value += 1             # <<<<<<<<<<<<<<
 *     print("Passed: quarter_of_month")
 * 
*/
      __pyx_v_value = (__pyx_v_value + 1);

      /* "cytimes/utils.py":653
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *         count += 1
 *         if count == 3:             # <<<<<<<<<<<<<<
 *             count = 0
 *             value += 1
*/
    }
  }

  /* "cytimes/utils.py":656
 *             count = 0
 *             value += 1
 *     print("Passed: quarter_of_month")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_quarter_of_month};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cytimes/utils.py":645
 * 
 * 
 * def _test_quarter_of_month() -> None:             # <<<<<<<<<<<<<<
 *     count: cython.int = 0
 *     value: cython.int = 1
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_quarter_of_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":659
 * 
 * 
 * def _test_days_in_quarter() -> None:             # <<<<<<<<<<<<<<
 *     # non-leap
 *     year: cython.int = 2021
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_23_test_days_in_quarter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_23_test_days_in_quarter = {"_test_days_in_quarter", (PyCFunction)__pyx_pw_7cytimes_5utils_23_test_days_in_quarter, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_23_test_days_in_quarter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_days_in_quarter (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_22_test_days_in_quarter(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_22_test_days_in_quarter(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_year;
  long __pyx_v_i;
  int __pyx_v_qtr;
  int __pyx_v_val;
  long __pyx_v_cmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __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[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("_test_days_in_quarter", 0);

  /* "cytimes/utils.py":661
 * def _test_days_in_quarter() -> None:
 *     # non-leap
 *     year: cython.int = 2021             # <<<<<<<<<<<<<<
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
*/
  __pyx_v_year = 0x7E5;

  /* "cytimes/utils.py":662
 *     # non-leap
 *     year: cython.int = 2021
 *     for i in range(1, 13):             # <<<<<<<<<<<<<<
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore
*/
  for (__pyx_t_1 = 1; __pyx_t_1 < 13; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cytimes/utils.py":663
 *     year: cython.int = 2021
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         val = days_in_quarter(year, i)  # type: ignore
 *         cmp = DAYS_IN_QUARTER[qtr]
*/
    __pyx_v_qtr = __pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_i);

    /* "cytimes/utils.py":664
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore             # <<<<<<<<<<<<<<
 *         cmp = DAYS_IN_QUARTER[qtr]
 *         assert val == cmp, f"{i}: {val} != {cmp}"
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_days_in_quarter(__pyx_v_year, __pyx_v_i);

    /* "cytimes/utils.py":665
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore
 *         cmp = DAYS_IN_QUARTER[qtr]             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *     # leap
*/
    __pyx_v_cmp = (__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[__pyx_v_qtr]);

    /* "cytimes/utils.py":666
 *         val = days_in_quarter(year, i)  # type: ignore
 *         cmp = DAYS_IN_QUARTER[qtr]
 *         assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *     # leap
 *     year = 2024
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = (__pyx_v_val == __pyx_v_cmp);
      if (unlikely(!__pyx_t_2)) {
        __pyx_t_3 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_From_long(__pyx_v_cmp, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6[0] = __pyx_t_3;
        __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_6[2] = __pyx_t_4;
        __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_6[4] = __pyx_t_5;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __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_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 666, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 666, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":668
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *     # leap
 *     year = 2024             # <<<<<<<<<<<<<<
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
*/
  __pyx_v_year = 0x7E8;

  /* "cytimes/utils.py":669
 *     # leap
 *     year = 2024
 *     for i in range(1, 13):             # <<<<<<<<<<<<<<
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore
*/
  for (__pyx_t_1 = 1; __pyx_t_1 < 13; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cytimes/utils.py":670
 *     year = 2024
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         val = days_in_quarter(year, i)  # type: ignore
 *         if qtr == 1:
*/
    __pyx_v_qtr = __pyx_f_7cytimes_5utils_quarter_of_month(__pyx_v_i);

    /* "cytimes/utils.py":671
 *     for i in range(1, 13):
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore             # <<<<<<<<<<<<<<
 *         if qtr == 1:
 *             cmp = DAYS_IN_QUARTER[qtr] + 1
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_days_in_quarter(__pyx_v_year, __pyx_v_i);

    /* "cytimes/utils.py":672
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore
 *         if qtr == 1:             # <<<<<<<<<<<<<<
 *             cmp = DAYS_IN_QUARTER[qtr] + 1
 *         else:
*/
    __pyx_t_2 = (__pyx_v_qtr == 1);
    if (__pyx_t_2) {

      /* "cytimes/utils.py":673
 *         val = days_in_quarter(year, i)  # type: ignore
 *         if qtr == 1:
 *             cmp = DAYS_IN_QUARTER[qtr] + 1             # <<<<<<<<<<<<<<
 *         else:
 *             cmp = DAYS_IN_QUARTER[qtr]
*/
      __pyx_v_cmp = ((__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[__pyx_v_qtr]) + 1);

      /* "cytimes/utils.py":672
 *         qtr: cython.int = quarter_of_month(i)  # type: ignore
 *         val = days_in_quarter(year, i)  # type: ignore
 *         if qtr == 1:             # <<<<<<<<<<<<<<
 *             cmp = DAYS_IN_QUARTER[qtr] + 1
 *         else:
*/
      goto __pyx_L7;
    }

    /* "cytimes/utils.py":675
 *             cmp = DAYS_IN_QUARTER[qtr] + 1
 *         else:
 *             cmp = DAYS_IN_QUARTER[qtr]             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *     print("Passed: days_in_quarter")
*/
    /*else*/ {
      __pyx_v_cmp = (__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[__pyx_v_qtr]);
    }
    __pyx_L7:;

    /* "cytimes/utils.py":676
 *         else:
 *             cmp = DAYS_IN_QUARTER[qtr]
 *         assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *     print("Passed: days_in_quarter")
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = (__pyx_v_val == __pyx_v_cmp);
      if (unlikely(!__pyx_t_2)) {
        __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyUnicode_From_long(__pyx_v_cmp, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6[0] = __pyx_t_7;
        __pyx_t_6[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_6[2] = __pyx_t_5;
        __pyx_t_6[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_6[4] = __pyx_t_4;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127);
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 676, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 676, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":677
 *             cmp = DAYS_IN_QUARTER[qtr]
 *         assert val == cmp, f"{i}: {val} != {cmp}"
 *     print("Passed: days_in_quarter")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_4 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_days_in_quarter};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":659
 * 
 * 
 * def _test_days_in_quarter() -> None:             # <<<<<<<<<<<<<<
 *     # non-leap
 *     year: cython.int = 2021
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_days_in_quarter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":680
 * 
 * 
 * def _test_days_in_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_in_month  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_25_test_days_in_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_25_test_days_in_month = {"_test_days_in_month", (PyCFunction)__pyx_pw_7cytimes_5utils_25_test_days_in_month, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_25_test_days_in_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_days_in_month (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_24_test_days_in_month(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_24_test_days_in_month(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__days_in_month = NULL;
  long __pyx_v_year;
  long __pyx_v_i;
  int __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  long __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12[7];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_days_in_month", 0);

  /* "cytimes/utils.py":681
 * 
 * def _test_days_in_month() -> None:
 *     from _pydatetime import _days_in_month  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for year in range(-1000, 1001):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_in_month};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_in_month};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__days_in_month = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":683
 *     from _pydatetime import _days_in_month  # type: ignore
 * 
 *     for year in range(-1000, 1001):             # <<<<<<<<<<<<<<
 *         for i in range(1, 13):
 *             val = days_in_month(year, i)  # type: ignore
*/
  for (__pyx_t_5 = -1000L; __pyx_t_5 < 0x3E9; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":684
 * 
 *     for year in range(-1000, 1001):
 *         for i in range(1, 13):             # <<<<<<<<<<<<<<
 *             val = days_in_month(year, i)  # type: ignore
 *             cmp = _days_in_month(year, i)
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 13; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "cytimes/utils.py":685
 *     for year in range(-1000, 1001):
 *         for i in range(1, 13):
 *             val = days_in_month(year, i)  # type: ignore             # <<<<<<<<<<<<<<
 *             cmp = _days_in_month(year, i)
 *             assert val == cmp, f"{year}-{i}: {val} != {cmp}"
*/
      __pyx_v_val = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_i);

      /* "cytimes/utils.py":686
 *         for i in range(1, 13):
 *             val = days_in_month(year, i)  # type: ignore
 *             cmp = _days_in_month(year, i)             # <<<<<<<<<<<<<<
 *             assert val == cmp, f"{year}-{i}: {val} != {cmp}"
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v__days_in_month);
      __pyx_t_7 = __pyx_v__days_in_month; 
      __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_v_year); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_10 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytimes/utils.py":687
 *             val = days_in_month(year, i)  # type: ignore
 *             cmp = _days_in_month(year, i)
 *             assert val == cmp, f"{year}-{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: days_in_month")
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_11)) {
          __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_1 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_12[0] = __pyx_t_7;
          __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__4;
          __pyx_t_12[2] = __pyx_t_1;
          __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u__13;
          __pyx_t_12[4] = __pyx_t_9;
          __pyx_t_12[5] = __pyx_mstate_global->__pyx_kp_u__14;
          __pyx_t_12[6] = __pyx_t_8;
          __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 687, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 687, __pyx_L1_error)
      #endif
    }
  }

  /* "cytimes/utils.py":689
 *             assert val == cmp, f"{year}-{i}: {val} != {cmp}"
 * 
 *     print("Passed: days_in_month")             # <<<<<<<<<<<<<<
 * 
 *     del _days_in_month
*/
  __pyx_t_8 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Passed_days_in_month};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":691
 *     print("Passed: days_in_month")
 * 
 *     del _days_in_month             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__days_in_month); __pyx_v__days_in_month = 0;

  /* "cytimes/utils.py":680
 * 
 * 
 * def _test_days_in_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_in_month  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._test_days_in_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__days_in_month);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":694
 * 
 * 
 * def _test_days_bf_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_month  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_27_test_days_bf_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_27_test_days_bf_month = {"_test_days_bf_month", (PyCFunction)__pyx_pw_7cytimes_5utils_27_test_days_bf_month, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_27_test_days_bf_month(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_days_bf_month (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_26_test_days_bf_month(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_26_test_days_bf_month(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__days_before_month = NULL;
  long __pyx_v_year;
  long __pyx_v_i;
  int __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  long __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_days_bf_month", 0);

  /* "cytimes/utils.py":695
 * 
 * def _test_days_bf_month() -> None:
 *     from _pydatetime import _days_before_month  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for year in range(-1000, 1001):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_before_month};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_days_before_month};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__days_before_month = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":697
 *     from _pydatetime import _days_before_month  # type: ignore
 * 
 *     for year in range(-1000, 1001):             # <<<<<<<<<<<<<<
 *         for i in range(1, 13):
 *             val = days_bf_month(year, i)  # type: ignore
*/
  for (__pyx_t_5 = -1000L; __pyx_t_5 < 0x3E9; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":698
 * 
 *     for year in range(-1000, 1001):
 *         for i in range(1, 13):             # <<<<<<<<<<<<<<
 *             val = days_bf_month(year, i)  # type: ignore
 *             cmp = _days_before_month(year, i)
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 13; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "cytimes/utils.py":699
 *     for year in range(-1000, 1001):
 *         for i in range(1, 13):
 *             val = days_bf_month(year, i)  # type: ignore             # <<<<<<<<<<<<<<
 *             cmp = _days_before_month(year, i)
 *             assert val == cmp, f"{i}: {val} != {cmp}"
*/
      __pyx_v_val = __pyx_f_7cytimes_5utils_days_bf_month(__pyx_v_year, __pyx_v_i);

      /* "cytimes/utils.py":700
 *         for i in range(1, 13):
 *             val = days_bf_month(year, i)  # type: ignore
 *             cmp = _days_before_month(year, i)             # <<<<<<<<<<<<<<
 *             assert val == cmp, f"{i}: {val} != {cmp}"
 * 
*/
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v__days_before_month);
      __pyx_t_7 = __pyx_v__days_before_month; 
      __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_v_year); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_10 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cytimes/utils.py":701
 *             val = days_bf_month(year, i)  # type: ignore
 *             cmp = _days_before_month(year, i)
 *             assert val == cmp, f"{i}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: days_bf_month")
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 701, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_11)) {
          __pyx_t_7 = __Pyx_PyUnicode_From_long(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 701, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_12[0] = __pyx_t_7;
          __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__13;
          __pyx_t_12[2] = __pyx_t_1;
          __pyx_t_12[3] = __pyx_mstate_global->__pyx_kp_u__14;
          __pyx_t_12[4] = __pyx_t_9;
          __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 701, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 701, __pyx_L1_error)
      #endif
    }
  }

  /* "cytimes/utils.py":703
 *             assert val == cmp, f"{i}: {val} != {cmp}"
 * 
 *     print("Passed: days_bf_month")             # <<<<<<<<<<<<<<
 * 
 *     del _days_before_month
*/
  __pyx_t_9 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Passed_days_bf_month};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/utils.py":705
 *     print("Passed: days_bf_month")
 * 
 *     del _days_before_month             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__days_before_month); __pyx_v__days_before_month = 0;

  /* "cytimes/utils.py":694
 * 
 * 
 * def _test_days_bf_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_month  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._test_days_bf_month", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__days_before_month);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":708
 * 
 * 
 * def _test_weekday() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_29_test_weekday(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_29_test_weekday = {"_test_weekday", (PyCFunction)__pyx_pw_7cytimes_5utils_29_test_weekday, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_29_test_weekday(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_weekday (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_28_test_weekday(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_28_test_weekday(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_date = NULL;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  int __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __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;
  size_t __pyx_t_18;
  PyObject *__pyx_t_19[9];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_weekday", 0);

  /* "cytimes/utils.py":709
 * 
 * def _test_weekday() -> None:
 *     from datetime import date             # <<<<<<<<<<<<<<
 * 
 *     year: cython.int
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_date};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_date};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_date = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":714
 *     month: cython.int
 *     day: cython.int
 *     for year in range(1, 10000):             # <<<<<<<<<<<<<<
 *         for month in range(1, 13):
 *             for day in range(1, 32):
*/
  for (__pyx_t_5 = 1; __pyx_t_5 < 0x2710; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":715
 *     day: cython.int
 *     for year in range(1, 10000):
 *         for month in range(1, 13):             # <<<<<<<<<<<<<<
 *             for day in range(1, 32):
 *                 if day > 28:
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 13; __pyx_t_6+=1) {
      __pyx_v_month = __pyx_t_6;

      /* "cytimes/utils.py":716
 *     for year in range(1, 10000):
 *         for month in range(1, 13):
 *             for day in range(1, 32):             # <<<<<<<<<<<<<<
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
*/
      for (__pyx_t_7 = 1; __pyx_t_7 < 32; __pyx_t_7+=1) {
        __pyx_v_day = __pyx_t_7;

        /* "cytimes/utils.py":717
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_weekday(year, month, day)  # type: ignore
*/
        __pyx_t_8 = (__pyx_v_day > 28);
        if (__pyx_t_8) {

          /* "cytimes/utils.py":718
 *             for day in range(1, 32):
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore             # <<<<<<<<<<<<<<
 *                 val = ymd_weekday(year, month, day)  # type: ignore
 *                 cmp = date(year, month, day).weekday()
*/
          __pyx_t_9 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
          __pyx_t_10 = __pyx_v_day;
          __pyx_t_8 = (__pyx_t_9 < __pyx_t_10);
          if (__pyx_t_8) {
            __pyx_t_11 = __pyx_t_9;
          } else {
            __pyx_t_11 = __pyx_t_10;
          }
          __pyx_v_day = __pyx_t_11;

          /* "cytimes/utils.py":717
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_weekday(year, month, day)  # type: ignore
*/
        }

        /* "cytimes/utils.py":719
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_weekday(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 cmp = date(year, month, day).weekday()
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
*/
        __pyx_v_val = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":720
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_weekday(year, month, day)  # type: ignore
 *                 cmp = date(year, month, day).weekday()             # <<<<<<<<<<<<<<
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
 *     print("Passed: weekday")
*/
        __pyx_t_13 = NULL;
        __Pyx_INCREF(__pyx_v_date);
        __pyx_t_14 = __pyx_v_date; 
        __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
          assert(__pyx_t_13);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
          __pyx_t_18 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_15, __pyx_t_16, __pyx_t_17};
          __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_18, (4-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
        }
        __pyx_t_4 = __pyx_t_12;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_18 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_weekday, __pyx_callargs+__pyx_t_18, (1-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/utils.py":721
 *                 val = ymd_weekday(year, month, day)  # type: ignore
 *                 cmp = date(year, month, day).weekday()
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *     print("Passed: weekday")
 * 
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 721, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 721, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_8)) {
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_19[0] = __pyx_t_12;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_1;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_4;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_14;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_17;
            __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17));
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 721, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_16, 0, 0);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __PYX_ERR(0, 721, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 721, __pyx_L1_error)
        #endif
      }
    }
  }

  /* "cytimes/utils.py":722
 *                 cmp = date(year, month, day).weekday()
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
 *     print("Passed: weekday")             # <<<<<<<<<<<<<<
 * 
 *     del date
*/
  __pyx_t_17 = NULL;
  __pyx_t_18 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_mstate_global->__pyx_kp_u_Passed_weekday};
    __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "cytimes/utils.py":724
 *     print("Passed: weekday")
 * 
 *     del date             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_date); __pyx_v_date = 0;

  /* "cytimes/utils.py":708
 * 
 * 
 * def _test_weekday() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/

  /* 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_4);
  __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_AddTraceback("cytimes.utils._test_weekday", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":727
 * 
 * 
 * def _test_isocalendar() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_31_test_isocalendar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_31_test_isocalendar = {"_test_isocalendar", (PyCFunction)__pyx_pw_7cytimes_5utils_31_test_isocalendar, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_31_test_isocalendar(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_isocalendar (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_30_test_isocalendar(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_30_test_isocalendar(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_date = NULL;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  PyObject *__pyx_v_cmp = NULL;
  __pyx_t_7cytimes_5utils_iso __pyx_v_iso_calr;
  PY_LONG_LONG __pyx_v_iso_year;
  int __pyx_v_iso_week;
  int __pyx_v_iso_weekday;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __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;
  size_t __pyx_t_18;
  PyObject *__pyx_t_19[9];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_isocalendar", 0);

  /* "cytimes/utils.py":728
 * 
 * def _test_isocalendar() -> None:
 *     from datetime import date             # <<<<<<<<<<<<<<
 * 
 *     year: cython.int
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_date};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_date};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_date = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":733
 *     month: cython.int
 *     day: cython.int
 *     for year in range(1, 10000):             # <<<<<<<<<<<<<<
 *         for month in range(1, 13):
 *             for day in range(1, 32):
*/
  for (__pyx_t_5 = 1; __pyx_t_5 < 0x2710; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":734
 *     day: cython.int
 *     for year in range(1, 10000):
 *         for month in range(1, 13):             # <<<<<<<<<<<<<<
 *             for day in range(1, 32):
 *                 if day > 28:
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 13; __pyx_t_6+=1) {
      __pyx_v_month = __pyx_t_6;

      /* "cytimes/utils.py":735
 *     for year in range(1, 10000):
 *         for month in range(1, 13):
 *             for day in range(1, 32):             # <<<<<<<<<<<<<<
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
*/
      for (__pyx_t_7 = 1; __pyx_t_7 < 32; __pyx_t_7+=1) {
        __pyx_v_day = __pyx_t_7;

        /* "cytimes/utils.py":736
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 cmp = date(year, month, day).isocalendar()
*/
        __pyx_t_8 = (__pyx_v_day > 28);
        if (__pyx_t_8) {

          /* "cytimes/utils.py":737
 *             for day in range(1, 32):
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore             # <<<<<<<<<<<<<<
 *                 cmp = date(year, month, day).isocalendar()
 *                 iso_calr = ymd_isocalendar(year, month, day)  # type: ignore
*/
          __pyx_t_9 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
          __pyx_t_10 = __pyx_v_day;
          __pyx_t_8 = (__pyx_t_9 < __pyx_t_10);
          if (__pyx_t_8) {
            __pyx_t_11 = __pyx_t_9;
          } else {
            __pyx_t_11 = __pyx_t_10;
          }
          __pyx_v_day = __pyx_t_11;

          /* "cytimes/utils.py":736
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 cmp = date(year, month, day).isocalendar()
*/
        }

        /* "cytimes/utils.py":738
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 cmp = date(year, month, day).isocalendar()             # <<<<<<<<<<<<<<
 *                 iso_calr = ymd_isocalendar(year, month, day)  # type: ignore
 *                 assert (
*/
        __pyx_t_13 = NULL;
        __Pyx_INCREF(__pyx_v_date);
        __pyx_t_14 = __pyx_v_date; 
        __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 738, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_18 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14);
          assert(__pyx_t_13);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
          __pyx_t_18 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_15, __pyx_t_16, __pyx_t_17};
          __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_18, (4-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
        }
        __pyx_t_4 = __pyx_t_12;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_18 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isocalendar, __pyx_callargs+__pyx_t_18, (1-__pyx_t_18) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/utils.py":739
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 cmp = date(year, month, day).isocalendar()
 *                 iso_calr = ymd_isocalendar(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_calr.year == cmp.year
*/
        __pyx_v_iso_calr = __pyx_f_7cytimes_5utils_ymd_isocalendar(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":740
 *                 cmp = date(year, month, day).isocalendar()
 *                 iso_calr = ymd_isocalendar(year, month, day)  # type: ignore
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_calr.year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_calr.year} != {cmp.year}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":741
 *                 iso_calr = ymd_isocalendar(year, month, day)  # type: ignore
 *                 assert (
 *                     iso_calr.year == cmp.year             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_calr.year} != {cmp.year}"
 *                 assert (
*/
          __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_iso_calr.year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 741, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":742
 *                 assert (
 *                     iso_calr.year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_calr.year} != {cmp.year}"             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_calr.week == cmp.week
*/
            __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_iso_calr.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_t_17, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_19[0] = __pyx_t_4;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_12;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_1;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_14;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_16;
            __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16));
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 742, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_17, 0, 0);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __PYX_ERR(0, 740, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 740, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":743
 *                     iso_calr.year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_calr.year} != {cmp.year}"
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_calr.week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_calr.week} != {cmp.week}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":744
 *                 ), f"{year}-{month}-{day}: {iso_calr.year} != {cmp.year}"
 *                 assert (
 *                     iso_calr.week == cmp.week             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_calr.week} != {cmp.week}"
 *                 assert (
*/
          __pyx_t_17 = __Pyx_PyLong_From_int(__pyx_v_iso_calr.week); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_week); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_14 = PyObject_RichCompare(__pyx_t_17, __pyx_t_16, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":745
 *                 assert (
 *                     iso_calr.week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_calr.week} != {cmp.week}"             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_calr.weekday == cmp.weekday
*/
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_iso_calr.week, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_week); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_19[0] = __pyx_t_14;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_16;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_17;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_1;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_4;
            __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
            if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_12, 0, 0);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __PYX_ERR(0, 743, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 743, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":746
 *                     iso_calr.week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_calr.week} != {cmp.week}"
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_calr.weekday == cmp.weekday
 *                 ), f"{year}-{month}-{day}: {iso_calr.weekday} != {cmp.weekday}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":747
 *                 ), f"{year}-{month}-{day}: {iso_calr.week} != {cmp.week}"
 *                 assert (
 *                     iso_calr.weekday == cmp.weekday             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_calr.weekday} != {cmp.weekday}"
 * 
*/
          __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_iso_calr.weekday); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 747, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_weekday); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_12, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 747, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":748
 *                 assert (
 *                     iso_calr.weekday == cmp.weekday
 *                 ), f"{year}-{month}-{day}: {iso_calr.weekday} != {cmp.weekday}"             # <<<<<<<<<<<<<<
 * 
 *                 iso_year = ymd_isoyear(year, month, day)  # type: ignore
*/
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_iso_calr.weekday, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_weekday); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_t_16, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_19[0] = __pyx_t_1;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_4;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_12;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_17;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_14;
            __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 748, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_16, 0, 0);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __PYX_ERR(0, 746, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 746, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":750
 *                 ), f"{year}-{month}-{day}: {iso_calr.weekday} != {cmp.weekday}"
 * 
 *                 iso_year = ymd_isoyear(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_year == cmp.year
*/
        __pyx_v_iso_year = __pyx_f_7cytimes_5utils_ymd_isoyear(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":751
 * 
 *                 iso_year = ymd_isoyear(year, month, day)  # type: ignore
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_year} != {cmp.year}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":752
 *                 iso_year = ymd_isoyear(year, month, day)  # type: ignore
 *                 assert (
 *                     iso_year == cmp.year             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_year} != {cmp.year}"
 *                 iso_week = ymd_isoweek(year, month, day)  # type: ignore
*/
          __pyx_t_16 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_iso_year); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 752, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 752, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_17 = PyObject_RichCompare(__pyx_t_16, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 752, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 752, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":753
 *                 assert (
 *                     iso_year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_year} != {cmp.year}"             # <<<<<<<<<<<<<<
 *                 iso_week = ymd_isoweek(year, month, day)  # type: ignore
 *                 assert (
*/
            __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_12 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_iso_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_19[0] = __pyx_t_17;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_14;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_16;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_12;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_1;
            __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(0, 751, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 751, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":754
 *                     iso_year == cmp.year
 *                 ), f"{year}-{month}-{day}: {iso_year} != {cmp.year}"
 *                 iso_week = ymd_isoweek(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_week == cmp.week
*/
        __pyx_v_iso_week = __pyx_f_7cytimes_5utils_ymd_isoweek(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":755
 *                 ), f"{year}-{month}-{day}: {iso_year} != {cmp.year}"
 *                 iso_week = ymd_isoweek(year, month, day)  # type: ignore
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_week} != {cmp.week}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":756
 *                 iso_week = ymd_isoweek(year, month, day)  # type: ignore
 *                 assert (
 *                     iso_week == cmp.week             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_week} != {cmp.week}"
 *                 iso_weekday = ymd_isoweekday(year, month, day)  # type: ignore
*/
          __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_iso_week); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_week); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 756, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 756, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":757
 *                 assert (
 *                     iso_week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_week} != {cmp.week}"             # <<<<<<<<<<<<<<
 *                 iso_weekday = ymd_isoweekday(year, month, day)  # type: ignore
 *                 assert (
*/
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_iso_week, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_week); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_14, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __pyx_t_19[0] = __pyx_t_12;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_1;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_4;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_16;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_17;
            __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17));
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 757, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_14, 0, 0);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __PYX_ERR(0, 755, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 755, __pyx_L1_error)
        #endif

        /* "cytimes/utils.py":758
 *                     iso_week == cmp.week
 *                 ), f"{year}-{month}-{day}: {iso_week} != {cmp.week}"
 *                 iso_weekday = ymd_isoweekday(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 assert (
 *                     iso_weekday == cmp.weekday
*/
        __pyx_v_iso_weekday = __pyx_f_7cytimes_5utils_ymd_isoweekday(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":759
 *                 ), f"{year}-{month}-{day}: {iso_week} != {cmp.week}"
 *                 iso_weekday = ymd_isoweekday(year, month, day)  # type: ignore
 *                 assert (             # <<<<<<<<<<<<<<
 *                     iso_weekday == cmp.weekday
 *                 ), f"{year}-{month}-{day}: {iso_weekday} != {cmp.weekday}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":760
 *                 iso_weekday = ymd_isoweekday(year, month, day)  # type: ignore
 *                 assert (
 *                     iso_weekday == cmp.weekday             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{month}-{day}: {iso_weekday} != {cmp.weekday}"
 * 
*/
          __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_iso_weekday); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_weekday); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_16 = PyObject_RichCompare(__pyx_t_14, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_8)) {

            /* "cytimes/utils.py":761
 *                 assert (
 *                     iso_weekday == cmp.weekday
 *                 ), f"{year}-{month}-{day}: {iso_weekday} != {cmp.weekday}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: isocalendar")
*/
            __pyx_t_16 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_14 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_iso_weekday, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmp, __pyx_mstate_global->__pyx_n_u_weekday); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_19[0] = __pyx_t_16;
            __pyx_t_19[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[2] = __pyx_t_17;
            __pyx_t_19[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_19[4] = __pyx_t_14;
            __pyx_t_19[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_19[6] = __pyx_t_4;
            __pyx_t_19[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_19[8] = __pyx_t_12;
            __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_19, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_1, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(0, 759, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 759, __pyx_L1_error)
        #endif
      }
    }
  }

  /* "cytimes/utils.py":763
 *                 ), f"{year}-{month}-{day}: {iso_weekday} != {cmp.weekday}"
 * 
 *     print("Passed: isocalendar")             # <<<<<<<<<<<<<<
 * 
 *     del date
*/
  __pyx_t_12 = NULL;
  __pyx_t_18 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Passed_isocalendar};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":765
 *     print("Passed: isocalendar")
 * 
 *     del date             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_date); __pyx_v_date = 0;

  /* "cytimes/utils.py":727
 * 
 * 
 * def _test_isocalendar() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/

  /* 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_4);
  __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_AddTraceback("cytimes.utils._test_isocalendar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":768
 * 
 * 
 * def _test_iso_week1_mon_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek1monday  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_33_test_iso_week1_mon_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_33_test_iso_week1_mon_ord = {"_test_iso_week1_mon_ord", (PyCFunction)__pyx_pw_7cytimes_5utils_33_test_iso_week1_mon_ord, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_33_test_iso_week1_mon_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_iso_week1_mon_ord (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_32_test_iso_week1_mon_ord(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_32_test_iso_week1_mon_ord(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__isoweek1monday = NULL;
  long __pyx_v_year;
  PY_LONG_LONG __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10[5];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_iso_week1_mon_ord", 0);

  /* "cytimes/utils.py":769
 * 
 * def _test_iso_week1_mon_ord() -> None:
 *     from _pydatetime import _isoweek1monday  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for year in range(1, 10000):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_isoweek1monday};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_isoweek1monday};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__isoweek1monday = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":771
 *     from _pydatetime import _isoweek1monday  # type: ignore
 * 
 *     for year in range(1, 10000):             # <<<<<<<<<<<<<<
 *         val = iso_week1_mon_ord(year)  # type: ignore
 *         cmp = _isoweek1monday(year)
*/
  for (__pyx_t_5 = 1; __pyx_t_5 < 0x2710; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":772
 * 
 *     for year in range(1, 10000):
 *         val = iso_week1_mon_ord(year)  # type: ignore             # <<<<<<<<<<<<<<
 *         cmp = _isoweek1monday(year)
 *         assert val == cmp, f"{year}: {val} != {cmp}"
*/
    __pyx_v_val = __pyx_f_7cytimes_5utils_iso_week1_mon_ord(__pyx_v_year);

    /* "cytimes/utils.py":773
 *     for year in range(1, 10000):
 *         val = iso_week1_mon_ord(year)  # type: ignore
 *         cmp = _isoweek1monday(year)             # <<<<<<<<<<<<<<
 *         assert val == cmp, f"{year}: {val} != {cmp}"
 *     print("Passed: iso_week1_mon_ord")
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v__isoweek1monday);
    __pyx_t_6 = __pyx_v__isoweek1monday; 
    __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":774
 *         val = iso_week1_mon_ord(year)  # type: ignore
 *         cmp = _isoweek1monday(year)
 *         assert val == cmp, f"{year}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *     print("Passed: iso_week1_mon_ord")
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_1 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 774, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_9)) {
        __pyx_t_6 = __Pyx_PyUnicode_From_long(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10[0] = __pyx_t_6;
        __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_10[2] = __pyx_t_1;
        __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_10[4] = __pyx_t_7;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 774, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 774, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":775
 *         cmp = _isoweek1monday(year)
 *         assert val == cmp, f"{year}: {val} != {cmp}"
 *     print("Passed: iso_week1_mon_ord")             # <<<<<<<<<<<<<<
 * 
 *     del _isoweek1monday
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Passed_iso_week1_mon_ord};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":777
 *     print("Passed: iso_week1_mon_ord")
 * 
 *     del _isoweek1monday             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__isoweek1monday); __pyx_v__isoweek1monday = 0;

  /* "cytimes/utils.py":768
 * 
 * 
 * def _test_iso_week1_mon_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek1monday  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_iso_week1_mon_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__isoweek1monday);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":780
 * 
 * 
 * def _test_ymd_to_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ymd2ord  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_35_test_ymd_to_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_35_test_ymd_to_ord = {"_test_ymd_to_ord", (PyCFunction)__pyx_pw_7cytimes_5utils_35_test_ymd_to_ord, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_35_test_ymd_to_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ymd_to_ord (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_34_test_ymd_to_ord(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_34_test_ymd_to_ord(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__ymd2ord = NULL;
  int __pyx_v_year;
  int __pyx_v_month;
  int __pyx_v_day;
  PY_LONG_LONG __pyx_v_val;
  PyObject *__pyx_v_cmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __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;
  size_t __pyx_t_16;
  PyObject *__pyx_t_17[9];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ymd_to_ord", 0);

  /* "cytimes/utils.py":781
 * 
 * def _test_ymd_to_ord() -> None:
 *     from _pydatetime import _ymd2ord  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     year: cython.int
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ymd2ord};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ymd2ord};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__ymd2ord = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":786
 *     month: cython.int
 *     day: cython.int
 *     for year in range(-10000, 10001):             # <<<<<<<<<<<<<<
 *         for month in range(1, 13):
 *             for day in range(1, 32):
*/
  for (__pyx_t_5 = -10000; __pyx_t_5 < 0x2711; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":787
 *     day: cython.int
 *     for year in range(-10000, 10001):
 *         for month in range(1, 13):             # <<<<<<<<<<<<<<
 *             for day in range(1, 32):
 *                 if day > 28:
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 13; __pyx_t_6+=1) {
      __pyx_v_month = __pyx_t_6;

      /* "cytimes/utils.py":788
 *     for year in range(-10000, 10001):
 *         for month in range(1, 13):
 *             for day in range(1, 32):             # <<<<<<<<<<<<<<
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
*/
      for (__pyx_t_7 = 1; __pyx_t_7 < 32; __pyx_t_7+=1) {
        __pyx_v_day = __pyx_t_7;

        /* "cytimes/utils.py":789
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_to_ord(year, month, day)  # type: ignore
*/
        __pyx_t_8 = (__pyx_v_day > 28);
        if (__pyx_t_8) {

          /* "cytimes/utils.py":790
 *             for day in range(1, 32):
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore             # <<<<<<<<<<<<<<
 *                 val = ymd_to_ord(year, month, day)  # type: ignore
 *                 cmp = _ymd2ord(year, month, day)
*/
          __pyx_t_9 = __pyx_f_7cytimes_5utils_days_in_month(__pyx_v_year, __pyx_v_month);
          __pyx_t_10 = __pyx_v_day;
          __pyx_t_8 = (__pyx_t_9 < __pyx_t_10);
          if (__pyx_t_8) {
            __pyx_t_11 = __pyx_t_9;
          } else {
            __pyx_t_11 = __pyx_t_10;
          }
          __pyx_v_day = __pyx_t_11;

          /* "cytimes/utils.py":789
 *         for month in range(1, 13):
 *             for day in range(1, 32):
 *                 if day > 28:             # <<<<<<<<<<<<<<
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_to_ord(year, month, day)  # type: ignore
*/
        }

        /* "cytimes/utils.py":791
 *                 if day > 28:
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_to_ord(year, month, day)  # type: ignore             # <<<<<<<<<<<<<<
 *                 cmp = _ymd2ord(year, month, day)
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
*/
        __pyx_v_val = __pyx_f_7cytimes_5utils_ymd_to_ord(__pyx_v_year, __pyx_v_month, __pyx_v_day);

        /* "cytimes/utils.py":792
 *                     day = min(day, days_in_month(year, month))  # type: ignore
 *                 val = ymd_to_ord(year, month, day)  # type: ignore
 *                 cmp = _ymd2ord(year, month, day)             # <<<<<<<<<<<<<<
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
 *     print("Passed: ymd_to_ord")
*/
        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v__ymd2ord);
        __pyx_t_12 = __pyx_v__ymd2ord; 
        __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_month); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_day); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 792, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
          __pyx_t_16 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_13, __pyx_t_14, __pyx_t_15};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_16, (4-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cytimes/utils.py":793
 *                 val = ymd_to_ord(year, month, day)  # type: ignore
 *                 cmp = _ymd2ord(year, month, day)
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"             # <<<<<<<<<<<<<<
 *     print("Passed: ymd_to_ord")
 * 
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          __pyx_t_1 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_1, __pyx_v_cmp, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 793, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 793, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_8)) {
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_month, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_15 = __Pyx_PyUnicode_From_int(__pyx_v_day, 0, ' ', 'd'); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __pyx_t_14 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_val, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_cmp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_17[0] = __pyx_t_12;
            __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_17[2] = __pyx_t_1;
            __pyx_t_17[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_17[4] = __pyx_t_15;
            __pyx_t_17[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_17[6] = __pyx_t_14;
            __pyx_t_17[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_17[8] = __pyx_t_13;
            __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __PYX_ERR(0, 793, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 793, __pyx_L1_error)
        #endif
      }
    }
  }

  /* "cytimes/utils.py":794
 *                 cmp = _ymd2ord(year, month, day)
 *                 assert val == cmp, f"{year}-{month}-{day}: {val} != {cmp}"
 *     print("Passed: ymd_to_ord")             # <<<<<<<<<<<<<<
 * 
 *     del _ymd2ord
*/
  __pyx_t_13 = NULL;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_mstate_global->__pyx_kp_u_Passed_ymd_to_ord};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":796
 *     print("Passed: ymd_to_ord")
 * 
 *     del _ymd2ord             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__ymd2ord); __pyx_v__ymd2ord = 0;

  /* "cytimes/utils.py":780
 * 
 * 
 * def _test_ymd_to_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ymd2ord  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils._test_ymd_to_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__ymd2ord);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":799
 * 
 * 
 * def _test_ymd_fr_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_37_test_ymd_fr_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_37_test_ymd_fr_ord = {"_test_ymd_fr_ord", (PyCFunction)__pyx_pw_7cytimes_5utils_37_test_ymd_fr_ord, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_37_test_ymd_fr_ord(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ymd_fr_ord (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_36_test_ymd_fr_ord(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_36_test_ymd_fr_ord(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__ord2ymd = NULL;
  PyObject *__pyx_v__MAXORDINAL = NULL;
  PyObject *__pyx_v_i = NULL;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_val;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PY_LONG_LONG __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15[9];
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ymd_fr_ord", 0);

  /* "cytimes/utils.py":800
 * 
 * def _test_ymd_fr_ord() -> None:
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for i in range(-_MAXORDINAL - 1000, _MAXORDINAL + 1001):
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ord2ymd,__pyx_mstate_global->__pyx_n_u_MAXORDINAL};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ord2ymd,__pyx_mstate_global->__pyx_n_u_MAXORDINAL};
    for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__ord2ymd = __pyx_t_4;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__MAXORDINAL = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":802
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore
 * 
 *     for i in range(-_MAXORDINAL - 1000, _MAXORDINAL + 1001):             # <<<<<<<<<<<<<<
 *         val = ymd_fr_ord(i)  # type: ignore
 *         (y, m, d) = _ord2ymd(i)
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = PyNumber_Negative(__pyx_v__MAXORDINAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyLong_SubtractObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_v__MAXORDINAL, __pyx_mstate_global->__pyx_int_1001, 0x3E9, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_7, (3-__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;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    {
      __pyx_t_1 = __pyx_t_8(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 802, __pyx_L1_error)
          PyErr_Clear();
        }
        break;
      }
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":803
 * 
 *     for i in range(-_MAXORDINAL - 1000, _MAXORDINAL + 1001):
 *         val = ymd_fr_ord(i)  # type: ignore             # <<<<<<<<<<<<<<
 *         (y, m, d) = _ord2ymd(i)
 *         assert (
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_i); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L1_error)
    __pyx_v_val = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_t_9);

    /* "cytimes/utils.py":804
 *     for i in range(-_MAXORDINAL - 1000, _MAXORDINAL + 1001):
 *         val = ymd_fr_ord(i)  # type: ignore
 *         (y, m, d) = _ord2ymd(i)             # <<<<<<<<<<<<<<
 *         assert (
 *             val.year == y and val.month == m and val.day == d
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v__ord2ymd);
    __pyx_t_4 = __pyx_v__ord2ymd; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_i};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 804, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2);
        __Pyx_INCREF(__pyx_t_10);
      } else {
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 804, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_10);
      }
      #else
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
      index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 3) < (0)) __PYX_ERR(0, 804, __pyx_L1_error)
      __pyx_t_12 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 804, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "cytimes/utils.py":805
 *         val = ymd_fr_ord(i)  # type: ignore
 *         (y, m, d) = _ord2ymd(i)
 *         assert (             # <<<<<<<<<<<<<<
 *             val.year == y and val.month == m and val.day == d
 *         ), f"{i}: {val} != {y}-{m}-{d}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":806
 *         (y, m, d) = _ord2ymd(i)
 *         assert (
 *             val.year == y and val.month == m and val.day == d             # <<<<<<<<<<<<<<
 *         ), f"{i}: {val} != {y}-{m}-{d}"
 * 
*/
      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_val.year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_v_y, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_14) {
      } else {
        __pyx_t_13 = __pyx_t_14;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_val.month); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_14) {
      } else {
        __pyx_t_13 = __pyx_t_14;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_val.day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_13 = __pyx_t_14;
      __pyx_L7_bool_binop_done:;
      if (unlikely(!__pyx_t_13)) {

        /* "cytimes/utils.py":807
 *         assert (
 *             val.year == y and val.month == m and val.day == d
 *         ), f"{i}: {val} != {y}-{m}-{d}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ymd_fr_ord")
*/
        __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_i, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_1 = __pyx_convert__to_py___pyx_t_7cytimes_5utils_ymd(__pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_y, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_m, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15[0] = __pyx_t_10;
        __pyx_t_15[1] = __pyx_mstate_global->__pyx_kp_u__13;
        __pyx_t_15[2] = __pyx_t_6;
        __pyx_t_15[3] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_15[4] = __pyx_t_1;
        __pyx_t_15[5] = __pyx_mstate_global->__pyx_kp_u__4;
        __pyx_t_15[6] = __pyx_t_4;
        __pyx_t_15[7] = __pyx_mstate_global->__pyx_kp_u__4;
        __pyx_t_15[8] = __pyx_t_11;
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 9, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 807, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_16, 0, 0);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __PYX_ERR(0, 805, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 805, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":802
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore
 * 
 *     for i in range(-_MAXORDINAL - 1000, _MAXORDINAL + 1001):             # <<<<<<<<<<<<<<
 *         val = ymd_fr_ord(i)  # type: ignore
 *         (y, m, d) = _ord2ymd(i)
*/
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":809
 *         ), f"{i}: {val} != {y}-{m}-{d}"
 * 
 *     print("Passed: ymd_fr_ord")             # <<<<<<<<<<<<<<
 * 
 *     del _ord2ymd, _MAXORDINAL
*/
  __pyx_t_16 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_mstate_global->__pyx_kp_u_Passed_ymd_fr_ord};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":811
 *     print("Passed: ymd_fr_ord")
 * 
 *     del _ord2ymd, _MAXORDINAL             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__ord2ymd); __pyx_v__ord2ymd = 0;
  __Pyx_DECREF(__pyx_v__MAXORDINAL); __pyx_v__MAXORDINAL = 0;

  /* "cytimes/utils.py":799
 * 
 * 
 * def _test_ymd_fr_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils._test_ymd_fr_ord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__ord2ymd);
  __Pyx_XDECREF(__pyx_v__MAXORDINAL);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":814
 * 
 * 
 * def _test_ymd_fr_iso() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek_to_gregorian  # type: ignore
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_39_test_ymd_fr_iso(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_39_test_ymd_fr_iso = {"_test_ymd_fr_iso", (PyCFunction)__pyx_pw_7cytimes_5utils_39_test_ymd_fr_iso, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_39_test_ymd_fr_iso(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ymd_fr_iso (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_38_test_ymd_fr_iso(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_38_test_ymd_fr_iso(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v__isoweek_to_gregorian = NULL;
  int __pyx_v_year;
  int __pyx_v_week;
  int __pyx_v_weekday;
  PyObject *__pyx_v_y = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_d = NULL;
  __pyx_t_7cytimes_5utils_ymd __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __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;
  size_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20[13];
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ymd_fr_iso", 0);

  /* "cytimes/utils.py":815
 * 
 * def _test_ymd_fr_iso() -> None:
 *     from _pydatetime import _isoweek_to_gregorian  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     year: cython.int
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_isoweek_to_gregorian};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pydatetime, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_isoweek_to_gregorian};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v__isoweek_to_gregorian = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":820
 *     week: cython.int
 *     weekday: cython.int
 *     for year in range(1, 10000):             # <<<<<<<<<<<<<<
 *         for week in range(1, 54):
 *             for weekday in range(1, 8):
*/
  for (__pyx_t_5 = 1; __pyx_t_5 < 0x2710; __pyx_t_5+=1) {
    __pyx_v_year = __pyx_t_5;

    /* "cytimes/utils.py":821
 *     weekday: cython.int
 *     for year in range(1, 10000):
 *         for week in range(1, 54):             # <<<<<<<<<<<<<<
 *             for weekday in range(1, 8):
 *                 try:
*/
    for (__pyx_t_6 = 1; __pyx_t_6 < 54; __pyx_t_6+=1) {
      __pyx_v_week = __pyx_t_6;

      /* "cytimes/utils.py":822
 *     for year in range(1, 10000):
 *         for week in range(1, 54):
 *             for weekday in range(1, 8):             # <<<<<<<<<<<<<<
 *                 try:
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
*/
      for (__pyx_t_7 = 1; __pyx_t_7 < 8; __pyx_t_7+=1) {
        __pyx_v_weekday = __pyx_t_7;

        /* "cytimes/utils.py":823
 *         for week in range(1, 54):
 *             for weekday in range(1, 8):
 *                 try:             # <<<<<<<<<<<<<<
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
 *                 except ValueError:
*/
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_8, &__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          /*try:*/ {

            /* "cytimes/utils.py":824
 *             for weekday in range(1, 8):
 *                 try:
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)             # <<<<<<<<<<<<<<
 *                 except ValueError:
 *                     continue
*/
            __pyx_t_4 = NULL;
            __Pyx_INCREF(__pyx_v__isoweek_to_gregorian);
            __pyx_t_10 = __pyx_v__isoweek_to_gregorian; 
            __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_year); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 824, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_week); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_weekday); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 824, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_14 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_10))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_10);
              assert(__pyx_t_4);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
              __pyx_t_14 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_11, __pyx_t_12, __pyx_t_13};
              __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_14, (4-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_10); __pyx_t_10 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
              PyObject* sequence = __pyx_t_1;
              Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
              if (unlikely(size != 3)) {
                if (size > 3) __Pyx_RaiseTooManyValuesError(3);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(0, 824, __pyx_L9_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
                __Pyx_INCREF(__pyx_t_10);
                __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
                __Pyx_INCREF(__pyx_t_13);
                __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2);
                __Pyx_INCREF(__pyx_t_12);
              } else {
                __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 824, __pyx_L9_error)
                __Pyx_XGOTREF(__pyx_t_10);
                __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 824, __pyx_L9_error)
                __Pyx_XGOTREF(__pyx_t_13);
                __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
                if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L9_error)
                __Pyx_XGOTREF(__pyx_t_12);
              }
              #else
              __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 824, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 824, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_12);
              #endif
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 824, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
              index = 0; __pyx_t_10 = __pyx_t_15(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L17_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_10);
              index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L17_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_13);
              index = 2; __pyx_t_12 = __pyx_t_15(__pyx_t_11); if (unlikely(!__pyx_t_12)) goto __pyx_L17_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_12);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_11), 3) < (0)) __PYX_ERR(0, 824, __pyx_L9_error)
              __pyx_t_15 = NULL;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              goto __pyx_L18_unpacking_done;
              __pyx_L17_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_15 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 824, __pyx_L9_error)
              __pyx_L18_unpacking_done:;
            }
            __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_10);
            __pyx_t_10 = 0;
            __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_13);
            __pyx_t_13 = 0;
            __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "cytimes/utils.py":823
 *         for week in range(1, 54):
 *             for weekday in range(1, 8):
 *                 try:             # <<<<<<<<<<<<<<
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
 *                 except ValueError:
*/
          }
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L16_try_end;
          __pyx_L9_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_4); __pyx_t_4 = 0;

          /* "cytimes/utils.py":825
 *                 try:
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
 *                 except ValueError:             # <<<<<<<<<<<<<<
 *                     continue
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore
*/
          __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
          if (__pyx_t_16) {
            __Pyx_AddTraceback("cytimes.utils._test_ymd_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_13) < 0) __PYX_ERR(0, 825, __pyx_L11_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_13);

            /* "cytimes/utils.py":826
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
 *                 except ValueError:
 *                     continue             # <<<<<<<<<<<<<<
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore
 *                 if y == 10_000 or val.year == 10_000:
*/
            goto __pyx_L19_except_continue;
            __pyx_L19_except_continue:;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L15_try_continue;
          }
          goto __pyx_L11_except_error;

          /* "cytimes/utils.py":823
 *         for week in range(1, 54):
 *             for weekday in range(1, 8):
 *                 try:             # <<<<<<<<<<<<<<
 *                     (y, m, d) = _isoweek_to_gregorian(year, week, weekday)
 *                 except ValueError:
*/
          __pyx_L11_except_error:;
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_8, __pyx_t_9);
          goto __pyx_L1_error;
          __pyx_L15_try_continue:;
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_8, __pyx_t_9);
          goto __pyx_L7_continue;
          __pyx_L16_try_end:;
        }

        /* "cytimes/utils.py":827
 *                 except ValueError:
 *                     continue
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore             # <<<<<<<<<<<<<<
 *                 if y == 10_000 or val.year == 10_000:
 *                     continue
*/
        __pyx_v_val = __pyx_f_7cytimes_5utils_ymd_fr_iso(__pyx_v_year, __pyx_v_week, __pyx_v_weekday);

        /* "cytimes/utils.py":828
 *                     continue
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore
 *                 if y == 10_000 or val.year == 10_000:             # <<<<<<<<<<<<<<
 *                     continue
 *                 assert (
*/
        __pyx_t_18 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_y, __pyx_mstate_global->__pyx_int_10000, 0x2710, 0)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 828, __pyx_L1_error)
        if (!__pyx_t_18) {
        } else {
          __pyx_t_17 = __pyx_t_18;
          goto __pyx_L22_bool_binop_done;
        }
        __pyx_t_18 = (__pyx_v_val.year == 0x2710);
        __pyx_t_17 = __pyx_t_18;
        __pyx_L22_bool_binop_done:;
        if (__pyx_t_17) {

          /* "cytimes/utils.py":829
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore
 *                 if y == 10_000 or val.year == 10_000:
 *                     continue             # <<<<<<<<<<<<<<
 *                 assert (
 *                     val.year == y and val.month == m and val.day == d
*/
          goto __pyx_L7_continue;

          /* "cytimes/utils.py":828
 *                     continue
 *                 val = ymd_fr_iso(year, week, weekday)  # type: ignore
 *                 if y == 10_000 or val.year == 10_000:             # <<<<<<<<<<<<<<
 *                     continue
 *                 assert (
*/
        }

        /* "cytimes/utils.py":830
 *                 if y == 10_000 or val.year == 10_000:
 *                     continue
 *                 assert (             # <<<<<<<<<<<<<<
 *                     val.year == y and val.month == m and val.day == d
 *                 ), f"{year}-{week}-{weekday}: {val} != {y}-{m}-{d}"
*/
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {

          /* "cytimes/utils.py":831
 *                     continue
 *                 assert (
 *                     val.year == y and val.month == m and val.day == d             # <<<<<<<<<<<<<<
 *                 ), f"{year}-{week}-{weekday}: {val} != {y}-{m}-{d}"
 * 
*/
          __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_val.year); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_13, __pyx_v_y, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_18) {
          } else {
            __pyx_t_17 = __pyx_t_18;
            goto __pyx_L24_bool_binop_done;
          }
          __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v_val.month); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = PyObject_RichCompare(__pyx_t_12, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_18) {
          } else {
            __pyx_t_17 = __pyx_t_18;
            goto __pyx_L24_bool_binop_done;
          }
          __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_val.day); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_13, __pyx_v_d, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 831, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_17 = __pyx_t_18;
          __pyx_L24_bool_binop_done:;
          if (unlikely(!__pyx_t_17)) {

            /* "cytimes/utils.py":832
 *                 assert (
 *                     val.year == y and val.month == m and val.day == d
 *                 ), f"{year}-{week}-{weekday}: {val} != {y}-{m}-{d}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ymd_fr_iso")
*/
            __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = __Pyx_PyUnicode_From_int(__pyx_v_week, 0, ' ', 'd'); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_1 = __Pyx_PyUnicode_From_int(__pyx_v_weekday, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_10 = __pyx_convert__to_py___pyx_t_7cytimes_5utils_ymd(__pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_10, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_y, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_m, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_19 = __Pyx_PyObject_FormatSimple(__pyx_v_d, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_20[0] = __pyx_t_12;
            __pyx_t_20[1] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_20[2] = __pyx_t_13;
            __pyx_t_20[3] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_20[4] = __pyx_t_1;
            __pyx_t_20[5] = __pyx_mstate_global->__pyx_kp_u__13;
            __pyx_t_20[6] = __pyx_t_11;
            __pyx_t_20[7] = __pyx_mstate_global->__pyx_kp_u__14;
            __pyx_t_20[8] = __pyx_t_10;
            __pyx_t_20[9] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_20[10] = __pyx_t_4;
            __pyx_t_20[11] = __pyx_mstate_global->__pyx_kp_u__4;
            __pyx_t_20[12] = __pyx_t_19;
            __pyx_t_21 = __Pyx_PyUnicode_Join(__pyx_t_20, 13, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 1 * 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19));
            if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 832, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_21, 0, 0);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __PYX_ERR(0, 830, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 830, __pyx_L1_error)
        #endif
        __pyx_L7_continue:;
      }
    }
  }

  /* "cytimes/utils.py":834
 *                 ), f"{year}-{week}-{weekday}: {val} != {y}-{m}-{d}"
 * 
 *     print("Passed: ymd_fr_iso")             # <<<<<<<<<<<<<<
 * 
 *     del _isoweek_to_gregorian
*/
  __pyx_t_19 = NULL;
  __pyx_t_14 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_mstate_global->__pyx_kp_u_Passed_ymd_fr_iso};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "cytimes/utils.py":836
 *     print("Passed: ymd_fr_iso")
 * 
 *     del _isoweek_to_gregorian             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v__isoweek_to_gregorian); __pyx_v__isoweek_to_gregorian = 0;

  /* "cytimes/utils.py":814
 * 
 * 
 * def _test_ymd_fr_iso() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek_to_gregorian  # type: ignore
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("cytimes.utils._test_ymd_fr_iso", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__isoweek_to_gregorian);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":840
 * 
 * # datetime.date
 * def _test_date_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_41_test_date_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_41_test_date_generate = {"_test_date_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_41_test_date_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_41_test_date_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_date_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_40_test_date_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_40_test_date_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Date = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_date_new __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_date_now __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_date_generate", 0);

  /* "cytimes/utils.py":841
 * # datetime.date
 * def _test_date_generate() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pendulum import Date
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":842
 * def _test_date_generate() -> None:
 *     import datetime
 *     from pendulum import Date             # <<<<<<<<<<<<<<
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Date};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Date};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Date = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":844
 *     from pendulum import Date
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 * 
 *     # New
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 844, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 844, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":847
 * 
 *     # New
 *     assert datetime.date(1, 1, 1) == date_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.date(1, 1, 1) == date_new(1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 847, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 847, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":848
 *     # New
 *     assert datetime.date(1, 1, 1) == date_new()  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.year = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 848, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 848, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":849
 *     assert datetime.date(1, 1, 1) == date_new()  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.date(1, 1, 1) == date_new(1, 1, 1)  # type: ignore
 *     assert type(date_new(1, 1, 1)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 849, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 849, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":850
 *     assert datetime.date(1, 1, 1) == date_new(1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_new(1, 1, 1)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, None)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __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 *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 850, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 850, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":851
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1, 1)  # type: ignore
 *     assert type(date_new(1, 1, 1)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_new(1, 1, 1, None)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, datetime.date)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 851, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 851, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":852
 *     assert datetime.date(1, 1, 1) == date_new(1, 1, 1)  # type: ignore
 *     assert type(date_new(1, 1, 1)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, None)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_new(1, 1, 1, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, Date)) is Date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.dclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 852, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 852, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":853
 *     assert type(date_new(1, 1, 1)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, None)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, datetime.date)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_new(1, 1, 1, Date)) is Date  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.dclass = __pyx_t_4;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 853, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 853, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":854
 *     assert type(date_new(1, 1, 1, None)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_new(1, 1, 1, Date)) is Date  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Now
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.dclass = __pyx_v_Date;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_v_Date);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 854, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 854, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":857
 * 
 *     # Now
 *     assert datetime.date.today() == date_now()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.date.today() == date_now(None)  # type: ignore
 *     assert datetime.datetime.now(UTC).date() == date_now(UTC)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_today, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 857, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 857, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":858
 *     # Now
 *     assert datetime.date.today() == date_now()  # type: ignore
 *     assert datetime.date.today() == date_now(None)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime.now(UTC).date() == date_now(UTC)  # type: ignore
 *     assert datetime.datetime.now(tz).date() == date_now(tz)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_today, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tzinfo = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(&__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 858, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 858, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":859
 *     assert datetime.date.today() == date_now()  # type: ignore
 *     assert datetime.date.today() == date_now(None)  # type: ignore
 *     assert datetime.datetime.now(UTC).date() == date_now(UTC)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime.now(tz).date() == date_now(tz)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_4 = __pyx_t_1;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_1 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tzinfo = __pyx_t_1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(&__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 859, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 859, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":860
 *     assert datetime.date.today() == date_now(None)  # type: ignore
 *     assert datetime.datetime.now(UTC).date() == date_now(UTC)  # type: ignore
 *     assert datetime.datetime.now(tz).date() == date_now(tz)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: date_generate")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __pyx_t_8;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_tz};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__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(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_4 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_date, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tzinfo = __pyx_v_tz;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_date_now(&__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 860, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 860, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":862
 *     assert datetime.datetime.now(tz).date() == date_now(tz)  # type: ignore
 * 
 *     print("Passed: date_generate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Date
*/
  __pyx_t_5 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_date_generate};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":864
 *     print("Passed: date_generate")
 * 
 *     del datetime, Date             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Date); __pyx_v_Date = 0;

  /* "cytimes/utils.py":840
 * 
 * # datetime.date
 * def _test_date_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._test_date_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Date);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":867
 * 
 * 
 * def _test_date_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_43_test_date_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_43_test_date_type_check = {"_test_date_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_43_test_date_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_43_test_date_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_date_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_42_test_date_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_42_test_date_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_CustomDate = NULL;
  PyObject *__pyx_v_date = 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;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_date_type_check", 0);

  /* "cytimes/utils.py":868
 * 
 * def _test_date_type_check() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     class CustomDate(datetime.date):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":870
 *     import datetime
 * 
 *     class CustomDate(datetime.date):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 870, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomDate, __pyx_mstate_global->__pyx_n_u_test_date_type_check_locals_Cus, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_1 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 870, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CustomDate, __pyx_t_1, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_CustomDate = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":873
 *         pass
 * 
 *     date = datetime.date.today()             # <<<<<<<<<<<<<<
 *     assert is_date(date)  # type: ignore
 *     assert is_date_exact(date)  # type: ignore
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_today, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":874
 * 
 *     date = datetime.date.today()
 *     assert is_date(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_date_exact(date)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_date); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 874, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 874, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 874, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":875
 *     date = datetime.date.today()
 *     assert is_date(date)  # type: ignore
 *     assert is_date_exact(date)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     date = CustomDate(1, 1, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_date_exact(__pyx_v_date); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 875, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 875, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 875, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":877
 *     assert is_date_exact(date)  # type: ignore
 * 
 *     date = CustomDate(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_date(date)  # type: ignore
 *     assert not is_date_exact(date)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_CustomDate, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":878
 * 
 *     date = CustomDate(1, 1, 1)
 *     assert is_date(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_date_exact(date)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_date(__pyx_v_date); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 878, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 878, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 878, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":879
 *     date = CustomDate(1, 1, 1)
 *     assert is_date(date)  # type: ignore
 *     assert not is_date_exact(date)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: date_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_date_exact(__pyx_v_date); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 879, __pyx_L1_error)
    __pyx_t_8 = (!__pyx_t_7);
    if (unlikely(!__pyx_t_8)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 879, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 879, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":881
 *     assert not is_date_exact(date)  # type: ignore
 * 
 *     print("Passed: date_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del CustomDate, datetime
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_date_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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_1)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":883
 *     print("Passed: date_type_check")
 * 
 *     del CustomDate, datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_CustomDate); __pyx_v_CustomDate = 0;
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":867
 * 
 * 
 * def _test_date_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_date_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_CustomDate);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":886
 * 
 * 
 * def _test_date_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_45_test_date_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_45_test_date_conversion = {"_test_date_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_45_test_date_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_45_test_date_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_date_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_44_test_date_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_44_test_date_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Date = NULL;
  PyObject *__pyx_v_date = NULL;
  PyObject *__pyx_v_pdate = NULL;
  PyObject *__pyx_v_dt = NULL;
  struct tm __pyx_v__tm;
  PyDateTime_Date *__pyx_v_tmp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_date __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_date_fr_dt __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  double __pyx_t_20;
  PY_LONG_LONG __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_date_conversion", 0);

  /* "cytimes/utils.py":887
 * 
 * def _test_date_conversion() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pendulum import Date
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":888
 * def _test_date_conversion() -> None:
 *     import datetime
 *     from pendulum import Date             # <<<<<<<<<<<<<<
 * 
 *     date = datetime.date(2021, 1, 2)
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Date};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Date};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Date = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":890
 *     from pendulum import Date
 * 
 *     date = datetime.date(2021, 1, 2)             # <<<<<<<<<<<<<<
 *     pdate = Date(2021, 1, 2)
 *     dt = datetime.datetime(2021, 1, 2)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_date = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":891
 * 
 *     date = datetime.date(2021, 1, 2)
 *     pdate = Date(2021, 1, 2)             # <<<<<<<<<<<<<<
 *     dt = datetime.datetime(2021, 1, 2)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_Date, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_pdate = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":892
 *     date = datetime.date(2021, 1, 2)
 *     pdate = Date(2021, 1, 2)
 *     dt = datetime.datetime(2021, 1, 2)             # <<<<<<<<<<<<<<
 * 
 *     _tm = date_to_tm(date)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_dt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":894
 *     dt = datetime.datetime(2021, 1, 2)
 * 
 *     _tm = date_to_tm(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert tuple(date.timetuple()) == (
 *         _tm.tm_year,
*/
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 894, __pyx_L1_error)
  __pyx_v__tm = __pyx_f_7cytimes_5utils_date_to_tm(((PyDateTime_Date *)__pyx_v_date));

  /* "cytimes/utils.py":895
 * 
 *     _tm = date_to_tm(date)  # type: ignore
 *     assert tuple(date.timetuple()) == (             # <<<<<<<<<<<<<<
 *         _tm.tm_year,
 *         _tm.tm_mon,
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_date;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timetuple, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cytimes/utils.py":896
 *     _tm = date_to_tm(date)  # type: ignore
 *     assert tuple(date.timetuple()) == (
 *         _tm.tm_year,             # <<<<<<<<<<<<<<
 *         _tm.tm_mon,
 *         _tm.tm_mday,
*/
    __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cytimes/utils.py":897
 *     assert tuple(date.timetuple()) == (
 *         _tm.tm_year,
 *         _tm.tm_mon,             # <<<<<<<<<<<<<<
 *         _tm.tm_mday,
 *         _tm.tm_hour,
*/
    __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "cytimes/utils.py":898
 *         _tm.tm_year,
 *         _tm.tm_mon,
 *         _tm.tm_mday,             # <<<<<<<<<<<<<<
 *         _tm.tm_hour,
 *         _tm.tm_min,
*/
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "cytimes/utils.py":899
 *         _tm.tm_mon,
 *         _tm.tm_mday,
 *         _tm.tm_hour,             # <<<<<<<<<<<<<<
 *         _tm.tm_min,
 *         _tm.tm_sec,
*/
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "cytimes/utils.py":900
 *         _tm.tm_mday,
 *         _tm.tm_hour,
 *         _tm.tm_min,             # <<<<<<<<<<<<<<
 *         _tm.tm_sec,
 *         _tm.tm_wday,
*/
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "cytimes/utils.py":901
 *         _tm.tm_hour,
 *         _tm.tm_min,
 *         _tm.tm_sec,             # <<<<<<<<<<<<<<
 *         _tm.tm_wday,
 *         _tm.tm_yday,
*/
    __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "cytimes/utils.py":902
 *         _tm.tm_min,
 *         _tm.tm_sec,
 *         _tm.tm_wday,             # <<<<<<<<<<<<<<
 *         _tm.tm_yday,
 *         _tm.tm_isdst,
*/
    __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);

    /* "cytimes/utils.py":903
 *         _tm.tm_sec,
 *         _tm.tm_wday,
 *         _tm.tm_yday,             # <<<<<<<<<<<<<<
 *         _tm.tm_isdst,
 *     )
*/
    __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);

    /* "cytimes/utils.py":904
 *         _tm.tm_wday,
 *         _tm.tm_yday,
 *         _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *     )
 *     assert "01/02/2021" == date_strformat(date, "%m/%d/%Y")  # type: ignore
*/
    __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);

    /* "cytimes/utils.py":896
 *     _tm = date_to_tm(date)  # type: ignore
 *     assert tuple(date.timetuple()) == (
 *         _tm.tm_year,             # <<<<<<<<<<<<<<
 *         _tm.tm_mon,
 *         _tm.tm_mday,
*/
    __pyx_t_14 = PyTuple_New(9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_7) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_8) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_9) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_t_10) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_11) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_12);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_t_12) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_13);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 8, __pyx_t_13) != (0)) __PYX_ERR(0, 896, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 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_13 = PyObject_RichCompare(__pyx_t_4, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

    /* "cytimes/utils.py":895
 * 
 *     _tm = date_to_tm(date)  # type: ignore
 *     assert tuple(date.timetuple()) == (             # <<<<<<<<<<<<<<
 *         _tm.tm_year,
 *         _tm.tm_mon,
*/
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 895, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 895, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 895, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":906
 *         _tm.tm_isdst,
 *     )
 *     assert "01/02/2021" == date_strformat(date, "%m/%d/%Y")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "2021-01-02" == date_isoformat(date)  # type: ignore
 *     assert date.toordinal() == date_to_ord(date)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 906, __pyx_L1_error)
    __pyx_t_13 = __pyx_f_7cytimes_5utils_date_strformat(((PyDateTime_Date *)__pyx_v_date), __pyx_mstate_global->__pyx_kp_u_m_d_Y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_01_02_2021, __pyx_t_13, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 906, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 906, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":907
 *     )
 *     assert "01/02/2021" == date_strformat(date, "%m/%d/%Y")  # type: ignore
 *     assert "2021-01-02" == date_isoformat(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert date.toordinal() == date_to_ord(date)  # type: ignore
 *     assert (date.toordinal() - EPOCH_DAY) * 86400 == date_to_sec(date)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 907, __pyx_L1_error)
    __pyx_t_13 = __pyx_f_7cytimes_5utils_date_isoformat(((PyDateTime_Date *)__pyx_v_date)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2021_01_02, __pyx_t_13, Py_EQ)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 907, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 907, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 907, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":908
 *     assert "01/02/2021" == date_strformat(date, "%m/%d/%Y")  # type: ignore
 *     assert "2021-01-02" == date_isoformat(date)  # type: ignore
 *     assert date.toordinal() == date_to_ord(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert (date.toordinal() - EPOCH_DAY) * 86400 == date_to_sec(date)  # type: ignore
 *     assert (date.toordinal() - EPOCH_DAY) * 86400_000000 == date_to_us(date)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_14 = __pyx_v_date;
    __Pyx_INCREF(__pyx_t_14);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
      __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 908, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_date_to_ord(((PyDateTime_Date *)__pyx_v_date))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_13, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 908, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 908, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":909
 *     assert "2021-01-02" == date_isoformat(date)  # type: ignore
 *     assert date.toordinal() == date_to_ord(date)  # type: ignore
 *     assert (date.toordinal() - EPOCH_DAY) * 86400 == date_to_sec(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert (date.toordinal() - EPOCH_DAY) * 86400_000000 == date_to_us(date)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_14 = __pyx_v_date;
    __Pyx_INCREF(__pyx_t_14);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_14 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_7cytimes_5utils_EPOCH_DAY); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_13 = PyNumber_Subtract(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyLong_MultiplyObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_86400, 0x15180, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 909, __pyx_L1_error)
    __pyx_t_13 = PyFloat_FromDouble(__pyx_f_7cytimes_5utils_date_to_sec(((PyDateTime_Date *)__pyx_v_date))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_14, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 909, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 909, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":910
 *     assert date.toordinal() == date_to_ord(date)  # type: ignore
 *     assert (date.toordinal() - EPOCH_DAY) * 86400 == date_to_sec(date)  # type: ignore
 *     assert (date.toordinal() - EPOCH_DAY) * 86400_000000 == date_to_us(date)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert date == date_fr_date(pdate)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_13 = __pyx_v_date;
    __Pyx_INCREF(__pyx_t_13);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_13 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_7cytimes_5utils_EPOCH_DAY); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = PyNumber_Subtract(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = PyNumber_Multiply(__pyx_t_14, __pyx_mstate_global->__pyx_int_86400000000); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 910, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_date_to_us(((PyDateTime_Date *)__pyx_v_date))); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_13, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 910, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 910, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":912
 *     assert (date.toordinal() - EPOCH_DAY) * 86400_000000 == date_to_us(date)  # type: ignore
 * 
 *     assert date == date_fr_date(pdate)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(pdate)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, None)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pdate) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pdate, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 912, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_pdate), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = PyObject_RichCompare(__pyx_v_date, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 912, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 912, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":913
 * 
 *     assert date == date_fr_date(pdate)  # type: ignore
 *     assert type(date_fr_date(pdate)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(pdate, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, datetime.date)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pdate) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pdate, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 913, __pyx_L1_error)
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_pdate), NULL)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 913, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 913, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":914
 *     assert date == date_fr_date(pdate)  # type: ignore
 *     assert type(date_fr_date(pdate)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, None)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(pdate, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, Date)) is Date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pdate) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pdate, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 914, __pyx_L1_error)
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_pdate), &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 914, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 914, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":915
 *     assert type(date_fr_date(pdate)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, datetime.date)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(pdate, Date)) is Date  # type: ignore
 *     assert type(date_fr_date(date)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pdate) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pdate, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 915, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = __pyx_t_14;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_pdate), &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 915, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 915, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 915, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":916
 *     assert type(date_fr_date(pdate, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, Date)) is Date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, None)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pdate) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pdate, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 916, __pyx_L1_error)
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = __pyx_v_Date;
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_pdate), &__pyx_t_16)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_v_Date);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 916, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 916, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":917
 *     assert type(date_fr_date(pdate, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(pdate, Date)) is Date  # type: ignore
 *     assert type(date_fr_date(date)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(date, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, datetime.date)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 917, __pyx_L1_error)
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_date), NULL)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 917, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 917, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":918
 *     assert type(date_fr_date(pdate, Date)) is Date  # type: ignore
 *     assert type(date_fr_date(date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, None)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(date, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, Date)) is Date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 918, __pyx_L1_error)
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_date), &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 918, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 918, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":919
 *     assert type(date_fr_date(date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, datetime.date)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_date(date, Date)) is Date  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 919, __pyx_L1_error)
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = __pyx_t_14;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_date), &__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 919, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 919, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":920
 *     assert type(date_fr_date(date, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_date(date, Date)) is Date  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert date == date_fr_dt(dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 920, __pyx_L1_error)
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.dclass = __pyx_v_Date;
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_date(((PyDateTime_Date *)__pyx_v_date), &__pyx_t_16)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_v_Date);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 920, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 920, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":922
 *     assert type(date_fr_date(date, Date)) is Date  # type: ignore
 * 
 *     assert date == date_fr_dt(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_dt(dt)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, None)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 922, __pyx_L1_error)
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_date, __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 922, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 922, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":923
 * 
 *     assert date == date_fr_dt(dt)  # type: ignore
 *     assert type(date_fr_dt(dt)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_dt(dt, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, datetime.date)) is datetime.date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 923, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 923, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 923, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":924
 *     assert date == date_fr_dt(dt)  # type: ignore
 *     assert type(date_fr_dt(dt)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, None)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_dt(dt, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, Date)) is Date  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 924, __pyx_L1_error)
    __pyx_t_17.__pyx_n = 1;
    __pyx_t_17.dclass = Py_None;
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_17)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 924, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 924, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":925
 *     assert type(date_fr_dt(dt)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, datetime.date)) is datetime.date  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(date_fr_dt(dt, Date)) is Date  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 925, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_17.__pyx_n = 1;
    __pyx_t_17.dclass = __pyx_t_4;
    __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_17)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_14)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 925, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 925, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":926
 *     assert type(date_fr_dt(dt, None)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, datetime.date)) is datetime.date  # type: ignore
 *     assert type(date_fr_dt(dt, Date)) is Date  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     tmp = date_fr_ord(date.toordinal())  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 926, __pyx_L1_error)
    __pyx_t_17.__pyx_n = 1;
    __pyx_t_17.dclass = __pyx_v_Date;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_17)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 926, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_15 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_v_Date);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 926, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 926, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":928
 *     assert type(date_fr_dt(dt, Date)) is Date  # type: ignore
 * 
 *     tmp = date_fr_ord(date.toordinal())  # type: ignore             # <<<<<<<<<<<<<<
 *     assert date == tmp and type(tmp) is datetime.date
 * 
*/
  __pyx_t_14 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_14);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_18 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_ord(__pyx_t_18, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tmp = ((PyDateTime_Date *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":929
 * 
 *     tmp = date_fr_ord(date.toordinal())  # type: ignore
 *     assert date == tmp and type(tmp) is datetime.date             # <<<<<<<<<<<<<<
 * 
 *     tmp = date_fr_sec((date.toordinal() - EPOCH_DAY) * 86400)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_date, ((PyObject *)__pyx_v_tmp), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_19) {
    } else {
      __pyx_t_15 = __pyx_t_19;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_19 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_tmp))) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_15 = __pyx_t_19;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 929, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 929, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":931
 *     assert date == tmp and type(tmp) is datetime.date
 * 
 *     tmp = date_fr_sec((date.toordinal() - EPOCH_DAY) * 86400)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert date == tmp and type(tmp) is datetime.date
 * 
*/
  __pyx_t_14 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_14);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_14 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_7cytimes_5utils_EPOCH_DAY); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_13 = PyNumber_Subtract(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyLong_MultiplyObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_86400, 0x15180, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_20 = __Pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_sec(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF_SET(__pyx_v_tmp, ((PyDateTime_Date *)__pyx_t_14));
  __pyx_t_14 = 0;

  /* "cytimes/utils.py":932
 * 
 *     tmp = date_fr_sec((date.toordinal() - EPOCH_DAY) * 86400)  # type: ignore
 *     assert date == tmp and type(tmp) is datetime.date             # <<<<<<<<<<<<<<
 * 
 *     tmp = date_fr_us((date.toordinal() - EPOCH_DAY) * 86400_000000)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_14 = PyObject_RichCompare(__pyx_v_date, ((PyObject *)__pyx_v_tmp), Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 932, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (__pyx_t_19) {
    } else {
      __pyx_t_15 = __pyx_t_19;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_19 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_tmp))) == __pyx_t_14);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_15 = __pyx_t_19;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 932, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 932, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":934
 *     assert date == tmp and type(tmp) is datetime.date
 * 
 *     tmp = date_fr_us((date.toordinal() - EPOCH_DAY) * 86400_000000)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert date == tmp and type(tmp) is datetime.date
 * 
*/
  __pyx_t_13 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
    __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  __pyx_t_13 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_7cytimes_5utils_EPOCH_DAY); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = PyNumber_Multiply(__pyx_t_4, __pyx_mstate_global->__pyx_int_86400000000); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_21 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_13); if (unlikely((__pyx_t_21 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_us(__pyx_t_21, NULL)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF_SET(__pyx_v_tmp, ((PyDateTime_Date *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "cytimes/utils.py":935
 * 
 *     tmp = date_fr_us((date.toordinal() - EPOCH_DAY) * 86400_000000)  # type: ignore
 *     assert date == tmp and type(tmp) is datetime.date             # <<<<<<<<<<<<<<
 * 
 *     tmp = date_fr_ts(dt.timestamp())  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_13 = PyObject_RichCompare(__pyx_v_date, ((PyObject *)__pyx_v_tmp), Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 935, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_19) {
    } else {
      __pyx_t_15 = __pyx_t_19;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_19 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_tmp))) == __pyx_t_13);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_15 = __pyx_t_19;
    __pyx_L7_bool_binop_done:;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 935, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 935, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":937
 *     assert date == tmp and type(tmp) is datetime.date
 * 
 *     tmp = date_fr_ts(dt.timestamp())  # type: ignore             # <<<<<<<<<<<<<<
 *     assert date == tmp and type(tmp) is datetime.date
 * 
*/
  __pyx_t_4 = __pyx_v_dt;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __pyx_t_20 = __Pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_ts(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF_SET(__pyx_v_tmp, ((PyDateTime_Date *)__pyx_t_13));
  __pyx_t_13 = 0;

  /* "cytimes/utils.py":938
 * 
 *     tmp = date_fr_ts(dt.timestamp())  # type: ignore
 *     assert date == tmp and type(tmp) is datetime.date             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: date_conversion")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_13 = PyObject_RichCompare(__pyx_v_date, ((PyObject *)__pyx_v_tmp), Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 938, __pyx_L1_error)
    __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_19) {
    } else {
      __pyx_t_15 = __pyx_t_19;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_19 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_tmp))) == __pyx_t_13);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_15 = __pyx_t_19;
    __pyx_L9_bool_binop_done:;
    if (unlikely(!__pyx_t_15)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 938, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 938, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":940
 *     assert date == tmp and type(tmp) is datetime.date
 * 
 *     print("Passed: date_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Date
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_date_conversion};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "cytimes/utils.py":942
 *     print("Passed: date_conversion")
 * 
 *     del datetime, Date             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Date); __pyx_v_Date = 0;

  /* "cytimes/utils.py":886
 * 
 * 
 * def _test_date_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/

  /* 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_4);
  __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.utils._test_date_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Date);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_pdate);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":946
 * 
 * # datetime.datetime
 * def _test_dt_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_47_test_dt_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_47_test_dt_generate = {"_test_dt_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_47_test_dt_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_47_test_dt_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_46_test_dt_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_46_test_dt_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Timestamp = NULL;
  PyObject *__pyx_v_DateTime = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_dt_n = NULL;
  PyObject *__pyx_v_dt_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_dt_new __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_now __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_generate", 0);

  /* "cytimes/utils.py":947
 * # datetime.datetime
 * def _test_dt_generate() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pandas import Timestamp
 *     from pendulum import DateTime
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":948
 * def _test_dt_generate() -> None:
 *     import datetime
 *     from pandas import Timestamp             # <<<<<<<<<<<<<<
 *     from pendulum import DateTime
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Timestamp = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":949
 *     import datetime
 *     from pandas import Timestamp
 *     from pendulum import DateTime             # <<<<<<<<<<<<<<
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DateTime};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_DateTime};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_DateTime = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":951
 *     from pendulum import DateTime
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 * 
 *     # New
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 951, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 951, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":954
 * 
 *     # New
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[18], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 954, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 954, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":955
 *     # New
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new()  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[18], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.year = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 955, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 955, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 955, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":956
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new()  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[18], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 956, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 956, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 956, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":957
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[18], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __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 *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 957, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 957, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":958
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[19], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 958, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 958, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":959
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[20], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 5;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 959, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 959, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":960
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[21], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10.__pyx_n = 6;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 960, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 960, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":961
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[22], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __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 = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 961, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 961, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":962
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, None)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_v_tz};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_10.__pyx_n = 8;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 962, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 962, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":963
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, datetime.datetime)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 9;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 963, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 963, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":964
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, None)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, Timestamp)) is Timestamp  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 10;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.dtclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 964, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 964, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":965
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, datetime.datetime)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, Timestamp)) is Timestamp  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, DateTime)) is DateTime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10.__pyx_n = 10;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.dtclass = __pyx_t_1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 965, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 965, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":966
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, Timestamp)) is Timestamp  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, DateTime)) is DateTime  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 10;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.dtclass = __pyx_v_Timestamp;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_v_Timestamp);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 966, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 966, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":967
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, Timestamp)) is Timestamp  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0, DateTime)) is DateTime  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Now
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 10;
    __pyx_t_10.year = 1;
    __pyx_t_10.month = 1;
    __pyx_t_10.day = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.dtclass = __pyx_v_DateTime;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_v_DateTime);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 967, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 967, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":971
 *     # Now
 *     for dt_n, dt_c in (
 *         (datetime.datetime.now(), dt_now()),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC), dt_now(UTC)),  # type: ignore
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":972
 *     for dt_n, dt_c in (
 *         (datetime.datetime.now(), dt_now()),  # type: ignore
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(UTC), dt_now(UTC)),  # type: ignore
 *         (datetime.datetime.now(tz), dt_now(tz)),  # type: ignore
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__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(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.tzinfo = Py_None;
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_11)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 972, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 972, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":973
 *         (datetime.datetime.now(), dt_now()),  # type: ignore
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC), dt_now(UTC)),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(tz), dt_now(tz)),  # type: ignore
 *     ):
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
    __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __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_8)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_t_6 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.tzinfo = __pyx_t_6;
  __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 973, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 973, __pyx_L1_error);
  __pyx_t_8 = 0;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":974
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC), dt_now(UTC)),  # type: ignore
 *         (datetime.datetime.now(tz), dt_now(tz)),  # type: ignore             # <<<<<<<<<<<<<<
 *     ):
 *         assert (
*/
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = __pyx_t_12;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_tz};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.tzinfo = __pyx_v_tz;
  __pyx_t_12 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_now(&__pyx_t_11)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 974, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_12) != (0)) __PYX_ERR(0, 974, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_12 = 0;

  /* "cytimes/utils.py":971
 *     # Now
 *     for dt_n, dt_c in (
 *         (datetime.datetime.now(), dt_now()),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC), dt_now(UTC)),  # type: ignore
*/
  __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_8) != (0)) __PYX_ERR(0, 971, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":970
 * 
 *     # Now
 *     for dt_n, dt_c in (             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(), dt_now()),  # type: ignore
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
*/
  __pyx_t_8 = __pyx_t_12; __Pyx_INCREF(__pyx_t_8);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  for (;;) {
    if (__pyx_t_3 >= 4) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_12 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_3));
    #else
    __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (likely(__pyx_t_12 != Py_None)) {
      PyObject* sequence = __pyx_t_12;
      Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 970, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 970, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_dt_n, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dt_c, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":976
 *         (datetime.datetime.now(tz), dt_now(tz)),  # type: ignore
 *     ):
 *         assert (             # <<<<<<<<<<<<<<
 *             (dt_n.year == dt_c.year)
 *             and (dt_n.month == dt_c.month)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":977
 *     ):
 *         assert (
 *             (dt_n.year == dt_c.year)             # <<<<<<<<<<<<<<
 *             and (dt_n.month == dt_c.month)
 *             and (dt_n.day == dt_c.day)
*/
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":978
 *         assert (
 *             (dt_n.year == dt_c.year)
 *             and (dt_n.month == dt_c.month)             # <<<<<<<<<<<<<<
 *             and (dt_n.day == dt_c.day)
 *             and (dt_n.hour == dt_c.hour)
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 978, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 978, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":979
 *             (dt_n.year == dt_c.year)
 *             and (dt_n.month == dt_c.month)
 *             and (dt_n.day == dt_c.day)             # <<<<<<<<<<<<<<
 *             and (dt_n.hour == dt_c.hour)
 *             and (dt_n.minute == dt_c.minute)
*/
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_day); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":980
 *             and (dt_n.month == dt_c.month)
 *             and (dt_n.day == dt_c.day)
 *             and (dt_n.hour == dt_c.hour)             # <<<<<<<<<<<<<<
 *             and (dt_n.minute == dt_c.minute)
 *             and (dt_n.second == dt_c.second)
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":981
 *             and (dt_n.day == dt_c.day)
 *             and (dt_n.hour == dt_c.hour)
 *             and (dt_n.minute == dt_c.minute)             # <<<<<<<<<<<<<<
 *             and (dt_n.second == dt_c.second)
 *             and (-1000 < dt_n.microsecond - dt_c.microsecond < 1000)
*/
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_12, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":982
 *             and (dt_n.hour == dt_c.hour)
 *             and (dt_n.minute == dt_c.minute)
 *             and (dt_n.second == dt_c.second)             # <<<<<<<<<<<<<<
 *             and (-1000 < dt_n.microsecond - dt_c.microsecond < 1000)
 *             and (dt_n.tzinfo == dt_c.tzinfo)
*/
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":983
 *             and (dt_n.minute == dt_c.minute)
 *             and (dt_n.second == dt_c.second)
 *             and (-1000 < dt_n.microsecond - dt_c.microsecond < 1000)             # <<<<<<<<<<<<<<
 *             and (dt_n.tzinfo == dt_c.tzinfo)
 *         ), f"{dt_n} != {dt_c}"
*/
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_Subtract(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_1000, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
      if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_mstate_global->__pyx_int_1000, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_13) {
      } else {
        __pyx_t_9 = __pyx_t_13;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":984
 *             and (dt_n.second == dt_c.second)
 *             and (-1000 < dt_n.microsecond - dt_c.microsecond < 1000)
 *             and (dt_n.tzinfo == dt_c.tzinfo)             # <<<<<<<<<<<<<<
 *         ), f"{dt_n} != {dt_c}"
 * 
*/
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_n, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt_c, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_9 = __pyx_t_13;
      __pyx_L5_bool_binop_done:;
      if (unlikely(!__pyx_t_9)) {

        /* "cytimes/utils.py":985
 *             and (-1000 < dt_n.microsecond - dt_c.microsecond < 1000)
 *             and (dt_n.tzinfo == dt_c.tzinfo)
 *         ), f"{dt_n} != {dt_c}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_generate")
*/
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_dt_n, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_dt_c, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_14[0] = __pyx_t_12;
        __pyx_t_14[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_14[2] = __pyx_t_6;
        __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_14, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_1, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 976, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 976, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":970
 * 
 *     # Now
 *     for dt_n, dt_c in (             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(), dt_now()),  # type: ignore
 *         (datetime.datetime.now(), dt_now(None)),  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/utils.py":987
 *         ), f"{dt_n} != {dt_c}"
 * 
 *     print("Passed: dt_generate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Timestamp, DateTime
*/
  __pyx_t_1 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Passed_dt_generate};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/utils.py":989
 *     print("Passed: dt_generate")
 * 
 *     del datetime, Timestamp, DateTime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Timestamp); __pyx_v_Timestamp = 0;
  __Pyx_DECREF(__pyx_v_DateTime); __pyx_v_DateTime = 0;

  /* "cytimes/utils.py":946
 * 
 * # datetime.datetime
 * def _test_dt_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils._test_dt_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Timestamp);
  __Pyx_XDECREF(__pyx_v_DateTime);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_dt_n);
  __Pyx_XDECREF(__pyx_v_dt_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":992
 * 
 * 
 * def _test_dt_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_49_test_dt_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_49_test_dt_type_check = {"_test_dt_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_49_test_dt_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_49_test_dt_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_48_test_dt_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_48_test_dt_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_CustomDateTime = NULL;
  PyObject *__pyx_v_dt = 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;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_type_check", 0);

  /* "cytimes/utils.py":993
 * 
 * def _test_dt_type_check() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     class CustomDateTime(datetime.datetime):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":995
 *     import datetime
 * 
 *     class CustomDateTime(datetime.datetime):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 995, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomDateTime, __pyx_mstate_global->__pyx_n_u_test_dt_type_check_locals_Custo, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_1 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 995, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CustomDateTime, __pyx_t_1, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_CustomDateTime = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":998
 *         pass
 * 
 *     dt = datetime.datetime.now()             # <<<<<<<<<<<<<<
 *     assert is_dt(dt)  # type: ignore
 *     assert is_dt_exact(dt)  # type: ignore
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_t_5;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_dt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":999
 * 
 *     dt = datetime.datetime.now()
 *     assert is_dt(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_dt_exact(dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt(__pyx_v_dt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 999, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 999, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 999, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1000
 *     dt = datetime.datetime.now()
 *     assert is_dt(dt)  # type: ignore
 *     assert is_dt_exact(dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt = CustomDateTime(1, 1, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt_exact(__pyx_v_dt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1000, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1000, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1000, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1002
 *     assert is_dt_exact(dt)  # type: ignore
 * 
 *     dt = CustomDateTime(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_dt(dt)  # type: ignore
 *     assert not is_dt_exact(dt)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_CustomDateTime, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1003
 * 
 *     dt = CustomDateTime(1, 1, 1)
 *     assert is_dt(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_dt_exact(dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt(__pyx_v_dt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1003, __pyx_L1_error)
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1003, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1003, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1004
 *     dt = CustomDateTime(1, 1, 1)
 *     assert is_dt(dt)  # type: ignore
 *     assert not is_dt_exact(dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt_exact(__pyx_v_dt); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1004, __pyx_L1_error)
    __pyx_t_8 = (!__pyx_t_7);
    if (unlikely(!__pyx_t_8)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1004, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1004, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1006
 *     assert not is_dt_exact(dt)  # type: ignore
 * 
 *     print("Passed: dt_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del CustomDateTime, datetime
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_dt_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1008
 *     print("Passed: dt_type_check")
 * 
 *     del CustomDateTime, datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_CustomDateTime); __pyx_v_CustomDateTime = 0;
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":992
 * 
 * 
 * def _test_dt_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_dt_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_CustomDateTime);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1011
 * 
 * 
 * def _test_dt_tzinfo() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_51_test_dt_tzinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_51_test_dt_tzinfo = {"_test_dt_tzinfo", (PyCFunction)__pyx_pw_7cytimes_5utils_51_test_dt_tzinfo, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_51_test_dt_tzinfo(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_tzinfo (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_50_test_dt_tzinfo(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_50_test_dt_tzinfo(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_dt_tz1 = NULL;
  PyObject *__pyx_v_dt_tz2 = NULL;
  PyObject *__pyx_v_t = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_tzinfo", 0);

  /* "cytimes/utils.py":1012
 * 
 * def _test_dt_tzinfo() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1014
 *     import datetime
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[23], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1015
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz)
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_tz = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1016
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz)             # <<<<<<<<<<<<<<
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_6, (9-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_dt_tz1 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1017
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz)
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))             # <<<<<<<<<<<<<<
 * 
 *     for t in (dt, dt_tz1, dt_tz2):
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = 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_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_4, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_6, (9-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_dt_tz2 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1019
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
 *     for t in (dt, dt_tz1, dt_tz2):             # <<<<<<<<<<<<<<
 *         assert t.tzname() == dt_tzname(t)  # type: ignore
 *         assert t.dst() == dt_dst(t)  # type: ignore
*/
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dt);
  __Pyx_GIVEREF(__pyx_v_dt);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dt) != (0)) __PYX_ERR(0, 1019, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz1);
  __Pyx_GIVEREF(__pyx_v_dt_tz1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_dt_tz1) != (0)) __PYX_ERR(0, 1019, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz2);
  __Pyx_GIVEREF(__pyx_v_dt_tz2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_dt_tz2) != (0)) __PYX_ERR(0, 1019, __pyx_L1_error);
  __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_9 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9);
    #endif
    ++__pyx_t_9;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":1020
 * 
 *     for t in (dt, dt_tz1, dt_tz2):
 *         assert t.tzname() == dt_tzname(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert t.dst() == dt_dst(t)  # type: ignore
 *         assert t.utcoffset() == dt_utcoffset(t)  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_v_t;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_tzname, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_v_t) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1020, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7cytimes_5utils_dt_tzname(((PyDateTime_DateTime *)__pyx_v_t)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1020, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1020, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1020, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1021
 *     for t in (dt, dt_tz1, dt_tz2):
 *         assert t.tzname() == dt_tzname(t)  # type: ignore
 *         assert t.dst() == dt_dst(t)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert t.utcoffset() == dt_utcoffset(t)  # type: ignore
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __pyx_v_t;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dst, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (!(likely(((__pyx_v_t) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1021, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_dst(((PyDateTime_DateTime *)__pyx_v_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1021, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1021, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1022
 *         assert t.tzname() == dt_tzname(t)  # type: ignore
 *         assert t.dst() == dt_dst(t)  # type: ignore
 *         assert t.utcoffset() == dt_utcoffset(t)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_tzinfo")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __pyx_v_t;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_utcoffset, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1022, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
      }
      if (!(likely(((__pyx_v_t) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1022, __pyx_L1_error)
      __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_utcoffset(((PyDateTime_DateTime *)__pyx_v_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1022, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1022, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1019
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
 *     for t in (dt, dt_tz1, dt_tz2):             # <<<<<<<<<<<<<<
 *         assert t.tzname() == dt_tzname(t)  # type: ignore
 *         assert t.dst() == dt_dst(t)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1024
 *         assert t.utcoffset() == dt_utcoffset(t)  # type: ignore
 * 
 *     print("Passed: dt_tzinfo")             # <<<<<<<<<<<<<<
 * 
 *     del datetime
*/
  __pyx_t_4 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_dt_tzinfo};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1026
 *     print("Passed: dt_tzinfo")
 * 
 *     del datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1011
 * 
 * 
 * def _test_dt_tzinfo() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._test_dt_tzinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_dt_tz1);
  __Pyx_XDECREF(__pyx_v_dt_tz2);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1029
 * 
 * 
 * def _test_dt_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_53_test_dt_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_53_test_dt_conversion = {"_test_dt_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_53_test_dt_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_53_test_dt_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_52_test_dt_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_52_test_dt_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Timestamp = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_tz1 = NULL;
  PyObject *__pyx_v_dt_tz1 = NULL;
  PyObject *__pyx_v_tz2 = NULL;
  PyObject *__pyx_v_dt_tz2 = NULL;
  PyObject *__pyx_v_tz3 = NULL;
  PyObject *__pyx_v_dt_tz3 = NULL;
  PyObject *__pyx_v_dt_tz4 = NULL;
  PyObject *__pyx_v_d = NULL;
  struct tm __pyx_v__tm;
  PyObject *__pyx_v_secs = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_us = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_date = NULL;
  PyObject *__pyx_v_time1 = NULL;
  PyObject *__pyx_v_time2 = NULL;
  PyObject *__pyx_v_tmp = NULL;
  PyObject *__pyx_v_tmp1 = NULL;
  PyObject *__pyx_v_tmp2 = NULL;
  PyObject *__pyx_v_tmp3 = NULL;
  PyObject *__pyx_v_tz4 = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_dt_ = NULL;
  PyObject *__pyx_v_ts = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct tm __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_tm __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_t_18;
  struct __pyx_opt_args_7cytimes_5utils_dt_isoformat __pyx_t_19;
  PY_LONG_LONG __pyx_t_20;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_ord __pyx_t_21;
  double __pyx_t_22;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_sec __pyx_t_23;
  struct __pyx_opt_args_7cytimes_5utils_dt_to_us __pyx_t_24;
  struct __pyx_opt_args_7cytimes_5utils_dt_combine __pyx_t_25;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_date __pyx_t_26;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_dt __pyx_t_27;
  int __pyx_t_28;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_sec __pyx_t_29;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_us __pyx_t_30;
  struct __pyx_opt_args_7cytimes_5utils_dt_fr_ts __pyx_t_31;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_conversion", 0);

  /* "cytimes/utils.py":1030
 * 
 * def _test_dt_conversion() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pandas import Timestamp
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1031
 * def _test_dt_conversion() -> None:
 *     import datetime
 *     from pandas import Timestamp             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Timestamp};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Timestamp = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1033
 *     from pandas import Timestamp
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz1)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[23], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1034
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz1)
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1034, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_tz1 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1035
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz1)             # <<<<<<<<<<<<<<
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz2)
*/
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz1};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_dt_tz1 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1036
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz1)
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz2)
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
*/
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_8 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1036, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_6, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __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_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_tz2 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1037
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz1)
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz2)             # <<<<<<<<<<<<<<
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     dt_tz3 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz3)
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_1, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz2};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_dt_tz2 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1038
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz2)
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))             # <<<<<<<<<<<<<<
 *     dt_tz3 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz3)
 *     dt_tz4 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_23, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1038, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_59, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1038, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 1038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_tz3 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1039
 *     dt_tz2 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz2)
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     dt_tz3 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz3)             # <<<<<<<<<<<<<<
 *     dt_tz4 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
*/
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz3};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_dt_tz3 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1040
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     dt_tz3 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz3)
 *     dt_tz4 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))             # <<<<<<<<<<<<<<
 * 
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
*/
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_8);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_t_1};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_dt_tz4 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1042
 *     dt_tz4 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):             # <<<<<<<<<<<<<<
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (
*/
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_dt);
  __Pyx_GIVEREF(__pyx_v_dt);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_dt) != (0)) __PYX_ERR(0, 1042, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz1);
  __Pyx_GIVEREF(__pyx_v_dt_tz1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_dt_tz1) != (0)) __PYX_ERR(0, 1042, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz2);
  __Pyx_GIVEREF(__pyx_v_dt_tz2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_dt_tz2) != (0)) __PYX_ERR(0, 1042, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz3);
  __Pyx_GIVEREF(__pyx_v_dt_tz3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_dt_tz3) != (0)) __PYX_ERR(0, 1042, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz4);
  __Pyx_GIVEREF(__pyx_v_dt_tz4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_dt_tz4) != (0)) __PYX_ERR(0, 1042, __pyx_L1_error);
  __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_3 >= 5) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1043
 * 
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
 *         _tm = dt_to_tm(d, False)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert tuple(d.timetuple()) == (
 *             _tm.tm_year,
*/
    if (!(likely(((__pyx_v_d) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_d, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1043, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.utc = 0;
    __pyx_t_10 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_d), &__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L1_error)
    __pyx_v__tm = __pyx_t_10;

    /* "cytimes/utils.py":1044
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (             # <<<<<<<<<<<<<<
 *             _tm.tm_year,
 *             _tm.tm_mon,
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __pyx_v_d;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timetuple, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1044, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cytimes/utils.py":1045
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (
 *             _tm.tm_year,             # <<<<<<<<<<<<<<
 *             _tm.tm_mon,
 *             _tm.tm_mday,
*/
      __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "cytimes/utils.py":1046
 *         assert tuple(d.timetuple()) == (
 *             _tm.tm_year,
 *             _tm.tm_mon,             # <<<<<<<<<<<<<<
 *             _tm.tm_mday,
 *             _tm.tm_hour,
*/
      __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytimes/utils.py":1047
 *             _tm.tm_year,
 *             _tm.tm_mon,
 *             _tm.tm_mday,             # <<<<<<<<<<<<<<
 *             _tm.tm_hour,
 *             _tm.tm_min,
*/
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/utils.py":1048
 *             _tm.tm_mon,
 *             _tm.tm_mday,
 *             _tm.tm_hour,             # <<<<<<<<<<<<<<
 *             _tm.tm_min,
 *             _tm.tm_sec,
*/
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "cytimes/utils.py":1049
 *             _tm.tm_mday,
 *             _tm.tm_hour,
 *             _tm.tm_min,             # <<<<<<<<<<<<<<
 *             _tm.tm_sec,
 *             _tm.tm_wday,
*/
      __pyx_t_12 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);

      /* "cytimes/utils.py":1050
 *             _tm.tm_hour,
 *             _tm.tm_min,
 *             _tm.tm_sec,             # <<<<<<<<<<<<<<
 *             _tm.tm_wday,
 *             _tm.tm_yday,
*/
      __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_sec); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/utils.py":1051
 *             _tm.tm_min,
 *             _tm.tm_sec,
 *             _tm.tm_wday,             # <<<<<<<<<<<<<<
 *             _tm.tm_yday,
 *             _tm.tm_isdst,
*/
      __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1051, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/utils.py":1052
 *             _tm.tm_sec,
 *             _tm.tm_wday,
 *             _tm.tm_yday,             # <<<<<<<<<<<<<<
 *             _tm.tm_isdst,
 *         )
*/
      __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);

      /* "cytimes/utils.py":1053
 *             _tm.tm_wday,
 *             _tm.tm_yday,
 *             _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *         )
 *         _tm = dt_to_tm(d, True)  # type: ignore
*/
      __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);

      /* "cytimes/utils.py":1045
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (
 *             _tm.tm_year,             # <<<<<<<<<<<<<<
 *             _tm.tm_mon,
 *             _tm.tm_mday,
*/
      __pyx_t_17 = PyTuple_New(9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_12) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_13) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_14);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_14) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_15);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_15) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_16);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_16) != (0)) __PYX_ERR(0, 1045, __pyx_L1_error);
      __pyx_t_4 = 0;
      __pyx_t_9 = 0;
      __pyx_t_8 = 0;
      __pyx_t_6 = 0;
      __pyx_t_12 = 0;
      __pyx_t_13 = 0;
      __pyx_t_14 = 0;
      __pyx_t_15 = 0;
      __pyx_t_16 = 0;
      __pyx_t_16 = PyObject_RichCompare(__pyx_t_5, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

      /* "cytimes/utils.py":1044
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (             # <<<<<<<<<<<<<<
 *             _tm.tm_year,
 *             _tm.tm_mon,
*/
      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_18)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1044, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1044, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1055
 *             _tm.tm_isdst,
 *         )
 *         _tm = dt_to_tm(d, True)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert tuple(d.utctimetuple()) == (
 *             _tm.tm_year,
*/
    if (!(likely(((__pyx_v_d) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_d, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1055, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.utc = 1;
    __pyx_t_10 = __pyx_f_7cytimes_5utils_dt_to_tm(((PyDateTime_DateTime *)__pyx_v_d), &__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L1_error)
    __pyx_v__tm = __pyx_t_10;

    /* "cytimes/utils.py":1056
 *         )
 *         _tm = dt_to_tm(d, True)  # type: ignore
 *         assert tuple(d.utctimetuple()) == (             # <<<<<<<<<<<<<<
 *             _tm.tm_year,
 *             _tm.tm_mon,
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_17 = __pyx_v_d;
      __Pyx_INCREF(__pyx_t_17);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL};
        __pyx_t_16 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_utctimetuple, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1056, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
      }
      __pyx_t_17 = __Pyx_PySequence_Tuple(__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "cytimes/utils.py":1057
 *         _tm = dt_to_tm(d, True)  # type: ignore
 *         assert tuple(d.utctimetuple()) == (
 *             _tm.tm_year,             # <<<<<<<<<<<<<<
 *             _tm.tm_mon,
 *             _tm.tm_mday,
*/
      __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_year); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);

      /* "cytimes/utils.py":1058
 *         assert tuple(d.utctimetuple()) == (
 *             _tm.tm_year,
 *             _tm.tm_mon,             # <<<<<<<<<<<<<<
 *             _tm.tm_mday,
 *             _tm.tm_hour,
*/
      __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mon); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "cytimes/utils.py":1059
 *             _tm.tm_year,
 *             _tm.tm_mon,
 *             _tm.tm_mday,             # <<<<<<<<<<<<<<
 *             _tm.tm_hour,
 *             _tm.tm_min,
*/
      __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_mday); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1059, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);

      /* "cytimes/utils.py":1060
 *             _tm.tm_mon,
 *             _tm.tm_mday,
 *             _tm.tm_hour,             # <<<<<<<<<<<<<<
 *             _tm.tm_min,
 *             _tm.tm_sec,
*/
      __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_hour); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);

      /* "cytimes/utils.py":1061
 *             _tm.tm_mday,
 *             _tm.tm_hour,
 *             _tm.tm_min,             # <<<<<<<<<<<<<<
 *             _tm.tm_sec,
 *             _tm.tm_wday,
*/
      __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_min); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1061, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);

      /* "cytimes/utils.py":1062
 *             _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, 1062, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);

      /* "cytimes/utils.py":1063
 *             _tm.tm_min,
 *             _tm.tm_sec,
 *             _tm.tm_wday,             # <<<<<<<<<<<<<<
 *             _tm.tm_yday,
 *             _tm.tm_isdst,
*/
      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_wday); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "cytimes/utils.py":1064
 *             _tm.tm_sec,
 *             _tm.tm_wday,
 *             _tm.tm_yday,             # <<<<<<<<<<<<<<
 *             _tm.tm_isdst,
 *         )
*/
      __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_yday); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

      /* "cytimes/utils.py":1065
 *             _tm.tm_wday,
 *             _tm.tm_yday,
 *             _tm.tm_isdst,             # <<<<<<<<<<<<<<
 *         )
 * 
*/
      __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v__tm.tm_isdst); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cytimes/utils.py":1057
 *         _tm = dt_to_tm(d, True)  # type: ignore
 *         assert tuple(d.utctimetuple()) == (
 *             _tm.tm_year,             # <<<<<<<<<<<<<<
 *             _tm.tm_mon,
 *             _tm.tm_mday,
*/
      __pyx_t_4 = PyTuple_New(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_16);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_16) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_15);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_15) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_14);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_14) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_13) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_12) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_6) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_8) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_t_9) != (0)) __PYX_ERR(0, 1057, __pyx_L1_error);
      __pyx_t_16 = 0;
      __pyx_t_5 = 0;
      __pyx_t_15 = 0;
      __pyx_t_14 = 0;
      __pyx_t_13 = 0;
      __pyx_t_12 = 0;
      __pyx_t_6 = 0;
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_17, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1056, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cytimes/utils.py":1056
 *         )
 *         _tm = dt_to_tm(d, True)  # type: ignore
 *         assert tuple(d.utctimetuple()) == (             # <<<<<<<<<<<<<<
 *             _tm.tm_year,
 *             _tm.tm_mon,
*/
      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1056, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_18)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1056, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1056, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1042
 *     dt_tz4 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, zoneinfo.ZoneInfo("CET"))
 * 
 *     for d in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):             # <<<<<<<<<<<<<<
 *         _tm = dt_to_tm(d, False)  # type: ignore
 *         assert tuple(d.timetuple()) == (
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1068
 *         )
 * 
 *     assert "01/02/2021 000006.05-04-03" == dt_strformat(dt, "%m/%d/%Y %f.%S-%M-%H")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "01/02/2021 000006.05-04-03+0101" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%z")  # type: ignore
 *     assert "01/02/2021 000006.05-04-03UTC+01:01" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%Z")  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1068, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_strformat(((PyDateTime_DateTime *)__pyx_v_dt), __pyx_mstate_global->__pyx_kp_u_m_d_Y_f_S_M_H); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_01_02_2021_000006_05_04_03, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1068, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1068, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1068, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1069
 * 
 *     assert "01/02/2021 000006.05-04-03" == dt_strformat(dt, "%m/%d/%Y %f.%S-%M-%H")  # type: ignore
 *     assert "01/02/2021 000006.05-04-03+0101" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%z")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "01/02/2021 000006.05-04-03UTC+01:01" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%Z")  # type: ignore
 *     assert "2021-01-02T03:04:05.000006" == dt_isoformat(dt_tz1, "T", False)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1069, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_strformat(((PyDateTime_DateTime *)__pyx_v_dt_tz1), __pyx_mstate_global->__pyx_kp_u_m_d_Y_f_S_M_H_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_01_02_2021_000006_05_04_03_0101, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1069, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1069, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1070
 *     assert "01/02/2021 000006.05-04-03" == dt_strformat(dt, "%m/%d/%Y %f.%S-%M-%H")  # type: ignore
 *     assert "01/02/2021 000006.05-04-03+0101" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%z")  # type: ignore
 *     assert "01/02/2021 000006.05-04-03UTC+01:01" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%Z")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "2021-01-02T03:04:05.000006" == dt_isoformat(dt_tz1, "T", False)  # type: ignore
 *     assert "2021-01-02T03:04:05" == dt_isoformat(dt_tz1.replace(microsecond=0), "T", False)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1070, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_strformat(((PyDateTime_DateTime *)__pyx_v_dt_tz1), __pyx_mstate_global->__pyx_kp_u_m_d_Y_f_S_M_H_Z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_01_02_2021_000006_05_04_03UTC_01, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1070, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1070, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1070, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1071
 *     assert "01/02/2021 000006.05-04-03+0101" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%z")  # type: ignore
 *     assert "01/02/2021 000006.05-04-03UTC+01:01" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%Z")  # type: ignore
 *     assert "2021-01-02T03:04:05.000006" == dt_isoformat(dt_tz1, "T", False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "2021-01-02T03:04:05" == dt_isoformat(dt_tz1.replace(microsecond=0), "T", False)  # type: ignore
 *     assert "2021-01-02 03:04:05.000006+0101" == dt_isoformat(dt_tz1, " ", True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1071, __pyx_L1_error)
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.sep = __pyx_mstate_global->__pyx_n_u_T;
    __pyx_t_19.utc = 0;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_dt_isoformat(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2021_01_02T03_04_05_000006, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1071, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1071, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1071, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1072
 *     assert "01/02/2021 000006.05-04-03UTC+01:01" == dt_strformat(dt_tz1, "%m/%d/%Y %f.%S-%M-%H%Z")  # type: ignore
 *     assert "2021-01-02T03:04:05.000006" == dt_isoformat(dt_tz1, "T", False)  # type: ignore
 *     assert "2021-01-02T03:04:05" == dt_isoformat(dt_tz1.replace(microsecond=0), "T", False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "2021-01-02 03:04:05.000006+0101" == dt_isoformat(dt_tz1, " ", True)  # type: ignore
 *     assert "2021-01-02 03:04:05+0101" == dt_isoformat(dt_tz1.replace(microsecond=0), " ", True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_v_dt_tz1;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, NULL};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_0, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1072, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __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(0, 1072, __pyx_L1_error)
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.sep = __pyx_mstate_global->__pyx_n_u_T;
    __pyx_t_19.utc = 0;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_dt_isoformat(((PyDateTime_DateTime *)__pyx_t_1), &__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2021_01_02T03_04_05, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1072, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1072, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1073
 *     assert "2021-01-02T03:04:05.000006" == dt_isoformat(dt_tz1, "T", False)  # type: ignore
 *     assert "2021-01-02T03:04:05" == dt_isoformat(dt_tz1.replace(microsecond=0), "T", False)  # type: ignore
 *     assert "2021-01-02 03:04:05.000006+0101" == dt_isoformat(dt_tz1, " ", True)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "2021-01-02 03:04:05+0101" == dt_isoformat(dt_tz1.replace(microsecond=0), " ", True)  # type: ignore
 *     assert dt.toordinal() == dt_to_ord(dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1073, __pyx_L1_error)
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.sep = __pyx_mstate_global->__pyx_kp_u__8;
    __pyx_t_19.utc = 1;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_dt_isoformat(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2021_01_02_03_04_05_000006_0101, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1073, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1073, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1073, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1074
 *     assert "2021-01-02T03:04:05" == dt_isoformat(dt_tz1.replace(microsecond=0), "T", False)  # type: ignore
 *     assert "2021-01-02 03:04:05.000006+0101" == dt_isoformat(dt_tz1, " ", True)  # type: ignore
 *     assert "2021-01-02 03:04:05+0101" == dt_isoformat(dt_tz1.replace(microsecond=0), " ", True)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt.toordinal() == dt_to_ord(dt)  # type: ignore
 *     assert dt_tz2.toordinal() == dt_to_ord(dt_tz2, False)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_v_dt_tz1;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_0, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1074, __pyx_L1_error)
    __pyx_t_19.__pyx_n = 2;
    __pyx_t_19.sep = __pyx_mstate_global->__pyx_kp_u__8;
    __pyx_t_19.utc = 1;
    __pyx_t_9 = __pyx_f_7cytimes_5utils_dt_isoformat(((PyDateTime_DateTime *)__pyx_t_4), &__pyx_t_19); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2021_01_02_03_04_05_0101, __pyx_t_9, Py_EQ)); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1074, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1074, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1075
 *     assert "2021-01-02 03:04:05.000006+0101" == dt_isoformat(dt_tz1, " ", True)  # type: ignore
 *     assert "2021-01-02 03:04:05+0101" == dt_isoformat(dt_tz1.replace(microsecond=0), " ", True)  # type: ignore
 *     assert dt.toordinal() == dt_to_ord(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz2.toordinal() == dt_to_ord(dt_tz2, False)  # type: ignore
 *     assert dt_tz2.toordinal() - 1 == dt_to_ord(dt_tz2, True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_dt;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1075, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1075, __pyx_L1_error)
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt), NULL); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1075, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1075, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1075, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1076
 *     assert "2021-01-02 03:04:05+0101" == dt_isoformat(dt_tz1.replace(microsecond=0), " ", True)  # type: ignore
 *     assert dt.toordinal() == dt_to_ord(dt)  # type: ignore
 *     assert dt_tz2.toordinal() == dt_to_ord(dt_tz2, False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz2.toordinal() - 1 == dt_to_ord(dt_tz2, True)  # type: ignore
 *     assert dt_tz3.toordinal() == dt_to_ord(dt_tz3, False)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_dt_tz2;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_v_dt_tz2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1076, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz2), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1076, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1076, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1076, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1077
 *     assert dt.toordinal() == dt_to_ord(dt)  # type: ignore
 *     assert dt_tz2.toordinal() == dt_to_ord(dt_tz2, False)  # type: ignore
 *     assert dt_tz2.toordinal() - 1 == dt_to_ord(dt_tz2, True)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz3.toordinal() == dt_to_ord(dt_tz3, False)  # type: ignore
 *     assert dt_tz3.toordinal() + 1 == dt_to_ord(dt_tz3, True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_dt_tz2;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    __pyx_t_4 = __Pyx_PyLong_SubtractObjC(__pyx_t_9, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (!(likely(((__pyx_v_dt_tz2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1077, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 1;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz2), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1077, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1077, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1077, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1077, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1078
 *     assert dt_tz2.toordinal() == dt_to_ord(dt_tz2, False)  # type: ignore
 *     assert dt_tz2.toordinal() - 1 == dt_to_ord(dt_tz2, True)  # type: ignore
 *     assert dt_tz3.toordinal() == dt_to_ord(dt_tz3, False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz3.toordinal() + 1 == dt_to_ord(dt_tz3, True)  # type: ignore
 *     secs = (
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_v_dt_tz3;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_v_dt_tz3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1078, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz3), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1078, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1078, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1078, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1078, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1079
 *     assert dt_tz2.toordinal() - 1 == dt_to_ord(dt_tz2, True)  # type: ignore
 *     assert dt_tz3.toordinal() == dt_to_ord(dt_tz3, False)  # type: ignore
 *     assert dt_tz3.toordinal() + 1 == dt_to_ord(dt_tz3, True)  # type: ignore             # <<<<<<<<<<<<<<
 *     secs = (
 *         (dt.toordinal() - EPOCH_DAY) * 86400
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __pyx_v_dt_tz3;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_v_dt_tz3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1079, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 1;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz3), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1079, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1079, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1079, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1081
 *     assert dt_tz3.toordinal() + 1 == dt_to_ord(dt_tz3, True)  # type: ignore
 *     secs = (
 *         (dt.toordinal() - EPOCH_DAY) * 86400             # <<<<<<<<<<<<<<
 *         + dt.hour * 3600
 *         + dt.minute * 60
*/
  __pyx_t_4 = __pyx_v_dt;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_7cytimes_5utils_EPOCH_DAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyNumber_Subtract(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_9, __pyx_mstate_global->__pyx_int_86400, 0x15180, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/utils.py":1082
 *     secs = (
 *         (dt.toordinal() - EPOCH_DAY) * 86400
 *         + dt.hour * 3600             # <<<<<<<<<<<<<<
 *         + dt.minute * 60
 *         + dt.second
*/
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyLong_MultiplyObjC(__pyx_t_9, __pyx_mstate_global->__pyx_int_3600, 0xE10, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1083
 *         (dt.toordinal() - EPOCH_DAY) * 86400
 *         + dt.hour * 3600
 *         + dt.minute * 60             # <<<<<<<<<<<<<<
 *         + dt.second
 *         + dt.microsecond / 1_000_000
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1084
 *         + dt.hour * 3600
 *         + dt.minute * 60
 *         + dt.second             # <<<<<<<<<<<<<<
 *         + dt.microsecond / 1_000_000
 *     )
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1085
 *         + dt.minute * 60
 *         + dt.second
 *         + dt.microsecond / 1_000_000             # <<<<<<<<<<<<<<
 *     )
 *     assert secs == dt_to_sec(dt)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyLong_TrueDivideObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_secs = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1087
 *         + dt.microsecond / 1_000_000
 *     )
 *     assert secs == dt_to_sec(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert secs == dt_to_sec(dt_tz1, False)  # type: ignore
 *     offset = datetime.timedelta(hours=1, minutes=1).total_seconds()
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1087, __pyx_L1_error)
    __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_dt), NULL); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
    __pyx_t_4 = PyFloat_FromDouble(__pyx_t_22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1087, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1087, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1087, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1088
 *     )
 *     assert secs == dt_to_sec(dt)  # type: ignore
 *     assert secs == dt_to_sec(dt_tz1, False)  # type: ignore             # <<<<<<<<<<<<<<
 *     offset = datetime.timedelta(hours=1, minutes=1).total_seconds()
 *     assert secs - offset == dt_to_sec(dt_tz1, True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1088, __pyx_L1_error)
    __pyx_t_23.__pyx_n = 1;
    __pyx_t_23.utc = 0;
    __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_23); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1088, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1088, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1089
 *     assert secs == dt_to_sec(dt)  # type: ignore
 *     assert secs == dt_to_sec(dt_tz1, False)  # type: ignore
 *     offset = datetime.timedelta(hours=1, minutes=1).total_seconds()             # <<<<<<<<<<<<<<
 *     assert secs - offset == dt_to_sec(dt_tz1, True)  # type: ignore
 *     us = int(secs * 1_000_000)
*/
  __pyx_t_17 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_17);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_17, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1089, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_1 = __pyx_t_9;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_seconds, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__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_4)) __PYX_ERR(0, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_offset = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1090
 *     assert secs == dt_to_sec(dt_tz1, False)  # type: ignore
 *     offset = datetime.timedelta(hours=1, minutes=1).total_seconds()
 *     assert secs - offset == dt_to_sec(dt_tz1, True)  # type: ignore             # <<<<<<<<<<<<<<
 *     us = int(secs * 1_000_000)
 *     assert us == dt_to_us(dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = PyNumber_Subtract(__pyx_v_secs, __pyx_v_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1090, __pyx_L1_error)
    __pyx_t_23.__pyx_n = 1;
    __pyx_t_23.utc = 1;
    __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_23); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error)
    __pyx_t_9 = PyFloat_FromDouble(__pyx_t_22); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1090, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1090, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1091
 *     offset = datetime.timedelta(hours=1, minutes=1).total_seconds()
 *     assert secs - offset == dt_to_sec(dt_tz1, True)  # type: ignore
 *     us = int(secs * 1_000_000)             # <<<<<<<<<<<<<<
 *     assert us == dt_to_us(dt)  # type: ignore
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyLong_MultiplyObjC(__pyx_v_secs, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_us = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "cytimes/utils.py":1092
 *     assert secs - offset == dt_to_sec(dt_tz1, True)  # type: ignore
 *     us = int(secs * 1_000_000)
 *     assert us == dt_to_us(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1092, __pyx_L1_error)
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_dt), NULL); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1092, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_us, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1092, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1092, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1093
 *     us = int(secs * 1_000_000)
 *     assert us == dt_to_us(dt)  # type: ignore
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore
 *     for t in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1093, __pyx_L1_error)
    __pyx_t_24.__pyx_n = 1;
    __pyx_t_24.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_24); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_us, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1093, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1093, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1094
 *     assert us == dt_to_us(dt)  # type: ignore
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore             # <<<<<<<<<<<<<<
 *     for t in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
 *         assert t.timestamp() == dt_to_ts(t)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __Pyx_PyLong_MultiplyObjC(__pyx_v_offset, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_us, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1094, __pyx_L1_error)
    __pyx_t_24.__pyx_n = 1;
    __pyx_t_24.utc = 1;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_24); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1094, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_t_20); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1094, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1094, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1094, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1095
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore
 *     for t in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):             # <<<<<<<<<<<<<<
 *         assert t.timestamp() == dt_to_ts(t)  # type: ignore
 * 
*/
  __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_dt);
  __Pyx_GIVEREF(__pyx_v_dt);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_dt) != (0)) __PYX_ERR(0, 1095, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz1);
  __Pyx_GIVEREF(__pyx_v_dt_tz1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_dt_tz1) != (0)) __PYX_ERR(0, 1095, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz2);
  __Pyx_GIVEREF(__pyx_v_dt_tz2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_dt_tz2) != (0)) __PYX_ERR(0, 1095, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz3);
  __Pyx_GIVEREF(__pyx_v_dt_tz3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_dt_tz3) != (0)) __PYX_ERR(0, 1095, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_dt_tz4);
  __Pyx_GIVEREF(__pyx_v_dt_tz4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_dt_tz4) != (0)) __PYX_ERR(0, 1095, __pyx_L1_error);
  __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_3 >= 5) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1096
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore
 *     for t in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):
 *         assert t.timestamp() == dt_to_ts(t)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     date = datetime.date(2021, 1, 2)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_1 = __pyx_v_t;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      if (!(likely(((__pyx_v_t) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1096, __pyx_L1_error)
      __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_ts(((PyDateTime_DateTime *)__pyx_v_t)); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error)
      __pyx_t_1 = PyFloat_FromDouble(__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_18)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1096, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1096, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1095
 *     assert us == dt_to_us(dt_tz1, False)  # type: ignore
 *     assert us - (offset * 1_000_000) == dt_to_us(dt_tz1, True)  # type: ignore
 *     for t in (dt, dt_tz1, dt_tz2, dt_tz3, dt_tz4):             # <<<<<<<<<<<<<<
 *         assert t.timestamp() == dt_to_ts(t)  # type: ignore
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cytimes/utils.py":1098
 *         assert t.timestamp() == dt_to_ts(t)  # type: ignore
 * 
 *     date = datetime.date(2021, 1, 2)             # <<<<<<<<<<<<<<
 *     time1 = datetime.time(3, 4, 5, 6)
 *     time2 = datetime.time(3, 4, 5, 6, tz1)
*/
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_date); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_date = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":1099
 * 
 *     date = datetime.date(2021, 1, 2)
 *     time1 = datetime.time(3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     time2 = datetime.time(3, 4, 5, 6, tz1)
 *     assert dt == dt_combine(date, time1)  # type: ignore
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[24], NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_time1 = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cytimes/utils.py":1100
 *     date = datetime.date(2021, 1, 2)
 *     time1 = datetime.time(3, 4, 5, 6)
 *     time2 = datetime.time(3, 4, 5, 6, tz1)             # <<<<<<<<<<<<<<
 *     assert dt == dt_combine(date, time1)  # type: ignore
 *     assert dt_tz1 == dt_combine(date, time2)  # type: ignore
*/
  __pyx_t_8 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_8, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz1};
    __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_v_time2 = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cytimes/utils.py":1101
 *     time1 = datetime.time(3, 4, 5, 6)
 *     time2 = datetime.time(3, 4, 5, 6, tz1)
 *     assert dt == dt_combine(date, time1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz1 == dt_combine(date, time2)  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_combine(date, None)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 1101, __pyx_L1_error)
    if (!(likely(((__pyx_v_time1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1101, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 2;
    __pyx_t_25.date = ((PyDateTime_Date *)__pyx_v_date);
    __pyx_t_25.time = ((PyDateTime_Time *)__pyx_v_time1);
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_dt, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1101, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1101, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1101, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1102
 *     time2 = datetime.time(3, 4, 5, 6, tz1)
 *     assert dt == dt_combine(date, time1)  # type: ignore
 *     assert dt_tz1 == dt_combine(date, time2)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2) == dt_combine(date, None)  # type: ignore
 *     tmp = datetime.datetime.now()
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 1102, __pyx_L1_error)
    if (!(likely(((__pyx_v_time2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1102, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 2;
    __pyx_t_25.date = ((PyDateTime_Date *)__pyx_v_date);
    __pyx_t_25.time = ((PyDateTime_Time *)__pyx_v_time2);
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_dt_tz1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1102, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1102, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1103
 *     assert dt == dt_combine(date, time1)  # type: ignore
 *     assert dt_tz1 == dt_combine(date, time2)  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_combine(date, None)  # type: ignore             # <<<<<<<<<<<<<<
 *     tmp = datetime.datetime.now()
 *     tmp1 = tmp.replace(hour=3, minute=4, second=5, microsecond=6)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 1103, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 2;
    __pyx_t_25.date = ((PyDateTime_Date *)__pyx_v_date);
    __pyx_t_25.time = ((PyDateTime_Time *)Py_None);
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1103, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1103, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1104
 *     assert dt_tz1 == dt_combine(date, time2)  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_combine(date, None)  # type: ignore
 *     tmp = datetime.datetime.now()             # <<<<<<<<<<<<<<
 *     tmp1 = tmp.replace(hour=3, minute=4, second=5, microsecond=6)
 *     assert tmp1 == dt_combine(None, time1)  # type: ignore
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __pyx_t_8;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tmp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1105
 *     assert datetime.datetime(2021, 1, 2) == dt_combine(date, None)  # type: ignore
 *     tmp = datetime.datetime.now()
 *     tmp1 = tmp.replace(hour=3, minute=4, second=5, microsecond=6)             # <<<<<<<<<<<<<<
 *     assert tmp1 == dt_combine(None, time1)  # type: ignore
 *     tmp2 = tmp1.replace(tzinfo=tz1)
*/
  __pyx_t_8 = __pyx_v_tmp;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_8, NULL};
    __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_int_3, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_int_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_int_5, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_6, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tmp1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1106
 *     tmp = datetime.datetime.now()
 *     tmp1 = tmp.replace(hour=3, minute=4, second=5, microsecond=6)
 *     assert tmp1 == dt_combine(None, time1)  # type: ignore             # <<<<<<<<<<<<<<
 *     tmp2 = tmp1.replace(tzinfo=tz1)
 *     assert tmp2 == dt_combine(None, time2)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_time1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1106, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 2;
    __pyx_t_25.date = ((PyDateTime_Date *)Py_None);
    __pyx_t_25.time = ((PyDateTime_Time *)__pyx_v_time1);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_tmp1, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1106, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1106, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1106, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1107
 *     tmp1 = tmp.replace(hour=3, minute=4, second=5, microsecond=6)
 *     assert tmp1 == dt_combine(None, time1)  # type: ignore
 *     tmp2 = tmp1.replace(tzinfo=tz1)             # <<<<<<<<<<<<<<
 *     assert tmp2 == dt_combine(None, time2)  # type: ignore
 *     tmp3 = tmp.replace(hour=0, minute=0, second=0, microsecond=0)
*/
  __pyx_t_1 = __pyx_v_tmp1;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tz1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1107, __pyx_L1_error)
    __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_v_tmp2 = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cytimes/utils.py":1108
 *     assert tmp1 == dt_combine(None, time1)  # type: ignore
 *     tmp2 = tmp1.replace(tzinfo=tz1)
 *     assert tmp2 == dt_combine(None, time2)  # type: ignore             # <<<<<<<<<<<<<<
 *     tmp3 = tmp.replace(hour=0, minute=0, second=0, microsecond=0)
 *     assert tmp3 == dt_combine()  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_time2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_time2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1108, __pyx_L1_error)
    __pyx_t_25.__pyx_n = 2;
    __pyx_t_25.date = ((PyDateTime_Date *)Py_None);
    __pyx_t_25.time = ((PyDateTime_Time *)__pyx_v_time2);
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(&__pyx_t_25)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_tmp2, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1108, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1108, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1109
 *     tmp2 = tmp1.replace(tzinfo=tz1)
 *     assert tmp2 == dt_combine(None, time2)  # type: ignore
 *     tmp3 = tmp.replace(hour=0, minute=0, second=0, microsecond=0)             # <<<<<<<<<<<<<<
 *     assert tmp3 == dt_combine()  # type: ignore
 * 
*/
  __pyx_t_9 = __pyx_v_tmp;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hour, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minute, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_second, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error)
    __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_v_tmp3 = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":1110
 *     assert tmp2 == dt_combine(None, time2)  # type: ignore
 *     tmp3 = tmp.replace(hour=0, minute=0, second=0, microsecond=0)
 *     assert tmp3 == dt_combine()  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_date(date)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_combine(NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_tmp3, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1110, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1110, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1112
 *     assert tmp3 == dt_combine()  # type: ignore
 * 
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_date(date)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2, tzinfo=tz1) == dt_fr_date(date, tz1)  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt))) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 1112, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_date(((PyDateTime_Date *)__pyx_v_date), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1112, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1112, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1113
 * 
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_date(date)  # type: ignore
 *     assert datetime.datetime(2021, 1, 2, tzinfo=tz1) == dt_fr_date(date, tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(Timestamp(dt))) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), None)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tz1) < (0)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[17], __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_date))))) __PYX_ERR(0, 1113, __pyx_L1_error)
    __pyx_t_26.__pyx_n = 1;
    __pyx_t_26.tzinfo = __pyx_v_tz1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_date(((PyDateTime_Date *)__pyx_v_date), &__pyx_t_26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1113, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1113, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1114
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_date(date)  # type: ignore
 *     assert datetime.datetime(2021, 1, 2, tzinfo=tz1) == dt_fr_date(date, tz1)  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt))) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(Timestamp(dt), None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), datetime.datetime)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_8 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_dt};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1114, __pyx_L1_error)
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_9), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_8)) == __pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1114, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1114, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1115
 *     assert datetime.datetime(2021, 1, 2, tzinfo=tz1) == dt_fr_date(date, tz1)  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt))) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), None)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(Timestamp(dt), datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), Timestamp)) is Timestamp  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_1 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_dt};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1115, __pyx_L1_error)
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_9), &__pyx_t_27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1115, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1115, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1116
 *     assert type(dt_fr_dt(Timestamp(dt))) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), datetime.datetime)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(Timestamp(dt), Timestamp)) is Timestamp  # type: ignore
 *     assert type(dt_fr_dt(dt)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_8 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_dt};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_9)) __PYX_ERR(0, 1116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1116, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = __pyx_t_8;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_9), &__pyx_t_27)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1116, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1116, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1117
 *     assert type(dt_fr_dt(Timestamp(dt), None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), Timestamp)) is Timestamp  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(dt)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, None)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_9 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_dt};
      __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
    }
    if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1117, __pyx_L1_error)
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = __pyx_v_Timestamp;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_8), &__pyx_t_27)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_9)) == __pyx_v_Timestamp);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1117, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1117, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1118
 *     assert type(dt_fr_dt(Timestamp(dt), datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(Timestamp(dt), Timestamp)) is Timestamp  # type: ignore
 *     assert type(dt_fr_dt(dt)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(dt, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, datetime.datetime)) is datetime.datetime  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1118, __pyx_L1_error)
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_9)) == __pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1118, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1118, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1119
 *     assert type(dt_fr_dt(Timestamp(dt), Timestamp)) is Timestamp  # type: ignore
 *     assert type(dt_fr_dt(dt)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, None)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(dt, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, Timestamp)) is Timestamp  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1119, __pyx_L1_error)
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = Py_None;
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_27)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_8)) == __pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1119, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1119, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1120
 *     assert type(dt_fr_dt(dt)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, datetime.datetime)) is datetime.datetime  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(dt_fr_dt(dt, Timestamp)) is Timestamp  # type: ignore
 *     assert dt == dt_fr_dt(Timestamp(dt))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1120, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = __pyx_t_9;
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_27)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_8)) == __pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1120, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1120, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1121
 *     assert type(dt_fr_dt(dt, None)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, Timestamp)) is Timestamp  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt == dt_fr_dt(Timestamp(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_dt(Timestamp(dt_tz1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1121, __pyx_L1_error)
    __pyx_t_27.__pyx_n = 1;
    __pyx_t_27.dtclass = __pyx_v_Timestamp;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_27)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_18 = (((PyObject *)Py_TYPE(__pyx_t_9)) == __pyx_v_Timestamp);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1121, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1121, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1122
 *     assert type(dt_fr_dt(dt, datetime.datetime)) is datetime.datetime  # type: ignore
 *     assert type(dt_fr_dt(dt, Timestamp)) is Timestamp  # type: ignore
 *     assert dt == dt_fr_dt(Timestamp(dt))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz1 == dt_fr_dt(Timestamp(dt_tz1))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_1 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_dt};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1122, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_9), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_dt, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1122, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1122, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1123
 *     assert type(dt_fr_dt(dt, Timestamp)) is Timestamp  # type: ignore
 *     assert dt == dt_fr_dt(Timestamp(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_dt(Timestamp(dt_tz1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = NULL;
    __Pyx_INCREF(__pyx_v_Timestamp);
    __pyx_t_8 = __pyx_v_Timestamp; 
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_1);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_dt_tz1};
      __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__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_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1123, __pyx_L1_error)
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_dt(((PyDateTime_DateTime *)__pyx_t_9), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_RichCompare(__pyx_v_dt_tz1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1123, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1123, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1124
 *     assert dt == dt_fr_dt(Timestamp(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_dt(Timestamp(dt_tz1))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __pyx_v_dt;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_toordinal, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
    }
    __pyx_t_28 = __Pyx_PyLong_As_int(__pyx_t_9); if (unlikely((__pyx_t_28 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_t_28, NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1124, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1124, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1125
 *     assert dt_tz1 == dt_fr_dt(Timestamp(dt_tz1))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_dt_tz2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1125, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz2), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1125, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1125, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1125, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1126
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[25], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!(likely(((__pyx_v_dt_tz2) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz2, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1126, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 1;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz2), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1126, __pyx_L1_error)
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1126, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1126, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1126, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1126, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1127
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[17], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (!(likely(((__pyx_v_dt_tz3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1127, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz3), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1127, __pyx_L1_error)
    __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1127, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1127, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1127, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1128
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[26], NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_dt_tz3) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1128, __pyx_L1_error)
    __pyx_t_21.__pyx_n = 1;
    __pyx_t_21.utc = 1;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_ord(((PyDateTime_DateTime *)__pyx_v_dt_tz3), &__pyx_t_21); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL))) __PYX_ERR(0, 1128, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ord(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1128, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1128, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1129
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore
 *     assert dt == dt_fr_us(dt_to_us(dt))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1129, __pyx_L1_error)
    __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_dt), NULL); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1129, __pyx_L1_error)
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_sec(__pyx_t_22, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_dt, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1129, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1129, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1129, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1130
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt == dt_fr_us(dt_to_us(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_us(dt_to_us(dt_tz1, False), tz1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1130, __pyx_L1_error)
    __pyx_t_23.__pyx_n = 1;
    __pyx_t_23.utc = 0;
    __pyx_t_22 = __pyx_f_7cytimes_5utils_dt_to_sec(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_23); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L1_error)
    __pyx_t_29.__pyx_n = 1;
    __pyx_t_29.tzinfo = __pyx_v_tz1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_sec(__pyx_t_22, &__pyx_t_29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_dt_tz1, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1130, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1130, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1131
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore
 *     assert dt == dt_fr_us(dt_to_us(dt))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt_tz1 == dt_fr_us(dt_to_us(dt_tz1, False), tz1)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1131, __pyx_L1_error)
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_dt), NULL); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L1_error)
    __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_20, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_dt, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1131, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1131, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1132
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore
 *     assert dt == dt_fr_us(dt_to_us(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_us(dt_to_us(dt_tz1, False), tz1)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1132, __pyx_L1_error)
    __pyx_t_24.__pyx_n = 1;
    __pyx_t_24.utc = 0;
    __pyx_t_20 = __pyx_f_7cytimes_5utils_dt_to_us(((PyDateTime_DateTime *)__pyx_v_dt_tz1), &__pyx_t_24); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1132, __pyx_L1_error)
    __pyx_t_30.__pyx_n = 1;
    __pyx_t_30.tzinfo = __pyx_v_tz1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_20, &__pyx_t_30)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_dt_tz1, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_18)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1132, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1132, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1134
 *     assert dt_tz1 == dt_fr_us(dt_to_us(dt_tz1, False), tz1)  # type: ignore
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[23], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1135
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
*/
  __pyx_t_8 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, NULL};
    __pyx_t_17 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_17, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1135, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_17, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1135, __pyx_L1_error)
    __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_17);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_tz1, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1136
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")
*/
  __pyx_t_9 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_17 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_17);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_17, NULL};
    __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1136, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1136, __pyx_L1_error)
    __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_tz2, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1137
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))             # <<<<<<<<<<<<<<
 *     tz4 = zoneinfo.ZoneInfo("CET")
 *     for tz in (None, tz1, tz2, tz3, tz4):
*/
  __pyx_t_8 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, NULL};
    __pyx_t_17 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_23, __pyx_t_17, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1137, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_59, __pyx_t_17, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_17);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_tz3, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1138
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")             # <<<<<<<<<<<<<<
 *     for tz in (None, tz1, tz2, tz3, tz4):
 *         dt_ = dt.replace(tzinfo=tz1)
*/
  __pyx_t_9 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_17);
    assert(__pyx_t_9);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tz4 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1139
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")
 *     for tz in (None, tz1, tz2, tz3, tz4):             # <<<<<<<<<<<<<<
 *         dt_ = dt.replace(tzinfo=tz1)
 *         ts = dt_.timestamp()
*/
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 1139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz1);
  __Pyx_GIVEREF(__pyx_v_tz1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tz1) != (0)) __PYX_ERR(0, 1139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_tz2) != (0)) __PYX_ERR(0, 1139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz3);
  __Pyx_GIVEREF(__pyx_v_tz3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_tz3) != (0)) __PYX_ERR(0, 1139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz4);
  __Pyx_GIVEREF(__pyx_v_tz4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_tz4) != (0)) __PYX_ERR(0, 1139, __pyx_L1_error);
  __pyx_t_17 = __pyx_t_1; __Pyx_INCREF(__pyx_t_17);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_3 >= 5) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_3));
    #else
    __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":1140
 *     tz4 = zoneinfo.ZoneInfo("CET")
 *     for tz in (None, tz1, tz2, tz3, tz4):
 *         dt_ = dt.replace(tzinfo=tz1)             # <<<<<<<<<<<<<<
 *         ts = dt_.timestamp()
 *         assert datetime.datetime.fromtimestamp(ts, tz) == dt_fr_ts(ts, tz)  # type: ignore
*/
    __pyx_t_9 = __pyx_v_dt;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, NULL};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tz1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_dt_, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":1141
 *     for tz in (None, tz1, tz2, tz3, tz4):
 *         dt_ = dt.replace(tzinfo=tz1)
 *         ts = dt_.timestamp()             # <<<<<<<<<<<<<<
 *         assert datetime.datetime.fromtimestamp(ts, tz) == dt_fr_ts(ts, tz)  # type: ignore
 * 
*/
    __pyx_t_8 = __pyx_v_dt_;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_ts, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cytimes/utils.py":1142
 *         dt_ = dt.replace(tzinfo=tz1)
 *         ts = dt_.timestamp()
 *         assert datetime.datetime.fromtimestamp(ts, tz) == dt_fr_ts(ts, tz)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_conversion")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __pyx_t_9;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_ts, __pyx_v_tz};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromtimestamp, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_22 = __Pyx_PyFloat_AsDouble(__pyx_v_ts); if (unlikely((__pyx_t_22 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1142, __pyx_L1_error)
      __pyx_t_31.__pyx_n = 1;
      __pyx_t_31.tzinfo = __pyx_v_tz;
      __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_ts(__pyx_t_22, &__pyx_t_31)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_18 < 0))) __PYX_ERR(0, 1142, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_18)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1142, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1142, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1139
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")
 *     for tz in (None, tz1, tz2, tz3, tz4):             # <<<<<<<<<<<<<<
 *         dt_ = dt.replace(tzinfo=tz1)
 *         ts = dt_.timestamp()
*/
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cytimes/utils.py":1144
 *         assert datetime.datetime.fromtimestamp(ts, tz) == dt_fr_ts(ts, tz)  # type: ignore
 * 
 *     print("Passed: dt_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Timestamp
*/
  __pyx_t_8 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Passed_dt_conversion};
    __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cytimes/utils.py":1146
 *     print("Passed: dt_conversion")
 * 
 *     del datetime, Timestamp             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Timestamp); __pyx_v_Timestamp = 0;

  /* "cytimes/utils.py":1029
 * 
 * 
 * def _test_dt_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __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_AddTraceback("cytimes.utils._test_dt_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Timestamp);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_tz1);
  __Pyx_XDECREF(__pyx_v_dt_tz1);
  __Pyx_XDECREF(__pyx_v_tz2);
  __Pyx_XDECREF(__pyx_v_dt_tz2);
  __Pyx_XDECREF(__pyx_v_tz3);
  __Pyx_XDECREF(__pyx_v_dt_tz3);
  __Pyx_XDECREF(__pyx_v_dt_tz4);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_secs);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_time1);
  __Pyx_XDECREF(__pyx_v_time2);
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_tmp1);
  __Pyx_XDECREF(__pyx_v_tmp2);
  __Pyx_XDECREF(__pyx_v_tmp3);
  __Pyx_XDECREF(__pyx_v_tz4);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_dt_);
  __Pyx_XDECREF(__pyx_v_ts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1149
 * 
 * 
 * def _test_dt_mainipulate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_55_test_dt_mainipulate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_55_test_dt_mainipulate = {"_test_dt_mainipulate", (PyCFunction)__pyx_pw_7cytimes_5utils_55_test_dt_mainipulate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_55_test_dt_mainipulate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_mainipulate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_54_test_dt_mainipulate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_54_test_dt_mainipulate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_tz1 = NULL;
  PyObject *__pyx_v_tz2 = NULL;
  PyObject *__pyx_v_tz3 = NULL;
  PyObject *__pyx_v_tz4 = NULL;
  PyObject *__pyx_v_tz = 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;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_mainipulate", 0);

  /* "cytimes/utils.py":1150
 * 
 * def _test_dt_mainipulate() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1152
 *     import datetime
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[23], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1153
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_tz1 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1154
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_7);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL};
    __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1154, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_tz2 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1155
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))             # <<<<<<<<<<<<<<
 *     tz4 = zoneinfo.ZoneInfo("CET")
 * 
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
    __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_23, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1155, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_59, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_6 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_tz3 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1156
 *     tz2 = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     tz3 = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     tz4 = zoneinfo.ZoneInfo("CET")             # <<<<<<<<<<<<<<
 * 
 *     for tz in (None, tz1, tz2, tz3, tz4):
*/
  __pyx_t_4 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_4);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_6 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_tz4 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1158
 *     tz4 = zoneinfo.ZoneInfo("CET")
 * 
 *     for tz in (None, tz1, tz2, tz3, tz4):             # <<<<<<<<<<<<<<
 *         assert dt.replace(tzinfo=tz) == dt_replace_tz(dt, tz)  # type: ignore
 *     assert 1 == dt_replace_fold(dt.replace(tzinfo=tz1, fold=0), 1).fold  # type: ignore
*/
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None) != (0)) __PYX_ERR(0, 1158, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz1);
  __Pyx_GIVEREF(__pyx_v_tz1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tz1) != (0)) __PYX_ERR(0, 1158, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz2);
  __Pyx_GIVEREF(__pyx_v_tz2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_tz2) != (0)) __PYX_ERR(0, 1158, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz3);
  __Pyx_GIVEREF(__pyx_v_tz3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_tz3) != (0)) __PYX_ERR(0, 1158, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_tz4);
  __Pyx_GIVEREF(__pyx_v_tz4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_tz4) != (0)) __PYX_ERR(0, 1158, __pyx_L1_error);
  __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
  __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_8 >= 5) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8));
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8);
    #endif
    ++__pyx_t_8;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_tz, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":1159
 * 
 *     for tz in (None, tz1, tz2, tz3, tz4):
 *         assert dt.replace(tzinfo=tz) == dt_replace_tz(dt, tz)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert 1 == dt_replace_fold(dt.replace(tzinfo=tz1, fold=0), 1).fold  # type: ignore
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __pyx_v_dt;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
        __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tz, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1159, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1159, __pyx_L1_error)
      __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_tz(((PyDateTime_DateTime *)__pyx_v_dt), __pyx_v_tz, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1159, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_9)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1159, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1159, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1158
 *     tz4 = zoneinfo.ZoneInfo("CET")
 * 
 *     for tz in (None, tz1, tz2, tz3, tz4):             # <<<<<<<<<<<<<<
 *         assert dt.replace(tzinfo=tz) == dt_replace_tz(dt, tz)  # type: ignore
 *     assert 1 == dt_replace_fold(dt.replace(tzinfo=tz1, fold=0), 1).fold  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cytimes/utils.py":1160
 *     for tz in (None, tz1, tz2, tz3, tz4):
 *         assert dt.replace(tzinfo=tz) == dt_replace_tz(dt, tz)  # type: ignore
 *     assert 1 == dt_replace_fold(dt.replace(tzinfo=tz1, fold=0), 1).fold  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_manipulate")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_dt;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_v_tz1, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1160, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1160, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1160, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_replace_fold(((PyDateTime_DateTime *)__pyx_t_7), 1, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = (1 == __pyx_f_7cpython_8datetime_8datetime_4fold_fold(((PyDateTime_DateTime *)__pyx_t_1)));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1160, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1160, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1162
 *     assert 1 == dt_replace_fold(dt.replace(tzinfo=tz1, fold=0), 1).fold  # type: ignore
 * 
 *     print("Passed: dt_manipulate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime
*/
  __pyx_t_7 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Passed_dt_manipulate};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1164
 *     print("Passed: dt_manipulate")
 * 
 *     del datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1149
 * 
 * 
 * def _test_dt_mainipulate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cytimes.utils._test_dt_mainipulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_tz1);
  __Pyx_XDECREF(__pyx_v_tz2);
  __Pyx_XDECREF(__pyx_v_tz3);
  __Pyx_XDECREF(__pyx_v_tz4);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1167
 * 
 * 
 * def _test_dt_arithmetic() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_57_test_dt_arithmetic(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_57_test_dt_arithmetic = {"_test_dt_arithmetic", (PyCFunction)__pyx_pw_7cytimes_5utils_57_test_dt_arithmetic, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_57_test_dt_arithmetic(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_arithmetic (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_56_test_dt_arithmetic(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_56_test_dt_arithmetic(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_td1 = NULL;
  PyObject *__pyx_v_td2 = NULL;
  PyObject *__pyx_v_td3 = NULL;
  PyObject *__pyx_v_td4 = NULL;
  PyObject *__pyx_v_td5 = NULL;
  PyObject *__pyx_v_td6 = NULL;
  PyObject *__pyx_v_td7 = NULL;
  PyObject *__pyx_v_td8 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_dt_add __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_arithmetic", 0);

  /* "cytimes/utils.py":1168
 * 
 * def _test_dt_arithmetic() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1170
 *     import datetime
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     td1 = datetime.timedelta(1, 1, 1)
 *     assert dt_add(dt, 1, 1, 1) == dt + td1  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[23], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dt = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1171
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     td1 = datetime.timedelta(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 1, 1) == dt + td1  # type: ignore
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_td1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1172
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)
 *     td1 = datetime.timedelta(1, 1, 1)
 *     assert dt_add(dt, 1, 1, 1) == dt + td1  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td2 = datetime.timedelta(1, 86400, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1172, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = 1;
    __pyx_t_4.seconds = 1;
    __pyx_t_4.microseconds = 1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_v_dt, __pyx_v_td1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1172, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1172, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1174
 *     assert dt_add(dt, 1, 1, 1) == dt + td1  # type: ignore
 * 
 *     td2 = datetime.timedelta(1, 86400, 1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 86400, 1) == dt + td2  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[27], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_td2 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1175
 * 
 *     td2 = datetime.timedelta(1, 86400, 1)
 *     assert dt_add(dt, 1, 86400, 1) == dt + td2  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td3 = datetime.timedelta(1, 86399, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1175, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = 1;
    __pyx_t_4.seconds = 0x15180;
    __pyx_t_4.microseconds = 1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Add(__pyx_v_dt, __pyx_v_td2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1175, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1175, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1177
 *     assert dt_add(dt, 1, 86400, 1) == dt + td2  # type: ignore
 * 
 *     td3 = datetime.timedelta(1, 86399, 1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 86399, 1) == dt + td3  # type: ignore
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[28], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_td3 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1178
 * 
 *     td3 = datetime.timedelta(1, 86399, 1)
 *     assert dt_add(dt, 1, 86399, 1) == dt + td3  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td4 = datetime.timedelta(-1, -1, -1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1178, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = 1;
    __pyx_t_4.seconds = 0x1517F;
    __pyx_t_4.microseconds = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyNumber_Add(__pyx_v_dt, __pyx_v_td3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1178, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1178, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1180
 *     assert dt_add(dt, 1, 86399, 1) == dt + td3  # type: ignore
 * 
 *     td4 = datetime.timedelta(-1, -1, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -1, -1) == dt + td4  # type: ignore
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[29], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_td4 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1181
 * 
 *     td4 = datetime.timedelta(-1, -1, -1)
 *     assert dt_add(dt, -1, -1, -1) == dt + td4  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td5 = datetime.timedelta(-1, -86400, -1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1181, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = -1;
    __pyx_t_4.seconds = -1;
    __pyx_t_4.microseconds = -1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_v_dt, __pyx_v_td4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1181, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1181, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1183
 *     assert dt_add(dt, -1, -1, -1) == dt + td4  # type: ignore
 * 
 *     td5 = datetime.timedelta(-1, -86400, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -86400, -1) == dt + td5  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[30], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_td5 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1184
 * 
 *     td5 = datetime.timedelta(-1, -86400, -1)
 *     assert dt_add(dt, -1, -86400, -1) == dt + td5  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td6 = datetime.timedelta(-1, -86399, -1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1184, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = -1;
    __pyx_t_4.seconds = -86400;
    __pyx_t_4.microseconds = -1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Add(__pyx_v_dt, __pyx_v_td5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1184, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1184, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1186
 *     assert dt_add(dt, -1, -86400, -1) == dt + td5  # type: ignore
 * 
 *     td6 = datetime.timedelta(-1, -86399, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -86399, -1) == dt + td6  # type: ignore
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[31], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_td6 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1187
 * 
 *     td6 = datetime.timedelta(-1, -86399, -1)
 *     assert dt_add(dt, -1, -86399, -1) == dt + td6  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td7 = datetime.timedelta(1, 60, 100000)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1187, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = -1;
    __pyx_t_4.seconds = -86399;
    __pyx_t_4.microseconds = -1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyNumber_Add(__pyx_v_dt, __pyx_v_td6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1187, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1187, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1189
 *     assert dt_add(dt, -1, -86399, -1) == dt + td6  # type: ignore
 * 
 *     td7 = datetime.timedelta(1, 60, 100000)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 60, 100000) == dt + td7  # type: ignore
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[32], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_td7 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1190
 * 
 *     td7 = datetime.timedelta(1, 60, 100000)
 *     assert dt_add(dt, 1, 60, 100000) == dt + td7  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td8 = datetime.timedelta(-1, -60, -100000)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1190, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = 1;
    __pyx_t_4.seconds = 60;
    __pyx_t_4.microseconds = 0x186A0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_v_dt, __pyx_v_td7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1190, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1190, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1192
 *     assert dt_add(dt, 1, 60, 100000) == dt + td7  # type: ignore
 * 
 *     td8 = datetime.timedelta(-1, -60, -100000)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -60, -100000) == dt + td8  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[33], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_td8 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1193
 * 
 *     td8 = datetime.timedelta(-1, -60, -100000)
 *     assert dt_add(dt, -1, -60, -100000) == dt + td8  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: date_arithmetic")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1193, __pyx_L1_error)
    __pyx_t_4.__pyx_n = 3;
    __pyx_t_4.days = -1;
    __pyx_t_4.seconds = -60;
    __pyx_t_4.microseconds = -100000;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_add(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Add(__pyx_v_dt, __pyx_v_td8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1193, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1193, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1195
 *     assert dt_add(dt, -1, -60, -100000) == dt + td8  # type: ignore
 * 
 *     print("Passed: date_arithmetic")             # <<<<<<<<<<<<<<
 * 
 *     del datetime
*/
  __pyx_t_5 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_date_arithmetic};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1197
 *     print("Passed: date_arithmetic")
 * 
 *     del datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1167
 * 
 * 
 * def _test_dt_arithmetic() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_dt_arithmetic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_td1);
  __Pyx_XDECREF(__pyx_v_td2);
  __Pyx_XDECREF(__pyx_v_td3);
  __Pyx_XDECREF(__pyx_v_td4);
  __Pyx_XDECREF(__pyx_v_td5);
  __Pyx_XDECREF(__pyx_v_td6);
  __Pyx_XDECREF(__pyx_v_td7);
  __Pyx_XDECREF(__pyx_v_td8);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1200
 * 
 * 
 * def _test_dt_normalize_tz() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, pendulum
 *     from zoneinfo import ZoneInfo
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_59_test_dt_normalize_tz(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_59_test_dt_normalize_tz = {"_test_dt_normalize_tz", (PyCFunction)__pyx_pw_7cytimes_5utils_59_test_dt_normalize_tz, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_59_test_dt_normalize_tz(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_dt_normalize_tz (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_58_test_dt_normalize_tz(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_58_test_dt_normalize_tz(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_pendulum = NULL;
  PyObject *__pyx_v_ZoneInfo = NULL;
  PyObject *__pyx_v_test_pairs = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyDateTime_DateTime *__pyx_v_m_dt = NULL;
  PyObject *__pyx_v_p_dt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  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;
  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 = 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_t_30;
  int __pyx_t_31;
  PyObject *__pyx_t_32[4];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_dt_normalize_tz", 0);

  /* "cytimes/utils.py":1201
 * 
 * def _test_dt_normalize_tz() -> None:
 *     import datetime, pendulum             # <<<<<<<<<<<<<<
 *     from zoneinfo import ZoneInfo
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pendulum = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1202
 * def _test_dt_normalize_tz() -> None:
 *     import datetime, pendulum
 *     from zoneinfo import ZoneInfo             # <<<<<<<<<<<<<<
 * 
 *     test_pairs = [
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ZoneInfo};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zoneinfo, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ZoneInfo};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ZoneInfo = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1206
 *     test_pairs = [
 *         # New York fall-back (1:30 happens twice)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1207
 *         # New York fall-back (1:30 happens twice)
 *         datetime.datetime(
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_7 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_5) < (0)) __PYX_ERR(0, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "cytimes/utils.py":1206
 *     test_pairs = [
 *         # New York fall-back (1:30 happens twice)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[34], __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1209
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1210
 *         ),
 *         datetime.datetime(
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Berlin fall-back (CET/CEST)
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_9 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_7) < (0)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1210, __pyx_L1_error)

  /* "cytimes/utils.py":1209
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[34], __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1213
 *         ),
 *         # Berlin fall-back (CET/CEST)
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),
 *         # New York spring-forward (2:30 never exists)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_10 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_10, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_9) < (0)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[35], __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1214
 *         # Berlin fall-back (CET/CEST)
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=0),
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),             # <<<<<<<<<<<<<<
 *         # New York spring-forward (2:30 never exists)
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_11 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_11, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CET};
    __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_10) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[35], __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1216
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),
 *         # New York spring-forward (2:30 never exists)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1217
 *         # New York spring-forward (2:30 never exists)
 *         datetime.datetime(
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_12 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_11) < (0)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1217, __pyx_L1_error)

  /* "cytimes/utils.py":1216
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),
 *         # New York spring-forward (2:30 never exists)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[36], __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1219
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1220
 *         ),
 *         datetime.datetime(
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Paris spring-forward gap
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_13 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_13);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_12) < (0)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1220, __pyx_L1_error)

  /* "cytimes/utils.py":1219
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[36], __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1223
 *         ),
 *         # Paris spring-forward gap
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),
 *         # Lord Howe (30-minute DST change) ambiguous
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_14 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_14);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Europe_Paris};
    __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_13) < (0)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[37], __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1224
 *         # Paris spring-forward gap
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=0),
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),             # <<<<<<<<<<<<<<
 *         # Lord Howe (30-minute DST change) ambiguous
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_15 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Europe_Paris};
    __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_14) < (0)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[37], __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1226
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),
 *         # Lord Howe (30-minute DST change) ambiguous
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1227
 *         # Lord Howe (30-minute DST change) ambiguous
 *         datetime.datetime(
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_16 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_16);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Australia_Lord_Howe};
    __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_15) < (0)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1227, __pyx_L1_error)

  /* "cytimes/utils.py":1226
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),
 *         # Lord Howe (30-minute DST change) ambiguous
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[38], __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1229
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1230
 *         ),
 *         datetime.datetime(
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Lord Howe (30-minute DST change) non-existent
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_17 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_17);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_17);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_17, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Australia_Lord_Howe};
    __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_17, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_16) < (0)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1230, __pyx_L1_error)

  /* "cytimes/utils.py":1229
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1
 *         ),
*/
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[38], __pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1233
 *         ),
 *         # Lord Howe (30-minute DST change) non-existent
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1234
 *         # Lord Howe (30-minute DST change) non-existent
 *         datetime.datetime(
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_18 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_18);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_18);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_18, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Australia_Lord_Howe};
    __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_17) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error)

  /* "cytimes/utils.py":1233
 *         ),
 *         # Lord Howe (30-minute DST change) non-existent
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[39], __pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1236
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1237
 *         ),
 *         datetime.datetime(
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Odd offsets & negative DST
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_19 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_19);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_19, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Australia_Lord_Howe};
    __pyx_t_18 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_18) < (0)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1237, __pyx_L1_error)

  /* "cytimes/utils.py":1236
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=1
 *         ),
*/
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[39], __pyx_t_1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1240
 *         ),
 *         # Odd offsets & negative DST
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1241
 *         # Odd offsets & negative DST
 *         datetime.datetime(
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_20 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_20))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_20);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_20, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Asia_Kathmandu};
    __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_19) < (0)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1241, __pyx_L1_error)

  /* "cytimes/utils.py":1240
 *         ),
 *         # Odd offsets & negative DST
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0
 *         ),
*/
  __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[40], __pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1243
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1244
 *         ),
 *         datetime.datetime(
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Dublins historical negative DST periods
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_21 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_21))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_21);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_21, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Asia_Kathmandu};
    __pyx_t_20 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_20) < (0)) __PYX_ERR(0, 1244, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1244, __pyx_L1_error)

  /* "cytimes/utils.py":1243
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=1
 *         ),
*/
  __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[40], __pyx_t_1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1247
 *         ),
 *         # Dublins historical negative DST periods
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1248
 *         # Dublins historical negative DST periods
 *         datetime.datetime(
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_22 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_22))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_22);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_22);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_22, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Europe_Dublin};
    __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_21) < (0)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1248, __pyx_L1_error)

  /* "cytimes/utils.py":1247
 *         ),
 *         # Dublins historical negative DST periods
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0
 *         ),
*/
  __pyx_t_21 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[41], __pyx_t_4); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1250
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1251
 *         ),
 *         datetime.datetime(
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *         # Samoa skipping a day (dateline move)
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_23 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_23))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_23);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_23);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_23, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Europe_Dublin};
    __pyx_t_22 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_23, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_22) < (0)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1251, __pyx_L1_error)

  /* "cytimes/utils.py":1250
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=1
 *         ),
*/
  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[41], __pyx_t_1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1254
 *         ),
 *         # Samoa skipping a day (dateline move)
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_24 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_24))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_24);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_24);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_24, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Pacific_Apia};
    __pyx_t_23 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_24, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_23) < (0)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[42], __pyx_t_4); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1255
 *         # Samoa skipping a day (dateline move)
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_25 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_25))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_25);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_25);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_25, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Pacific_Apia};
    __pyx_t_24 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_25, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_24) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[42], __pyx_t_1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1256
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         # Aware with tzinfo refusing utcoffset at wall time
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_26 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_26))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_26);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_26);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_26, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Pacific_Apia};
    __pyx_t_25 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_26, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_25) < (0)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[43], __pyx_t_4); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1257
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),             # <<<<<<<<<<<<<<
 *         # Aware with tzinfo refusing utcoffset at wall time
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_27 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_27))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_27);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_27);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_27, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Pacific_Apia};
    __pyx_t_26 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_27, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_26) < (0)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __pyx_t_26 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[43], __pyx_t_1); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1259
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         # Aware with tzinfo refusing utcoffset at wall time
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cytimes/utils.py":1260
 *         # Aware with tzinfo refusing utcoffset at wall time
 *         datetime.datetime(
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0             # <<<<<<<<<<<<<<
 *         ),
 *         datetime.datetime(
*/
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_28 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_28))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_28);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_28);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_28, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_27 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_28, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_27);
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_27) < (0)) __PYX_ERR(0, 1260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 1260, __pyx_L1_error)

  /* "cytimes/utils.py":1259
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         # Aware with tzinfo refusing utcoffset at wall time
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_t_27 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[36], __pyx_t_4); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1262
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cytimes/utils.py":1263
 *         ),
 *         datetime.datetime(
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1             # <<<<<<<<<<<<<<
 *         ),
 *     ]
*/
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __Pyx_INCREF(__pyx_v_ZoneInfo);
  __pyx_t_29 = __pyx_v_ZoneInfo; 
  __pyx_t_8 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_29))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_29);
    assert(__pyx_t_6);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_29);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_29, __pyx__function);
    __pyx_t_8 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_America_New_York};
    __pyx_t_28 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_29, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
    if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tzinfo, __pyx_t_28) < (0)) __PYX_ERR(0, 1263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_fold, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1263, __pyx_L1_error)

  /* "cytimes/utils.py":1262
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=1
 *         ),
*/
  __pyx_t_28 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[36], __pyx_t_1); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1204
 *     from zoneinfo import ZoneInfo
 * 
 *     test_pairs = [             # <<<<<<<<<<<<<<
 *         # New York fall-back (1:30 happens twice)
 *         datetime.datetime(
*/
  __pyx_t_1 = PyList_New(22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_9) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_10) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_t_11) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_t_12) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_t_13) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_14);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_t_14) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_t_15) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_16);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_t_16) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_17);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_t_17) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_18);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_t_18) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_19);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_t_19) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_20);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_t_20) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_21);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_t_21) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_22);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_t_22) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_23);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_t_23) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_24);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_t_24) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_25);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_t_25) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_26);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_t_26) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_27);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_t_27) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_28);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_t_28) != (0)) __PYX_ERR(0, 1204, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_7 = 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_16 = 0;
  __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_t_23 = 0;
  __pyx_t_24 = 0;
  __pyx_t_25 = 0;
  __pyx_t_26 = 0;
  __pyx_t_27 = 0;
  __pyx_t_28 = 0;
  __pyx_v_test_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1267
 *     ]
 * 
 *     for dt in test_pairs:             # <<<<<<<<<<<<<<
 *         m_dt = dt_normalize_tz(dt)  # type: ignore
 *         p_dt = pendulum.datetime(
*/
  __pyx_t_1 = __pyx_v_test_pairs; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_28 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_XDECREF_SET(__pyx_v_dt, __pyx_t_28);
    __pyx_t_28 = 0;

    /* "cytimes/utils.py":1268
 * 
 *     for dt in test_pairs:
 *         m_dt = dt_normalize_tz(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *         p_dt = pendulum.datetime(
 *             dt.year,
*/
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1268, __pyx_L1_error)
    __pyx_t_28 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_normalize_tz(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_28);
    __Pyx_XDECREF_SET(__pyx_v_m_dt, ((PyDateTime_DateTime *)__pyx_t_28));
    __pyx_t_28 = 0;

    /* "cytimes/utils.py":1269
 *     for dt in test_pairs:
 *         m_dt = dt_normalize_tz(dt)  # type: ignore
 *         p_dt = pendulum.datetime(             # <<<<<<<<<<<<<<
 *             dt.year,
 *             dt.month,
*/
    __pyx_t_27 = __pyx_v_pendulum;
    __Pyx_INCREF(__pyx_t_27);

    /* "cytimes/utils.py":1270
 *         m_dt = dt_normalize_tz(dt)  # type: ignore
 *         p_dt = pendulum.datetime(
 *             dt.year,             # <<<<<<<<<<<<<<
 *             dt.month,
 *             dt.day,
*/
    __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_26);

    /* "cytimes/utils.py":1271
 *         p_dt = pendulum.datetime(
 *             dt.year,
 *             dt.month,             # <<<<<<<<<<<<<<
 *             dt.day,
 *             dt.hour,
*/
    __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_month); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);

    /* "cytimes/utils.py":1272
 *             dt.year,
 *             dt.month,
 *             dt.day,             # <<<<<<<<<<<<<<
 *             dt.hour,
 *             dt.minute,
*/
    __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_day); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_24);

    /* "cytimes/utils.py":1273
 *             dt.month,
 *             dt.day,
 *             dt.hour,             # <<<<<<<<<<<<<<
 *             dt.minute,
 *             dt.second,
*/
    __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_23);

    /* "cytimes/utils.py":1274
 *             dt.day,
 *             dt.hour,
 *             dt.minute,             # <<<<<<<<<<<<<<
 *             dt.second,
 *             dt.microsecond,
*/
    __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);

    /* "cytimes/utils.py":1275
 *             dt.hour,
 *             dt.minute,
 *             dt.second,             # <<<<<<<<<<<<<<
 *             dt.microsecond,
 *             tz=dt.tzinfo,
*/
    __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);

    /* "cytimes/utils.py":1276
 *             dt.minute,
 *             dt.second,
 *             dt.microsecond,             # <<<<<<<<<<<<<<
 *             tz=dt.tzinfo,
 *             fold=dt.fold,
*/
    __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_20);

    /* "cytimes/utils.py":1277
 *             dt.second,
 *             dt.microsecond,
 *             tz=dt.tzinfo,             # <<<<<<<<<<<<<<
 *             fold=dt.fold,
 *         )
*/
    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);

    /* "cytimes/utils.py":1278
 *             dt.microsecond,
 *             tz=dt.tzinfo,
 *             fold=dt.fold,             # <<<<<<<<<<<<<<
 *         )
 *         assert (
*/
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_fold); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[8 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_27, __pyx_t_26, __pyx_t_25, __pyx_t_24, __pyx_t_23, __pyx_t_22, __pyx_t_21, __pyx_t_20};
      __pyx_t_17 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tz, __pyx_t_19, __pyx_t_17, __pyx_callargs+8, 0) < (0)) __PYX_ERR(0, 1269, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fold, __pyx_t_18, __pyx_t_17, __pyx_callargs+8, 1) < (0)) __PYX_ERR(0, 1269, __pyx_L1_error)
      __pyx_t_28 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_8, (8-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_17);
      __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_24); __pyx_t_24 = 0;
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_28);
    }
    __Pyx_XDECREF_SET(__pyx_v_p_dt, __pyx_t_28);
    __pyx_t_28 = 0;

    /* "cytimes/utils.py":1280
 *             fold=dt.fold,
 *         )
 *         assert (             # <<<<<<<<<<<<<<
 *             m_dt.year == p_dt.year
 *             and m_dt.month == p_dt.month
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1281
 *         )
 *         assert (
 *             m_dt.year == p_dt.year             # <<<<<<<<<<<<<<
 *             and m_dt.month == p_dt.month
 *             and m_dt.day == p_dt.day
*/
      __pyx_t_28 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_4year_year(__pyx_v_m_dt)); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_28);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_year); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = PyObject_RichCompare(__pyx_t_28, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1282
 *         assert (
 *             m_dt.year == p_dt.year
 *             and m_dt.month == p_dt.month             # <<<<<<<<<<<<<<
 *             and m_dt.day == p_dt.day
 *             and m_dt.hour == p_dt.hour
*/
      __pyx_t_18 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_5month_month(__pyx_v_m_dt)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_month); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_28 = PyObject_RichCompare(__pyx_t_18, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_28); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_28); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1283
 *             m_dt.year == p_dt.year
 *             and m_dt.month == p_dt.month
 *             and m_dt.day == p_dt.day             # <<<<<<<<<<<<<<
 *             and m_dt.hour == p_dt.hour
 *             and m_dt.minute == p_dt.minute
*/
      __pyx_t_28 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_3day_day(__pyx_v_m_dt)); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_28);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_day); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = PyObject_RichCompare(__pyx_t_28, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1283, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1284
 *             and m_dt.month == p_dt.month
 *             and m_dt.day == p_dt.day
 *             and m_dt.hour == p_dt.hour             # <<<<<<<<<<<<<<
 *             and m_dt.minute == p_dt.minute
 *             and m_dt.second == p_dt.second
*/
      __pyx_t_18 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_4hour_hour(__pyx_v_m_dt)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_28 = PyObject_RichCompare(__pyx_t_18, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_28); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1284, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_28); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1284, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1285
 *             and m_dt.day == p_dt.day
 *             and m_dt.hour == p_dt.hour
 *             and m_dt.minute == p_dt.minute             # <<<<<<<<<<<<<<
 *             and m_dt.second == p_dt.second
 *             and m_dt.microsecond == p_dt.microsecond
*/
      __pyx_t_28 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_6minute_minute(__pyx_v_m_dt)); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_28);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = PyObject_RichCompare(__pyx_t_28, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1285, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1286
 *             and m_dt.hour == p_dt.hour
 *             and m_dt.minute == p_dt.minute
 *             and m_dt.second == p_dt.second             # <<<<<<<<<<<<<<
 *             and m_dt.microsecond == p_dt.microsecond
 *             and m_dt.fold == p_dt.fold
*/
      __pyx_t_18 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_6second_second(__pyx_v_m_dt)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_28 = PyObject_RichCompare(__pyx_t_18, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_28); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_28); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1286, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1287
 *             and m_dt.minute == p_dt.minute
 *             and m_dt.second == p_dt.second
 *             and m_dt.microsecond == p_dt.microsecond             # <<<<<<<<<<<<<<
 *             and m_dt.fold == p_dt.fold
 *         ), f"Failed: dt_normalize_tz({dt}) != pendulum result {p_dt}"
*/
      __pyx_t_28 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_m_dt)); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_28);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_18 = PyObject_RichCompare(__pyx_t_28, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1287, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1287, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      if (__pyx_t_31) {
      } else {
        __pyx_t_30 = __pyx_t_31;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1288
 *             and m_dt.second == p_dt.second
 *             and m_dt.microsecond == p_dt.microsecond
 *             and m_dt.fold == p_dt.fold             # <<<<<<<<<<<<<<
 *         ), f"Failed: dt_normalize_tz({dt}) != pendulum result {p_dt}"
 * 
*/
      __pyx_t_18 = __Pyx_PyLong_From_int(__pyx_f_7cpython_8datetime_8datetime_4fold_fold(__pyx_v_m_dt)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_p_dt, __pyx_mstate_global->__pyx_n_u_fold); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_28 = PyObject_RichCompare(__pyx_t_18, __pyx_t_17, Py_EQ); __Pyx_XGOTREF(__pyx_t_28); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1288, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_31 = __Pyx_PyObject_IsTrue(__pyx_t_28); if (unlikely((__pyx_t_31 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
      __pyx_t_30 = __pyx_t_31;
      __pyx_L5_bool_binop_done:;
      if (unlikely(!__pyx_t_30)) {

        /* "cytimes/utils.py":1289
 *             and m_dt.microsecond == p_dt.microsecond
 *             and m_dt.fold == p_dt.fold
 *         ), f"Failed: dt_normalize_tz({dt}) != pendulum result {p_dt}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: dt_normalize_tz")
*/
        __pyx_t_28 = __Pyx_PyObject_FormatSimple(__pyx_v_dt, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 1289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_28);
        __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_p_dt, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_32[0] = __pyx_mstate_global->__pyx_kp_u_Failed_dt_normalize_tz;
        __pyx_t_32[1] = __pyx_t_28;
        __pyx_t_32[2] = __pyx_mstate_global->__pyx_kp_u_pendulum_result;
        __pyx_t_32[3] = __pyx_t_17;
        __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_32, 4, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_28) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_28) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17));
        if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_18, 0, 0);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __PYX_ERR(0, 1280, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1280, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1267
 *     ]
 * 
 *     for dt in test_pairs:             # <<<<<<<<<<<<<<
 *         m_dt = dt_normalize_tz(dt)  # type: ignore
 *         p_dt = pendulum.datetime(
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1291
 *         ), f"Failed: dt_normalize_tz({dt}) != pendulum result {p_dt}"
 * 
 *     print("Passed: dt_normalize_tz")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, pendulum, ZoneInfo
*/
  __pyx_t_18 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_mstate_global->__pyx_kp_u_Passed_dt_normalize_tz};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1293
 *     print("Passed: dt_normalize_tz")
 * 
 *     del datetime, pendulum, ZoneInfo             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_pendulum); __pyx_v_pendulum = 0;
  __Pyx_DECREF(__pyx_v_ZoneInfo); __pyx_v_ZoneInfo = 0;

  /* "cytimes/utils.py":1200
 * 
 * 
 * def _test_dt_normalize_tz() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, pendulum
 *     from zoneinfo import ZoneInfo
*/

  /* 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_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_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_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_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_XDECREF(__pyx_t_29);
  __Pyx_AddTraceback("cytimes.utils._test_dt_normalize_tz", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_pendulum);
  __Pyx_XDECREF(__pyx_v_ZoneInfo);
  __Pyx_XDECREF(__pyx_v_test_pairs);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF((PyObject *)__pyx_v_m_dt);
  __Pyx_XDECREF(__pyx_v_p_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1297
 * 
 * # datetime.time
 * def _test_time_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_61_test_time_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_61_test_time_generate = {"_test_time_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_61_test_time_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_61_test_time_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_time_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_60_test_time_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_60_test_time_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Time = NULL;
  PyObject *__pyx_v_tz = NULL;
  PyObject *__pyx_v_t_n = NULL;
  PyObject *__pyx_v_t_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  struct __pyx_opt_args_7cytimes_5utils_time_new __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_now __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16[3];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_time_generate", 0);

  /* "cytimes/utils.py":1298
 * # datetime.time
 * def _test_time_generate() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pendulum import Time
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1299
 * def _test_time_generate() -> None:
 *     import datetime
 *     from pendulum import Time             # <<<<<<<<<<<<<<
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Time};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Time};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Time = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1301
 *     from pendulum import Time
 * 
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 * 
 *     # New
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1301, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1304
 * 
 *     # New
 *     assert datetime.time(0, 0, 0, 0) == time_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(0, 0, 0, 0) == time_new(0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[44], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1304, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1304, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1305
 *     # New
 *     assert datetime.time(0, 0, 0, 0) == time_new()  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[44], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.hour = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1305, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1305, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1305, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1306
 *     assert datetime.time(0, 0, 0, 0) == time_new()  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[44], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hour = 0;
    __pyx_t_10.minute = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1306, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1306, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1307
 *     assert datetime.time(0, 0, 0, 0) == time_new(0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[44], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.hour = 0;
    __pyx_t_10.minute = 0;
    __pyx_t_10.second = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1307, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1307, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1308
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[44], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.hour = 0;
    __pyx_t_10.minute = 0;
    __pyx_t_10.second = 0;
    __pyx_t_10.microsecond = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1308, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1308, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1309
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[45], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 1;
    __pyx_t_10.hour = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1309, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1309, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1309, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1310
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[46], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1310, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1310, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1311
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[47], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10.__pyx_n = 3;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1311, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1311, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1311, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1312
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[48], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10.__pyx_n = 4;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1312, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1312, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1312, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1313
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, None)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_v_tz};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_10.__pyx_n = 5;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1313, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1313, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1313, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1314
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_new(1, 1, 1, 1, tz, 0, None)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, datetime.time)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 6;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1314, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1314, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1315
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, None)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_new(1, 1, 1, 1, tz, 0, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, Time)) is Time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 7;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.tclass = Py_None;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1315, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1315, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1316
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, None)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, datetime.time)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_new(1, 1, 1, 1, tz, 0, Time)) is Time  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10.__pyx_n = 7;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.tclass = __pyx_t_4;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1316, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1316, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1317
 *     assert type(time_new(1, 1, 1, 1, tz, 0, None)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0, Time)) is Time  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Now
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_10.__pyx_n = 7;
    __pyx_t_10.hour = 1;
    __pyx_t_10.minute = 1;
    __pyx_t_10.second = 1;
    __pyx_t_10.microsecond = 1;
    __pyx_t_10.tzinfo = __pyx_v_tz;
    __pyx_t_10.fold = 0;
    __pyx_t_10.tclass = __pyx_v_Time;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_new(&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_v_Time);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_9)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1317, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1317, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1321
 *     # Now
 *     for t_n, t_c in (
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC).timetz(), time_now(UTC)),  # type: ignore
*/
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_5 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_now(NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1322
 *     for t_n, t_c in (
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(UTC).timetz(), time_now(UTC)),  # type: ignore
 *         (datetime.datetime.now(tz).timetz(), time_now(tz)),  # type: ignore
*/
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = __pyx_t_11;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_4 = __pyx_t_6;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__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_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.tzinfo = Py_None;
  __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_time_now(&__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1322, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 1322, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;

  /* "cytimes/utils.py":1323
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC).timetz(), time_now(UTC)),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now(tz).timetz(), time_now(tz)),  # type: ignore
 *     ):
*/
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_8 = __pyx_t_13;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
    __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
  }
  __pyx_t_1 = __pyx_t_11;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timetz, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __pyx_t_11 = ((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  __Pyx_INCREF(__pyx_t_11);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.tzinfo = __pyx_t_11;
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_time_now(&__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1324
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC).timetz(), time_now(UTC)),  # type: ignore
 *         (datetime.datetime.now(tz).timetz(), time_now(tz)),  # type: ignore             # <<<<<<<<<<<<<<
 *     ):
 *         assert (
*/
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_8 = __pyx_t_14;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_tz};
    __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
  }
  __pyx_t_6 = __pyx_t_13;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timetz, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.tzinfo = __pyx_v_tz;
  __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_time_now(&__pyx_t_12)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_13 = 0;

  /* "cytimes/utils.py":1321
 *     # Now
 *     for t_n, t_c in (
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
 *         (datetime.datetime.now(UTC).timetz(), time_now(UTC)),  # type: ignore
*/
  __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_11) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 1321, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_11 = 0;
  __pyx_t_6 = 0;

  /* "cytimes/utils.py":1320
 * 
 *     # Now
 *     for t_n, t_c in (             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
*/
  __pyx_t_6 = __pyx_t_13; __Pyx_INCREF(__pyx_t_6);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  for (;;) {
    if (__pyx_t_3 >= 4) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_13 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3));
    #else
    __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (likely(__pyx_t_13 != Py_None)) {
      PyObject* sequence = __pyx_t_13;
      Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1320, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0);
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    } else {
      __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1320, __pyx_L1_error)
    }
    __Pyx_XDECREF_SET(__pyx_v_t_n, __pyx_t_11);
    __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_t_c, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1326
 *         (datetime.datetime.now(tz).timetz(), time_now(tz)),  # type: ignore
 *     ):
 *         assert (             # <<<<<<<<<<<<<<
 *             (t_n.hour == t_c.hour)
 *             and (t_n.minute == t_c.minute)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1327
 *     ):
 *         assert (
 *             (t_n.hour == t_c.hour)             # <<<<<<<<<<<<<<
 *             and (t_n.minute == t_c.minute)
 *             and (t_n.second == t_c.second)
*/
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_n, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_c, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_13, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1327, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_15) {
      } else {
        __pyx_t_9 = __pyx_t_15;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1328
 *         assert (
 *             (t_n.hour == t_c.hour)
 *             and (t_n.minute == t_c.minute)             # <<<<<<<<<<<<<<
 *             and (t_n.second == t_c.second)
 *             and (-1000 < t_n.microsecond - t_c.microsecond < 1000)
*/
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_n, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_c, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyObject_RichCompare(__pyx_t_11, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_15) {
      } else {
        __pyx_t_9 = __pyx_t_15;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1329
 *             (t_n.hour == t_c.hour)
 *             and (t_n.minute == t_c.minute)
 *             and (t_n.second == t_c.second)             # <<<<<<<<<<<<<<
 *             and (-1000 < t_n.microsecond - t_c.microsecond < 1000)
 *             and (t_n.tzinfo == t_c.tzinfo)
*/
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_n, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_c, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_13, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1329, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1329, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_15) {
      } else {
        __pyx_t_9 = __pyx_t_15;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1330
 *             and (t_n.minute == t_c.minute)
 *             and (t_n.second == t_c.second)
 *             and (-1000 < t_n.microsecond - t_c.microsecond < 1000)             # <<<<<<<<<<<<<<
 *             and (t_n.tzinfo == t_c.tzinfo)
 *         ), f"{t_n} != {t_c}"
*/
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_n, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_c, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyNumber_Subtract(__pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_1000, __pyx_t_13, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
      if (__Pyx_PyObject_IsTrue(__pyx_t_4)) {
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_13, __pyx_mstate_global->__pyx_int_1000, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1330, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_15) {
      } else {
        __pyx_t_9 = __pyx_t_15;
        goto __pyx_L5_bool_binop_done;
      }

      /* "cytimes/utils.py":1331
 *             and (t_n.second == t_c.second)
 *             and (-1000 < t_n.microsecond - t_c.microsecond < 1000)
 *             and (t_n.tzinfo == t_c.tzinfo)             # <<<<<<<<<<<<<<
 *         ), f"{t_n} != {t_c}"
 * 
*/
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_n, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_t_c, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_9 = __pyx_t_15;
      __pyx_L5_bool_binop_done:;
      if (unlikely(!__pyx_t_9)) {

        /* "cytimes/utils.py":1332
 *             and (-1000 < t_n.microsecond - t_c.microsecond < 1000)
 *             and (t_n.tzinfo == t_c.tzinfo)
 *         ), f"{t_n} != {t_c}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: time_generate")
*/
        __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_t_n, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_t_c, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_16[0] = __pyx_t_11;
        __pyx_t_16[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_16[2] = __pyx_t_13;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 1326, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1326, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1320
 * 
 *     # Now
 *     for t_n, t_c in (             # <<<<<<<<<<<<<<
 *         (datetime.datetime.now().time(), time_now()),  # type: ignore
 *         (datetime.datetime.now().time(), time_now(None)),  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/utils.py":1334
 *         ), f"{t_n} != {t_c}"
 * 
 *     print("Passed: time_generate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Time
*/
  __pyx_t_4 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_time_generate};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/utils.py":1336
 *     print("Passed: time_generate")
 * 
 *     del datetime, Time             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Time); __pyx_v_Time = 0;

  /* "cytimes/utils.py":1297
 * 
 * # datetime.time
 * def _test_time_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.utils._test_time_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Time);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XDECREF(__pyx_v_t_n);
  __Pyx_XDECREF(__pyx_v_t_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1339
 * 
 * 
 * def _test_time_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_63_test_time_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_63_test_time_type_check = {"_test_time_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_63_test_time_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_63_test_time_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_time_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_62_test_time_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_62_test_time_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_CustomTime = NULL;
  PyObject *__pyx_v_time = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_time_type_check", 0);

  /* "cytimes/utils.py":1340
 * 
 * def _test_time_type_check() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     class CustomTime(datetime.time):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1342
 *     import datetime
 * 
 *     class CustomTime(datetime.time):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1342, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomTime, __pyx_mstate_global->__pyx_n_u_test_time_type_check_locals_Cus, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_1 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1342, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CustomTime, __pyx_t_1, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_CustomTime = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1345
 *         pass
 * 
 *     time = datetime.time(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_time(time)  # type: ignore
 *     assert is_time_exact(time)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_time = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1346
 * 
 *     time = datetime.time(1, 1, 1)
 *     assert is_time(time)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_time_exact(time)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_time(__pyx_v_time); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1346, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1346, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1346, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1347
 *     time = datetime.time(1, 1, 1)
 *     assert is_time(time)  # type: ignore
 *     assert is_time_exact(time)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     time = CustomTime(1, 1, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_time_exact(__pyx_v_time); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1347, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1347, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1347, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1349
 *     assert is_time_exact(time)  # type: ignore
 * 
 *     time = CustomTime(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_time(time)  # type: ignore
 *     assert not is_time_exact(time)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_CustomTime, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_time, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1350
 * 
 *     time = CustomTime(1, 1, 1)
 *     assert is_time(time)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_time_exact(time)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_time(__pyx_v_time); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1350, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1350, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1350, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1351
 *     time = CustomTime(1, 1, 1)
 *     assert is_time(time)  # type: ignore
 *     assert not is_time_exact(time)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: time_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_time_exact(__pyx_v_time); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1351, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_6);
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1351, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1351, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1353
 *     assert not is_time_exact(time)  # type: ignore
 * 
 *     print("Passed: time_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del CustomTime, datetime
*/
  __pyx_t_1 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Passed_time_type_check};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1355
 *     print("Passed: time_type_check")
 * 
 *     del CustomTime, datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_CustomTime); __pyx_v_CustomTime = 0;
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1339
 * 
 * 
 * def _test_time_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_time_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_CustomTime);
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1358
 * 
 * 
 * def _test_time_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_65_test_time_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_65_test_time_conversion = {"_test_time_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_65_test_time_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_65_test_time_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_time_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_64_test_time_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_64_test_time_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_Time = NULL;
  PyObject *__pyx_v_tz1 = NULL;
  PyObject *__pyx_v_t1 = NULL;
  PyObject *__pyx_v_t_tz1 = NULL;
  PyObject *__pyx_v_pt = NULL;
  PyObject *__pyx_v_pt_tz1 = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_dt_tz1 = NULL;
  PyObject *__pyx_v_secs = NULL;
  PyObject *__pyx_v_us = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_time_isoformat __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_time __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_dt __pyx_t_12;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_sec __pyx_t_13;
  struct __pyx_opt_args_7cytimes_5utils_time_fr_us __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_time_conversion", 0);

  /* "cytimes/utils.py":1359
 * 
 * def _test_time_conversion() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 *     from pendulum import Time
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1360
 * def _test_time_conversion() -> None:
 *     import datetime
 *     from pendulum import Time             # <<<<<<<<<<<<<<
 * 
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Time};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pendulum, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Time};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Time = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1362
 *     from pendulum import Time
 * 
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     t1 = datetime.time(3, 4, 5, 6)
 *     t_tz1 = datetime.time(3, 4, 5, 6, tz1)
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1362, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_8, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __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(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_tz1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1363
 * 
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     t1 = datetime.time(3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     t_tz1 = datetime.time(3, 4, 5, 6, tz1)
 *     pt = Time(3, 4, 5, 6)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[24], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_t1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1364
 *     tz1 = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     t1 = datetime.time(3, 4, 5, 6)
 *     t_tz1 = datetime.time(3, 4, 5, 6, tz1)             # <<<<<<<<<<<<<<
 *     pt = Time(3, 4, 5, 6)
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)
*/
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz1};
    __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_v_t_tz1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1365
 *     t1 = datetime.time(3, 4, 5, 6)
 *     t_tz1 = datetime.time(3, 4, 5, 6, tz1)
 *     pt = Time(3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)
 *     dt = datetime.datetime(1970, 1, 1, 3, 4, 5, 6)
*/
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_Time, __pyx_mstate_global->__pyx_tuple[24], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_pt = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1366
 *     t_tz1 = datetime.time(3, 4, 5, 6, tz1)
 *     pt = Time(3, 4, 5, 6)
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)             # <<<<<<<<<<<<<<
 *     dt = datetime.datetime(1970, 1, 1, 3, 4, 5, 6)
 *     dt_tz1 = datetime.datetime(1970, 1, 1, 3, 4, 5, 6, tz1)
*/
  __pyx_t_1 = NULL;
  __Pyx_INCREF(__pyx_v_Time);
  __pyx_t_4 = __pyx_v_Time; 
  __pyx_t_7 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    assert(__pyx_t_1);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
    __pyx_t_7 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz1};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __pyx_v_pt_tz1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1367
 *     pt = Time(3, 4, 5, 6)
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)
 *     dt = datetime.datetime(1970, 1, 1, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     dt_tz1 = datetime.datetime(1970, 1, 1, 3, 4, 5, 6, tz1)
 * 
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[49], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_dt = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1368
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)
 *     dt = datetime.datetime(1970, 1, 1, 3, 4, 5, 6)
 *     dt_tz1 = datetime.datetime(1970, 1, 1, 3, 4, 5, 6, tz1)             # <<<<<<<<<<<<<<
 * 
 *     assert "03:04:05.000006" == time_isoformat(t_tz1, False)  # type: ignore
*/
  __pyx_t_5 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[9] = {__pyx_t_5, __pyx_mstate_global->__pyx_int_1970, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6, __pyx_v_tz1};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime, __pyx_callargs+__pyx_t_7, (9-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_v_dt_tz1 = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1370
 *     dt_tz1 = datetime.datetime(1970, 1, 1, 3, 4, 5, 6, tz1)
 * 
 *     assert "03:04:05.000006" == time_isoformat(t_tz1, False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "03:04:05.000006+0101" == time_isoformat(t_tz1, True)  # type: ignore
 *     assert "03:04:05" == time_isoformat(t_tz1.replace(microsecond=0), False)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1370, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.utc = 0;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_time_isoformat(((PyDateTime_Time *)__pyx_v_t_tz1), &__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_03_04_05_000006, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1370, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1370, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1370, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1371
 * 
 *     assert "03:04:05.000006" == time_isoformat(t_tz1, False)  # type: ignore
 *     assert "03:04:05.000006+0101" == time_isoformat(t_tz1, True)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "03:04:05" == time_isoformat(t_tz1.replace(microsecond=0), False)  # type: ignore
 *     assert "03:04:05+0101" == time_isoformat(t_tz1.replace(microsecond=0), True)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1371, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.utc = 1;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_time_isoformat(((PyDateTime_Time *)__pyx_v_t_tz1), &__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_03_04_05_000006_0101, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1371, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1371, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1372
 *     assert "03:04:05.000006" == time_isoformat(t_tz1, False)  # type: ignore
 *     assert "03:04:05.000006+0101" == time_isoformat(t_tz1, True)  # type: ignore
 *     assert "03:04:05" == time_isoformat(t_tz1.replace(microsecond=0), False)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "03:04:05+0101" == time_isoformat(t_tz1.replace(microsecond=0), True)  # type: ignore
 *     secs = t1.hour * 3600 + t1.minute * 60 + t1.second + t1.microsecond / 1_000_000
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __pyx_v_t_tz1;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_0, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1372, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.utc = 0;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_time_isoformat(((PyDateTime_Time *)__pyx_t_4), &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_03_04_05, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1372, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1372, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1373
 *     assert "03:04:05.000006+0101" == time_isoformat(t_tz1, True)  # type: ignore
 *     assert "03:04:05" == time_isoformat(t_tz1.replace(microsecond=0), False)  # type: ignore
 *     assert "03:04:05+0101" == time_isoformat(t_tz1.replace(microsecond=0), True)  # type: ignore             # <<<<<<<<<<<<<<
 *     secs = t1.hour * 3600 + t1.minute * 60 + t1.second + t1.microsecond / 1_000_000
 *     assert secs == time_to_sec(t1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_t_tz1;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microsecond, __pyx_mstate_global->__pyx_int_0, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1373, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_replace, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __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(0, 1373, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.utc = 1;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_time_isoformat(((PyDateTime_Time *)__pyx_t_1), &__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_03_04_05_0101, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1373, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1373, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1374
 *     assert "03:04:05" == time_isoformat(t_tz1.replace(microsecond=0), False)  # type: ignore
 *     assert "03:04:05+0101" == time_isoformat(t_tz1.replace(microsecond=0), True)  # type: ignore
 *     secs = t1.hour * 3600 + t1.minute * 60 + t1.second + t1.microsecond / 1_000_000             # <<<<<<<<<<<<<<
 *     assert secs == time_to_sec(t1)  # type: ignore
 *     assert secs == time_to_sec(t_tz1)  # type: ignore
*/
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_t1, __pyx_mstate_global->__pyx_n_u_hour); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyLong_MultiplyObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_3600, 0xE10, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_t1, __pyx_mstate_global->__pyx_n_u_minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_60, 60, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t1, __pyx_mstate_global->__pyx_n_u_second); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_t1, __pyx_mstate_global->__pyx_n_u_microsecond); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyLong_TrueDivideObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_secs = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1375
 *     assert "03:04:05+0101" == time_isoformat(t_tz1.replace(microsecond=0), True)  # type: ignore
 *     secs = t1.hour * 3600 + t1.minute * 60 + t1.second + t1.microsecond / 1_000_000
 *     assert secs == time_to_sec(t1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert secs == time_to_sec(t_tz1)  # type: ignore
 *     us = int(secs * 1_000_000)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1375, __pyx_L1_error)
    __pyx_t_4 = PyFloat_FromDouble(__pyx_f_7cytimes_5utils_time_to_sec(((PyDateTime_Time *)__pyx_v_t1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1375, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1375, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1375, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1376
 *     secs = t1.hour * 3600 + t1.minute * 60 + t1.second + t1.microsecond / 1_000_000
 *     assert secs == time_to_sec(t1)  # type: ignore
 *     assert secs == time_to_sec(t_tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     us = int(secs * 1_000_000)
 *     assert us == time_to_us(t1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1376, __pyx_L1_error)
    __pyx_t_5 = PyFloat_FromDouble(__pyx_f_7cytimes_5utils_time_to_sec(((PyDateTime_Time *)__pyx_v_t_tz1))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1376, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1376, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1377
 *     assert secs == time_to_sec(t1)  # type: ignore
 *     assert secs == time_to_sec(t_tz1)  # type: ignore
 *     us = int(secs * 1_000_000)             # <<<<<<<<<<<<<<
 *     assert us == time_to_us(t1)  # type: ignore
 *     assert us == time_to_us(t_tz1)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_v_secs, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_us = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":1378
 *     assert secs == time_to_sec(t_tz1)  # type: ignore
 *     us = int(secs * 1_000_000)
 *     assert us == time_to_us(t1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert us == time_to_us(t_tz1)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1378, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_time_to_us(((PyDateTime_Time *)__pyx_v_t1))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_us, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1378, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1378, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1378, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1379
 *     us = int(secs * 1_000_000)
 *     assert us == time_to_us(t1)  # type: ignore
 *     assert us == time_to_us(t_tz1)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert t1 == time_fr_time(pt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1379, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_time_to_us(((PyDateTime_Time *)__pyx_v_t_tz1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_us, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1379, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1379, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1381
 *     assert us == time_to_us(t_tz1)  # type: ignore
 * 
 *     assert t1 == time_fr_time(pt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert t_tz1 == time_fr_time(pt_tz1)  # type: ignore
 *     assert type(time_fr_time(pt)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1381, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_t1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1381, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1381, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1382
 * 
 *     assert t1 == time_fr_time(pt)  # type: ignore
 *     assert t_tz1 == time_fr_time(pt_tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(pt)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, None)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1382, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt_tz1), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_t_tz1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1382, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1382, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1383
 *     assert t1 == time_fr_time(pt)  # type: ignore
 *     assert t_tz1 == time_fr_time(pt_tz1)  # type: ignore
 *     assert type(time_fr_time(pt)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(pt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, datetime.time)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1383, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1383, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1383, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1384
 *     assert t_tz1 == time_fr_time(pt_tz1)  # type: ignore
 *     assert type(time_fr_time(pt)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, None)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(pt, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, Time)) is Time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1384, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt), &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1384, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1384, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1385
 *     assert type(time_fr_time(pt)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, datetime.time)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(pt, Time)) is Time  # type: ignore
 *     assert type(time_fr_time(t1)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1385, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = __pyx_t_5;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt), &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1385, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1385, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1386
 *     assert type(time_fr_time(pt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, Time)) is Time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(t1)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, None)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_pt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_pt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1386, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = __pyx_v_Time;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_pt), &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_v_Time);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1386, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1386, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1387
 *     assert type(time_fr_time(pt, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(pt, Time)) is Time  # type: ignore
 *     assert type(time_fr_time(t1)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(t1, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, datetime.time)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1387, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_t1), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1387, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1387, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1388
 *     assert type(time_fr_time(pt, Time)) is Time  # type: ignore
 *     assert type(time_fr_time(t1)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, None)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(t1, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, Time)) is Time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1388, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_t1), &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1388, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1388, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1389
 *     assert type(time_fr_time(t1)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, datetime.time)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_time(t1, Time)) is Time  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1389, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = __pyx_t_5;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_t1), &__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1389, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1389, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1390
 *     assert type(time_fr_time(t1, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_time(t1, Time)) is Time  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert t1 == time_fr_dt(dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1390, __pyx_L1_error)
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.tclass = __pyx_v_Time;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_time(((PyDateTime_Time *)__pyx_v_t1), &__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_v_Time);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1390, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1390, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1392
 *     assert type(time_fr_time(t1, Time)) is Time  # type: ignore
 * 
 *     assert t1 == time_fr_dt(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert t_tz1 == time_fr_dt(dt_tz1)  # type: ignore
 *     assert type(time_fr_dt(dt)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1392, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_t1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1392, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1392, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1392, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1393
 * 
 *     assert t1 == time_fr_dt(dt)  # type: ignore
 *     assert t_tz1 == time_fr_dt(dt_tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_dt(dt)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, None)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt_tz1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt_tz1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1393, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt_tz1), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_t_tz1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1393, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1393, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1394
 *     assert t1 == time_fr_dt(dt)  # type: ignore
 *     assert t_tz1 == time_fr_dt(dt_tz1)  # type: ignore
 *     assert type(time_fr_dt(dt)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_dt(dt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, datetime.time)) is datetime.time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1394, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1394, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1394, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1395
 *     assert t_tz1 == time_fr_dt(dt_tz1)  # type: ignore
 *     assert type(time_fr_dt(dt)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, None)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_dt(dt, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, Time)) is Time  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1395, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tclass = Py_None;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1395, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1395, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1396
 *     assert type(time_fr_dt(dt)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, datetime.time)) is datetime.time  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(time_fr_dt(dt, Time)) is Time  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1396, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tclass = __pyx_t_5;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_4)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1396, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1396, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1397
 *     assert type(time_fr_dt(dt, None)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, datetime.time)) is datetime.time  # type: ignore
 *     assert type(time_fr_dt(dt, Time)) is Time  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     assert t1 == time_fr_sec(time_to_sec(t1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1397, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tclass = __pyx_v_Time;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_dt(((PyDateTime_DateTime *)__pyx_v_dt), &__pyx_t_12)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_v_Time);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1397, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1397, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1399
 *     assert type(time_fr_dt(dt, Time)) is Time  # type: ignore
 * 
 *     assert t1 == time_fr_sec(time_to_sec(t1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert t_tz1 == time_fr_sec(time_to_sec(t1), tz1)  # type: ignore
 *     assert t1 == time_fr_us(time_to_us(t1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1399, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_sec(__pyx_f_7cytimes_5utils_time_to_sec(((PyDateTime_Time *)__pyx_v_t1)), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_t1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1399, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1399, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1400
 * 
 *     assert t1 == time_fr_sec(time_to_sec(t1))  # type: ignore
 *     assert t_tz1 == time_fr_sec(time_to_sec(t1), tz1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert t1 == time_fr_us(time_to_us(t1))  # type: ignore
 *     assert t_tz1 == time_fr_us(time_to_us(t1), tz1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1400, __pyx_L1_error)
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.tzinfo = __pyx_v_tz1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_sec(__pyx_f_7cytimes_5utils_time_to_sec(((PyDateTime_Time *)__pyx_v_t1)), &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_t_tz1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1400, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1400, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1401
 *     assert t1 == time_fr_sec(time_to_sec(t1))  # type: ignore
 *     assert t_tz1 == time_fr_sec(time_to_sec(t1), tz1)  # type: ignore
 *     assert t1 == time_fr_us(time_to_us(t1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert t_tz1 == time_fr_us(time_to_us(t1), tz1)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1401, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_us(__pyx_f_7cytimes_5utils_time_to_us(((PyDateTime_Time *)__pyx_v_t1)), NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_t1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1401, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1401, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1402
 *     assert t_tz1 == time_fr_sec(time_to_sec(t1), tz1)  # type: ignore
 *     assert t1 == time_fr_us(time_to_us(t1))  # type: ignore
 *     assert t_tz1 == time_fr_us(time_to_us(t1), tz1)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: time_conversion")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_t1) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_t1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_time))))) __PYX_ERR(0, 1402, __pyx_L1_error)
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.tzinfo = __pyx_v_tz1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_time_fr_us(__pyx_f_7cytimes_5utils_time_to_us(((PyDateTime_Time *)__pyx_v_t1)), &__pyx_t_14)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_t_tz1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_10)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1402, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1402, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1404
 *     assert t_tz1 == time_fr_us(time_to_us(t1), tz1)  # type: ignore
 * 
 *     print("Passed: time_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, Time
*/
  __pyx_t_4 = NULL;
  __pyx_t_7 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_time_conversion};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1406
 *     print("Passed: time_conversion")
 * 
 *     del datetime, Time             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_Time); __pyx_v_Time = 0;

  /* "cytimes/utils.py":1358
 * 
 * 
 * def _test_time_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cytimes.utils._test_time_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_Time);
  __Pyx_XDECREF(__pyx_v_tz1);
  __Pyx_XDECREF(__pyx_v_t1);
  __Pyx_XDECREF(__pyx_v_t_tz1);
  __Pyx_XDECREF(__pyx_v_pt);
  __Pyx_XDECREF(__pyx_v_pt_tz1);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_dt_tz1);
  __Pyx_XDECREF(__pyx_v_secs);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1410
 * 
 * # datetime.timedelta
 * def _test_timedelta_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_67_test_timedelta_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_67_test_timedelta_generate = {"_test_timedelta_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_67_test_timedelta_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_67_test_timedelta_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_timedelta_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_66_test_timedelta_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_66_test_timedelta_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_CustomTD = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_7cytimes_5utils_td_new __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_timedelta_generate", 0);

  /* "cytimes/utils.py":1411
 * # datetime.timedelta
 * def _test_timedelta_generate() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     class CustomTD(datetime.timedelta):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1413
 *     import datetime
 * 
 *     class CustomTD(datetime.timedelta):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1413, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_mstate_global->__pyx_n_u_test_timedelta_generate_locals, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_1 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1413, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_t_1, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_CustomTD = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1417
 * 
 *     # New
 *     assert datetime.timedelta(0, 0, 0) == td_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(0, 0, 0) == td_new(0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[50], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1417, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1417, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1418
 *     # New
 *     assert datetime.timedelta(0, 0, 0) == td_new()  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[50], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.days = 0;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1418, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1418, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1419
 *     assert datetime.timedelta(0, 0, 0) == td_new()  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[50], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.days = 0;
    __pyx_t_7.seconds = 0;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1419, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1419, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1420
 *     assert datetime.timedelta(0, 0, 0) == td_new(0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[50], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.days = 0;
    __pyx_t_7.seconds = 0;
    __pyx_t_7.microseconds = 0;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1420, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1420, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1421
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[51], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.days = 1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1421, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1421, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1421, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1422
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[52], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.days = 1;
    __pyx_t_7.seconds = 1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1422, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1422, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1423
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.days = 1;
    __pyx_t_7.seconds = 1;
    __pyx_t_7.microseconds = 1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1423, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1423, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1424
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[53], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7.__pyx_n = 1;
    __pyx_t_7.days = -1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1424, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1424, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1425
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[54], NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7.__pyx_n = 2;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1425, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1425, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1426
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, None)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[29], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_7.microseconds = -1;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1426, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1426, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1427
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_new(-1, -1, -1, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, datetime.timedelta)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7.__pyx_n = 3;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_7.microseconds = -1;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1427, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1427, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1428
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, None)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_new(-1, -1, -1, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, CustomTD)) is CustomTD  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7.__pyx_n = 4;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_7.microseconds = -1;
    __pyx_t_7.tdclass = Py_None;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1428, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1428, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1429
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, datetime.timedelta)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_new(-1, -1, -1, CustomTD)) is CustomTD  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7.__pyx_n = 4;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_7.microseconds = -1;
    __pyx_t_7.tdclass = __pyx_t_5;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1429, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1429, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1430
 *     assert type(td_new(-1, -1, -1, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_new(-1, -1, -1, CustomTD)) is CustomTD  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: timedelta_generate")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_7.__pyx_n = 4;
    __pyx_t_7.days = -1;
    __pyx_t_7.seconds = -1;
    __pyx_t_7.microseconds = -1;
    __pyx_t_7.tdclass = __pyx_v_CustomTD;
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_td_new(&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_5)) == __pyx_v_CustomTD);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1430, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1430, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1432
 *     assert type(td_new(-1, -1, -1, CustomTD)) is CustomTD  # type: ignore
 * 
 *     print("Passed: timedelta_generate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, CustomTD
*/
  __pyx_t_1 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Passed_timedelta_generate};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1434
 *     print("Passed: timedelta_generate")
 * 
 *     del datetime, CustomTD             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_CustomTD); __pyx_v_CustomTD = 0;

  /* "cytimes/utils.py":1410
 * 
 * # datetime.timedelta
 * def _test_timedelta_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_timedelta_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_CustomTD);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1437
 * 
 * 
 * def _test_timedelta_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_69_test_timedelta_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_69_test_timedelta_type_check = {"_test_timedelta_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_69_test_timedelta_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_69_test_timedelta_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_timedelta_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_68_test_timedelta_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_68_test_timedelta_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_CustomTD = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_timedelta_type_check", 0);

  /* "cytimes/utils.py":1438
 * 
 * def _test_timedelta_type_check() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     class CustomTD(datetime.timedelta):
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1440
 *     import datetime
 * 
 *     class CustomTD(datetime.timedelta):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1440, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_mstate_global->__pyx_n_u_test_timedelta_type_check_local, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_1 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1440, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_t_1, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_CustomTD = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1443
 *         pass
 * 
 *     td = datetime.timedelta(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_td(td)  # type: ignore
 *     assert is_td_exact(td)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_td = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1444
 * 
 *     td = datetime.timedelta(1, 1, 1)
 *     assert is_td(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_td_exact(td)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_td(__pyx_v_td); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1444, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1444, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1444, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1445
 *     td = datetime.timedelta(1, 1, 1)
 *     assert is_td(td)  # type: ignore
 *     assert is_td_exact(td)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td = CustomTD(1, 1, 1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_td_exact(__pyx_v_td); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1445, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1445, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1445, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1447
 *     assert is_td_exact(td)  # type: ignore
 * 
 *     td = CustomTD(1, 1, 1)             # <<<<<<<<<<<<<<
 *     assert is_td(td)  # type: ignore
 *     assert not is_td_exact(td)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_CustomTD, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_td, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1448
 * 
 *     td = CustomTD(1, 1, 1)
 *     assert is_td(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_td_exact(td)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_td(__pyx_v_td); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1448, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1448, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1448, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1449
 *     td = CustomTD(1, 1, 1)
 *     assert is_td(td)  # type: ignore
 *     assert not is_td_exact(td)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: timedelta_type_chech")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_td_exact(__pyx_v_td); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1449, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_6);
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1449, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1449, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1451
 *     assert not is_td_exact(td)  # type: ignore
 * 
 *     print("Passed: timedelta_type_chech")             # <<<<<<<<<<<<<<
 * 
 *     del CustomTD, datetime
*/
  __pyx_t_1 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Passed_timedelta_type_chech};
    __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cytimes/utils.py":1453
 *     print("Passed: timedelta_type_chech")
 * 
 *     del CustomTD, datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_CustomTD); __pyx_v_CustomTD = 0;
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1437
 * 
 * 
 * def _test_timedelta_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_timedelta_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_CustomTD);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1456
 * 
 * 
 * def _test_timedelta_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_71_test_timedelta_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_71_test_timedelta_conversion = {"_test_timedelta_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_71_test_timedelta_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_71_test_timedelta_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_timedelta_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_70_test_timedelta_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_70_test_timedelta_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  long __pyx_v_h;
  long __pyx_v_m;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_v_dt_str = NULL;
  PyObject *__pyx_v_tz_str = NULL;
  PyObject *__pyx_v_secs = NULL;
  PyObject *__pyx_v_CustomTD = NULL;
  PyObject *__pyx_v_ctd = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  long __pyx_t_6;
  long __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  struct __pyx_opt_args_7cytimes_5utils_td_fr_td __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_timedelta_conversion", 0);

  /* "cytimes/utils.py":1457
 * 
 * def _test_timedelta_conversion() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1459
 *     import datetime
 * 
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[55], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1459, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_00_00_01, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1459, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1459, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1459, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1460
 * 
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[55], __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1460, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_00_01_01, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1460, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1460, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1460, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1461
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[56], __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1461, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1461, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1461, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1461, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1462
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1462, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[52], __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1462, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_001000, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1462, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1462, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1462, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1463
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1463, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_000001, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1463, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1463, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1463, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1464
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1464, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[16], __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1464, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_001001, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1464, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1464, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1464, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1465
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[57], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1465, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_00_00_01_2, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1465, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1465, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1466
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[57], __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1466, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_00_01_01_2, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1466, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1466, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1467
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore
 *     assert "-24:01:01.000001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1467, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[58], __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1467, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_2, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1467, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1467, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1467, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1468
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-24:01:01.000001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01.001001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1, milliseconds=-1))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1468, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[54], __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1468, __pyx_L1_error)
    __pyx_t_5 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_001000_2, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1468, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1468, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1469
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore
 *     assert "-24:01:01.000001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-24:01:01.001001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1, milliseconds=-1))  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[29], __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1469, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_000001_2, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1469, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1469, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1470
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore
 *     assert "-24:01:01.000001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01.001001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1, milliseconds=-1))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for h in range(-23, 24):
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1470, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_milliseconds, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[29], __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1470, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_7cytimes_5utils_td_isoformat(((PyDateTime_Delta *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_24_01_01_001001_2, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1470, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1470, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1472
 *     assert "-24:01:01.001001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1, milliseconds=-1))  # type: ignore
 * 
 *     for h in range(-23, 24):             # <<<<<<<<<<<<<<
 *         for m in range(-59, 60):
 *             td = datetime.timedelta(hours=h, minutes=m)
*/
  for (__pyx_t_6 = -23L; __pyx_t_6 < 24; __pyx_t_6+=1) {
    __pyx_v_h = __pyx_t_6;

    /* "cytimes/utils.py":1473
 * 
 *     for h in range(-23, 24):
 *         for m in range(-59, 60):             # <<<<<<<<<<<<<<
 *             td = datetime.timedelta(hours=h, minutes=m)
 *             dt_str = str(datetime.datetime.now(datetime.timezone(td)))
*/
    for (__pyx_t_7 = -59L; __pyx_t_7 < 60; __pyx_t_7+=1) {
      __pyx_v_m = __pyx_t_7;

      /* "cytimes/utils.py":1474
 *     for h in range(-23, 24):
 *         for m in range(-59, 60):
 *             td = datetime.timedelta(hours=h, minutes=m)             # <<<<<<<<<<<<<<
 *             dt_str = str(datetime.datetime.now(datetime.timezone(td)))
 *             tz_str = dt_str[len(dt_str) - 6 :]
*/
      __pyx_t_5 = __pyx_v_datetime;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_v_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_t_1, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1474, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1474, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cytimes/utils.py":1475
 *         for m in range(-59, 60):
 *             td = datetime.timedelta(hours=h, minutes=m)
 *             dt_str = str(datetime.datetime.now(datetime.timezone(td)))             # <<<<<<<<<<<<<<
 *             tz_str = dt_str[len(dt_str) - 6 :]
 *             with cython.wraparound(True):
*/
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __pyx_t_8;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_5 = __pyx_v_datetime;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_td};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_8 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_dt_str, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/utils.py":1476
 *             td = datetime.timedelta(hours=h, minutes=m)
 *             dt_str = str(datetime.datetime.now(datetime.timezone(td)))
 *             tz_str = dt_str[len(dt_str) - 6 :]             # <<<<<<<<<<<<<<
 *             with cython.wraparound(True):
 *                 tz_str = tz_str[:-3] + tz_str[-2:]
*/
      __pyx_t_11 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_dt_str); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1476, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyUnicode_Substring(__pyx_v_dt_str, (__pyx_t_11 - 6), PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_tz_str, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "cytimes/utils.py":1478
 *             tz_str = dt_str[len(dt_str) - 6 :]
 *             with cython.wraparound(True):
 *                 tz_str = tz_str[:-3] + tz_str[-2:]             # <<<<<<<<<<<<<<
 *             assert tz_str == td_utcformat(td)  # type: ignore
 * 
*/
      __pyx_t_8 = __Pyx_PyUnicode_Substring(__pyx_v_tz_str, 0, -3L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_v_tz_str, -2L, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_tz_str, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cytimes/utils.py":1479
 *             with cython.wraparound(True):
 *                 tz_str = tz_str[:-3] + tz_str[-2:]
 *             assert tz_str == td_utcformat(td)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td = datetime.timedelta(1, 1, 1)
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1479, __pyx_L1_error)
        __pyx_t_1 = __pyx_f_7cytimes_5utils_td_utcformat(((PyDateTime_Delta *)__pyx_v_td)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_tz_str, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1479, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1479, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1479, __pyx_L1_error)
      #endif
    }
  }

  /* "cytimes/utils.py":1481
 *             assert tz_str == td_utcformat(td)  # type: ignore
 * 
 *     td = datetime.timedelta(1, 1, 1)             # <<<<<<<<<<<<<<
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1482
 * 
 *     td = datetime.timedelta(1, 1, 1)
 *     secs = td.total_seconds()             # <<<<<<<<<<<<<<
 *     assert secs == td_to_sec(td)  # type: ignore
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
*/
  __pyx_t_1 = __pyx_v_td;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_seconds, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __pyx_v_secs = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1483
 *     td = datetime.timedelta(1, 1, 1)
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
 *     td = datetime.timedelta(-1, -1, -1)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1483, __pyx_L1_error)
    __pyx_t_3 = PyFloat_FromDouble(__pyx_f_7cytimes_5utils_td_to_sec(((PyDateTime_Delta *)__pyx_v_td))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1483, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1483, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1484
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     td = datetime.timedelta(-1, -1, -1)
 *     secs = td.total_seconds()
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyLong_MultiplyObjC(__pyx_v_secs, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1484, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_td_to_us(((PyDateTime_Delta *)__pyx_v_td))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1484, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1484, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1485
 *     assert secs == td_to_sec(td)  # type: ignore
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
 *     td = datetime.timedelta(-1, -1, -1)             # <<<<<<<<<<<<<<
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore
*/
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[29], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_td, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1486
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
 *     td = datetime.timedelta(-1, -1, -1)
 *     secs = td.total_seconds()             # <<<<<<<<<<<<<<
 *     assert secs == td_to_sec(td)  # type: ignore
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
*/
  __pyx_t_8 = __pyx_v_td;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_total_seconds, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_secs, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1487
 *     td = datetime.timedelta(-1, -1, -1)
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1487, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7cytimes_5utils_td_to_sec(((PyDateTime_Delta *)__pyx_v_td))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_secs, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1487, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1487, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1487, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1487, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1488
 *     secs = td.total_seconds()
 *     assert secs == td_to_sec(td)  # type: ignore
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     class CustomTD(datetime.timedelta):
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_8 = __Pyx_PyLong_MultiplyObjC(__pyx_v_secs, __pyx_mstate_global->__pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1488, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_f_7cytimes_5utils_td_to_us(((PyDateTime_Delta *)__pyx_v_td))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1488, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1488, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1488, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1490
 *     assert int(secs * 1_000_000) == td_to_us(td)  # type: ignore
 * 
 *     class CustomTD(datetime.timedelta):             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1490, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_mstate_global->__pyx_n_u_test_timedelta_conversion_local, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (__pyx_t_3 != __pyx_t_8) {
    if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 1490, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CustomTD, __pyx_t_3, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_CustomTD = __pyx_t_8;
  __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":1493
 *         pass
 * 
 *     ctd = CustomTD(-1, -1, -1)             # <<<<<<<<<<<<<<
 *     assert td == td_fr_td(ctd)  # type: ignore
 *     assert type(td_fr_td(ctd)) is datetime.timedelta  # type: ignore
*/
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_CustomTD, __pyx_mstate_global->__pyx_tuple[29], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_ctd = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1494
 * 
 *     ctd = CustomTD(-1, -1, -1)
 *     assert td == td_fr_td(ctd)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(ctd)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, None)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_ctd) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ctd, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1494, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_ctd), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_td, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1494, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1494, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1495
 *     ctd = CustomTD(-1, -1, -1)
 *     assert td == td_fr_td(ctd)  # type: ignore
 *     assert type(td_fr_td(ctd)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(ctd, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, datetime.timedelta)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_ctd) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ctd, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1495, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_ctd), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1495, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1495, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1496
 *     assert td == td_fr_td(ctd)  # type: ignore
 *     assert type(td_fr_td(ctd)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, None)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(ctd, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, CustomTD)) is CustomTD  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_ctd) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ctd, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1496, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = Py_None;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_ctd), &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_3)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1496, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1496, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1497
 *     assert type(td_fr_td(ctd)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, datetime.timedelta)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(ctd, CustomTD)) is CustomTD  # type: ignore
 *     assert type(td_fr_td(td)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_ctd) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ctd, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1497, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = __pyx_t_1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_ctd), &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_3)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1497, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1497, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1498
 *     assert type(td_fr_td(ctd, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, CustomTD)) is CustomTD  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(td)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, None)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_ctd) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ctd, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1498, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = __pyx_v_CustomTD;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_ctd), &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_v_CustomTD);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1498, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1498, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1499
 *     assert type(td_fr_td(ctd, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(ctd, CustomTD)) is CustomTD  # type: ignore
 *     assert type(td_fr_td(td)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(td, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, datetime.timedelta)) is datetime.timedelta  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1499, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_td), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1499, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1499, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1500
 *     assert type(td_fr_td(ctd, CustomTD)) is CustomTD  # type: ignore
 *     assert type(td_fr_td(td)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, None)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(td, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, CustomTD)) is CustomTD  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1500, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = Py_None;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_td), &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_3)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1500, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1500, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1501
 *     assert type(td_fr_td(td)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, datetime.timedelta)) is datetime.timedelta  # type: ignore             # <<<<<<<<<<<<<<
 *     assert type(td_fr_td(td, CustomTD)) is CustomTD  # type: ignore
 *     assert td == td_fr_sec(td_to_sec(td))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1501, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = __pyx_t_1;
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_td), &__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timedelta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_3)) == __pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1501, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1501, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1502
 *     assert type(td_fr_td(td, None)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, CustomTD)) is CustomTD  # type: ignore             # <<<<<<<<<<<<<<
 *     assert td == td_fr_sec(td_to_sec(td))  # type: ignore
 *     assert td == td_fr_us(td_to_us(td))  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1502, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.tdclass = __pyx_v_CustomTD;
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_td(((PyDateTime_Delta *)__pyx_v_td), &__pyx_t_12)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_t_1)) == __pyx_v_CustomTD);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1502, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1502, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1503
 *     assert type(td_fr_td(td, datetime.timedelta)) is datetime.timedelta  # type: ignore
 *     assert type(td_fr_td(td, CustomTD)) is CustomTD  # type: ignore
 *     assert td == td_fr_sec(td_to_sec(td))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert td == td_fr_us(td_to_us(td))  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1503, __pyx_L1_error)
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_sec(__pyx_f_7cytimes_5utils_td_to_sec(((PyDateTime_Delta *)__pyx_v_td)), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_td, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1503, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1503, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1504
 *     assert type(td_fr_td(td, CustomTD)) is CustomTD  # type: ignore
 *     assert td == td_fr_sec(td_to_sec(td))  # type: ignore
 *     assert td == td_fr_us(td_to_us(td))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: timedelta_conversion")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_td) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_td, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_timedelta))))) __PYX_ERR(0, 1504, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_td_fr_us(__pyx_f_7cytimes_5utils_td_to_us(((PyDateTime_Delta *)__pyx_v_td)), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_td, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1504, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1504, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1506
 *     assert td == td_fr_us(td_to_us(td))  # type: ignore
 * 
 *     print("Passed: timedelta_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del CustomTD, datetime
*/
  __pyx_t_3 = NULL;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_timedelta_conversion};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1508
 *     print("Passed: timedelta_conversion")
 * 
 *     del CustomTD, datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_CustomTD); __pyx_v_CustomTD = 0;
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1456
 * 
 * 
 * def _test_timedelta_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils._test_timedelta_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_dt_str);
  __Pyx_XDECREF(__pyx_v_tz_str);
  __Pyx_XDECREF(__pyx_v_secs);
  __Pyx_XDECREF(__pyx_v_CustomTD);
  __Pyx_XDECREF(__pyx_v_ctd);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1512
 * 
 * # datetime.tzinfo
 * def _test_tzinfo_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, time
 *     from babel.dates import LOCALTZ
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_73_test_tzinfo_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_73_test_tzinfo_generate = {"_test_tzinfo_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_73_test_tzinfo_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_73_test_tzinfo_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_tzinfo_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_72_test_tzinfo_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_72_test_tzinfo_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_time = NULL;
  PyObject *__pyx_v_LOCALTZ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_new __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_tzinfo_generate", 0);

  /* "cytimes/utils.py":1513
 * # datetime.tzinfo
 * def _test_tzinfo_generate() -> None:
 *     import datetime, time             # <<<<<<<<<<<<<<
 *     from babel.dates import LOCALTZ
 * 
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_time = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1514
 * def _test_tzinfo_generate() -> None:
 *     import datetime, time
 *     from babel.dates import LOCALTZ             # <<<<<<<<<<<<<<
 * 
 *     # New
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LOCALTZ};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_babel_dates, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LOCALTZ};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_LOCALTZ = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1517
 * 
 *     # New
 *     assert datetime.timezone.utc == tz_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timezone(datetime.timedelta(hours=1, minutes=1)) == tz_new(1, 1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=-1, minutes=-1)) == tz_new(-1, -1)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_utc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_new(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1517, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1517, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1518
 *     # New
 *     assert datetime.timezone.utc == tz_new()  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=1, minutes=1)) == tz_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timezone(datetime.timedelta(hours=-1, minutes=-1)) == tz_new(-1, -1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=23, minutes=59)) == tz_new(23, 59)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1518, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hours = 1;
    __pyx_t_10.minites = 1;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_new(&__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1518, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1518, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1519
 *     assert datetime.timezone.utc == tz_new()  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=1, minutes=1)) == tz_new(1, 1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=-1, minutes=-1)) == tz_new(-1, -1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timezone(datetime.timedelta(hours=23, minutes=59)) == tz_new(23, 59)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=-23, minutes=-59)) == tz_new(-23, -59)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_9 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, NULL};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1519, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1519, __pyx_L1_error)
      __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hours = -1;
    __pyx_t_10.minites = -1;
    __pyx_t_5 = __pyx_f_7cytimes_5utils_tz_new(&__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1519, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1519, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1520
 *     assert datetime.timezone(datetime.timedelta(hours=1, minutes=1)) == tz_new(1, 1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=-1, minutes=-1)) == tz_new(-1, -1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=23, minutes=59)) == tz_new(23, 59)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timezone(datetime.timedelta(hours=-23, minutes=-59)) == tz_new(-23, -59)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1520, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hours = 23;
    __pyx_t_10.minites = 59;
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_new(&__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1520, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1520, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1520, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1520, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1521
 *     assert datetime.timezone(datetime.timedelta(hours=-1, minutes=-1)) == tz_new(-1, -1)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=23, minutes=59)) == tz_new(23, 59)  # type: ignore
 *     assert datetime.timezone(datetime.timedelta(hours=-23, minutes=-59)) == tz_new(-23, -59)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Local
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_9 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, NULL};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_23, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1521, __pyx_L1_error)
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_59, __pyx_t_7, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_10.__pyx_n = 2;
    __pyx_t_10.hours = -23;
    __pyx_t_10.minites = -59;
    __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_new(&__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1521, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1521, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1524
 * 
 *     # Local
 *     assert tz_parse(LOCALTZ) == tz_local()  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: tzinfo_generate")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_parse(__pyx_v_LOCALTZ); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_local(NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1524, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1524, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1526
 *     assert tz_parse(LOCALTZ) == tz_local()  # type: ignore
 * 
 *     print("Passed: tzinfo_generate")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, time, LOCALTZ
*/
  __pyx_t_4 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_tzinfo_generate};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1528
 *     print("Passed: tzinfo_generate")
 * 
 *     del datetime, time, LOCALTZ             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_time); __pyx_v_time = 0;
  __Pyx_DECREF(__pyx_v_LOCALTZ); __pyx_v_LOCALTZ = 0;

  /* "cytimes/utils.py":1512
 * 
 * # datetime.tzinfo
 * def _test_tzinfo_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, time
 *     from babel.dates import LOCALTZ
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._test_tzinfo_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_LOCALTZ);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1531
 * 
 * 
 * def _test_tzinfo_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_75_test_tzinfo_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_75_test_tzinfo_type_check = {"_test_tzinfo_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_75_test_tzinfo_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_75_test_tzinfo_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_tzinfo_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_74_test_tzinfo_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_74_test_tzinfo_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyDateTime_TZInfo *__pyx_v_tz = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_tzinfo_type_check", 0);

  /* "cytimes/utils.py":1532
 * 
 * def _test_tzinfo_type_check() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     tz = UTC
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1534
 *     import datetime
 * 
 *     tz = UTC             # <<<<<<<<<<<<<<
 *     assert is_tz(tz)  # type: ignore
 *     assert not is_tz_exact(tz)  # type: ignore
*/
  __Pyx_INCREF((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  __pyx_v_tz = __pyx_v_7cytimes_5utils_UTC;

  /* "cytimes/utils.py":1535
 * 
 *     tz = UTC
 *     assert is_tz(tz)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert not is_tz_exact(tz)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_tz(((PyObject *)__pyx_v_tz)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1535, __pyx_L1_error)
    if (unlikely(!__pyx_t_3)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1535, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1535, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1536
 *     tz = UTC
 *     assert is_tz(tz)  # type: ignore
 *     assert not is_tz_exact(tz)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: tzinfo_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_f_7cytimes_5utils_is_tz_exact(((PyObject *)__pyx_v_tz)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1536, __pyx_L1_error)
    __pyx_t_4 = (!__pyx_t_3);
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1536, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1536, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1538
 *     assert not is_tz_exact(tz)  # type: ignore
 * 
 *     print("Passed: tzinfo_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del datetime
*/
  __pyx_t_5 = NULL;
  __pyx_t_6 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_tzinfo_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1540
 *     print("Passed: tzinfo_type_check")
 * 
 *     del datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1531
 * 
 * 
 * def _test_tzinfo_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_5);
  __Pyx_AddTraceback("cytimes.utils._test_tzinfo_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF((PyObject *)__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1543
 * 
 * 
 * def _test_tzinfo_access() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_77_test_tzinfo_access(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_77_test_tzinfo_access = {"_test_tzinfo_access", (PyCFunction)__pyx_pw_7cytimes_5utils_77_test_tzinfo_access, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_77_test_tzinfo_access(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_tzinfo_access (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_76_test_tzinfo_access(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_76_test_tzinfo_access(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_tz = 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;
  struct __pyx_opt_args_7cytimes_5utils_tz_name __pyx_t_6;
  int __pyx_t_7;
  struct __pyx_opt_args_7cytimes_5utils_tz_dst __pyx_t_8;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcoffset __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  struct __pyx_opt_args_7cytimes_5utils_tz_utcformat __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_tzinfo_access", 0);

  /* "cytimes/utils.py":1544
 * 
 * def _test_tzinfo_access() -> None:
 *     import datetime             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime.now()
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1546
 *     import datetime
 * 
 *     dt = datetime.datetime.now()             # <<<<<<<<<<<<<<
 *     tz = dt.tzinfo
 *     assert None == tz_name(tz, dt)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_dt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1547
 * 
 *     dt = datetime.datetime.now()
 *     tz = dt.tzinfo             # <<<<<<<<<<<<<<
 *     assert None == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tz = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1548
 *     dt = datetime.datetime.now()
 *     tz = dt.tzinfo
 *     assert None == tz_name(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert None == tz_dst(tz, dt)  # type: ignore
 *     assert None == tz_utcoffset(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1548, __pyx_L1_error)
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_name(__pyx_v_tz, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(Py_None, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1548, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1548, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1548, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1549
 *     tz = dt.tzinfo
 *     assert None == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert None == tz_utcoffset(tz, dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1549, __pyx_L1_error)
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_v_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(Py_None, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1549, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1549, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1550
 *     assert None == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore
 *     assert None == tz_utcoffset(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime.now(UTC)
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1550, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(Py_None, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1550, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1550, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1552
 *     assert None == tz_utcoffset(tz, dt)  # type: ignore
 * 
 *     dt = datetime.datetime.now(UTC)             # <<<<<<<<<<<<<<
 *     tz = dt.tzinfo
 *     assert "UTC" == tz_name(tz, dt)  # type: ignore
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_7cytimes_5utils_UTC)};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1553
 * 
 *     dt = datetime.datetime.now(UTC)
 *     tz = dt.tzinfo             # <<<<<<<<<<<<<<
 *     assert "UTC" == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1554
 *     dt = datetime.datetime.now(UTC)
 *     tz = dt.tzinfo
 *     assert "UTC" == tz_name(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert None == tz_dst(tz, dt)  # type: ignore
 *     assert datetime.timedelta() == tz_utcoffset(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1554, __pyx_L1_error)
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_1 = __pyx_f_7cytimes_5utils_tz_name(__pyx_v_tz, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_n_u_UTC, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1554, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1554, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1554, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1555
 *     tz = dt.tzinfo
 *     assert "UTC" == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta() == tz_utcoffset(tz, dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1555, __pyx_L1_error)
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_v_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(Py_None, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1555, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1555, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1556
 *     assert "UTC" == tz_name(tz, dt)  # type: ignore
 *     assert None == tz_dst(tz, dt)  # type: ignore
 *     assert datetime.timedelta() == tz_utcoffset(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime.now(zoneinfo.ZoneInfo("Asia/Shanghai"))
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1556, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1556, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1556, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1556, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1558
 *     assert datetime.timedelta() == tz_utcoffset(tz, dt)  # type: ignore
 * 
 *     dt = datetime.datetime.now(zoneinfo.ZoneInfo("Asia/Shanghai"))             # <<<<<<<<<<<<<<
 *     tz = dt.tzinfo
 *     assert "CST" == tz_name(tz, dt)  # type: ignore
*/
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_11 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_5 = 1;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13);
    assert(__pyx_t_11);
    PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_11);
    __Pyx_INCREF(__pyx__function);
    __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
    __pyx_t_5 = 0;
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Asia_Shanghai};
    __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10};
    __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1559
 * 
 *     dt = datetime.datetime.now(zoneinfo.ZoneInfo("Asia/Shanghai"))
 *     tz = dt.tzinfo             # <<<<<<<<<<<<<<
 *     assert "CST" == tz_name(tz, dt)  # type: ignore
 *     assert datetime.timedelta() == tz_dst(tz, dt)  # type: ignore
*/
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_mstate_global->__pyx_n_u_tzinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "cytimes/utils.py":1560
 *     dt = datetime.datetime.now(zoneinfo.ZoneInfo("Asia/Shanghai"))
 *     tz = dt.tzinfo
 *     assert "CST" == tz_name(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta() == tz_dst(tz, dt)  # type: ignore
 *     assert datetime.timedelta(hours=8) == tz_utcoffset(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1560, __pyx_L1_error)
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_4 = __pyx_f_7cytimes_5utils_tz_name(__pyx_v_tz, &__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_n_u_CST, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1560, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1560, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1561
 *     tz = dt.tzinfo
 *     assert "CST" == tz_name(tz, dt)  # type: ignore
 *     assert datetime.timedelta() == tz_dst(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(hours=8) == tz_utcoffset(tz, dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1561, __pyx_L1_error)
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_dst(__pyx_v_tz, &__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1561, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1561, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1562
 *     assert "CST" == tz_name(tz, dt)  # type: ignore
 *     assert datetime.timedelta() == tz_dst(tz, dt)  # type: ignore
 *     assert datetime.timedelta(hours=8) == tz_utcoffset(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt = datetime.datetime.now()
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_datetime;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_8, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
    }
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1562, __pyx_L1_error)
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_tz_utcoffset(__pyx_v_tz, &__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_10, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1562, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1562, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1564
 *     assert datetime.timedelta(hours=8) == tz_utcoffset(tz, dt)  # type: ignore
 * 
 *     dt = datetime.datetime.now()             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     assert "+2359" == tz_utcformat(tz, dt)  # type: ignore
*/
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_4 = __pyx_t_10;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_now, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1565
 * 
 *     dt = datetime.datetime.now()
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))             # <<<<<<<<<<<<<<
 *     assert "+2359" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
*/
  __pyx_t_10 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL};
    __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_23, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1565, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_59, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1565, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1566
 *     dt = datetime.datetime.now()
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     assert "+2359" == tz_utcformat(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     assert "+0101" == tz_utcformat(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1566, __pyx_L1_error)
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_v_tz, &__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2359, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1566, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1566, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1567
 *     tz = datetime.timezone(datetime.timedelta(hours=23, minutes=59))
 *     assert "+2359" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))             # <<<<<<<<<<<<<<
 *     assert "+0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-1, minutes=-1))
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_13 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, NULL};
    __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_1, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1567, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_1, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__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(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1568
 *     assert "+2359" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     assert "+0101" == tz_utcformat(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=-1, minutes=-1))
 *     assert "-0101" == tz_utcformat(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1568, __pyx_L1_error)
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_v_tz, &__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_0101, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1568, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1568, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1568, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1569
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     assert "+0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-1, minutes=-1))             # <<<<<<<<<<<<<<
 *     assert "-0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
*/
  __pyx_t_10 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_10);
  __pyx_t_1 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL};
    __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1569, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1570
 *     assert "+0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-1, minutes=-1))
 *     assert "-0101" == tz_utcformat(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     assert "-2359" == tz_utcformat(tz, dt)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1570, __pyx_L1_error)
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_v_tz, &__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_0101_2, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1570, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1570, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1570, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1571
 *     tz = datetime.timezone(datetime.timedelta(hours=-1, minutes=-1))
 *     assert "-0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))             # <<<<<<<<<<<<<<
 *     assert "-2359" == tz_utcformat(tz, dt)  # type: ignore
 * 
*/
  __pyx_t_4 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_13 = __pyx_v_datetime;
  __Pyx_INCREF(__pyx_t_13);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, NULL};
    __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_hours, __pyx_mstate_global->__pyx_int_neg_23, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error)
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_minutes_2, __pyx_mstate_global->__pyx_int_neg_59, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error)
    __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
  }
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
    __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timezone, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__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(0, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_tz, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1572
 *     assert "-0101" == tz_utcformat(tz, dt)  # type: ignore
 *     tz = datetime.timezone(datetime.timedelta(hours=-23, minutes=-59))
 *     assert "-2359" == tz_utcformat(tz, dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: tzinfo_access")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (!(likely(((__pyx_v_dt) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dt, __pyx_mstate_global->__pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 1572, __pyx_L1_error)
    __pyx_t_14.__pyx_n = 1;
    __pyx_t_14.dt = ((PyDateTime_DateTime *)__pyx_v_dt);
    __pyx_t_3 = __pyx_f_7cytimes_5utils_tz_utcformat(__pyx_v_tz, &__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_mstate_global->__pyx_kp_u_2359_2, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1572, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1572, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1574
 *     assert "-2359" == tz_utcformat(tz, dt)  # type: ignore
 * 
 *     print("Passed: tzinfo_access")             # <<<<<<<<<<<<<<
 * 
 *     del datetime
*/
  __pyx_t_10 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Passed_tzinfo_access};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":1576
 *     print("Passed: tzinfo_access")
 * 
 *     del datetime             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;

  /* "cytimes/utils.py":1543
 * 
 * 
 * def _test_tzinfo_access() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._test_tzinfo_access", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_tz);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1580
 * 
 * # . numpy.share
 * def _test_numpy_share() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_79_test_numpy_share(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_79_test_numpy_share = {"_test_numpy_share", (PyCFunction)__pyx_pw_7cytimes_5utils_79_test_numpy_share, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_79_test_numpy_share(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_numpy_share (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_78_test_numpy_share(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_78_test_numpy_share(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_numpy_share", 0);

  /* "cytimes/utils.py":1581
 * # . numpy.share
 * def _test_numpy_share() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1583
 *     import numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as")             # <<<<<<<<<<<<<<
 * 
 *     for unit in units:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[59]);
  __pyx_v_units = __pyx_mstate_global->__pyx_tuple[59];

  /* "cytimes/utils.py":1585
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as")
 * 
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         unit == nptime_unit_int2str(nptime_unit_str2int(unit))  # type: ignore
 * 
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1585, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1586
 * 
 *     for unit in units:
 *         unit == nptime_unit_int2str(nptime_unit_str2int(unit))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for unit in units:
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1586, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/utils.py":1585
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as")
 * 
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         unit == nptime_unit_int2str(nptime_unit_str2int(unit))  # type: ignore
 * 
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1588
 *         unit == nptime_unit_int2str(nptime_unit_str2int(unit))  # type: ignore
 * 
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         arr = np.array([], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1588, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1589
 * 
 *     for unit in units:
 *         arr = np.array([], dtype="datetime64[%s]" % unit)             # <<<<<<<<<<<<<<
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="datetime64[%s]" % unit)
*/
    __pyx_t_7 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_datetime64_s, __pyx_v_unit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_9, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1589, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
      __Pyx_XDECREF(__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_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1590
 *     for unit in units:
 *         arr = np.array([], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore             # <<<<<<<<<<<<<<
 *         arr = np.array([1, 2, 3], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1590, __pyx_L1_error)
      __pyx_t_5 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(((PyArrayObject *)__pyx_v_arr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1590, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1590, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1590, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1590, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1591
 *         arr = np.array([], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="datetime64[%s]" % unit)             # <<<<<<<<<<<<<<
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([], dtype="timedelta64[%s]" % unit)
*/
    __pyx_t_11 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1591, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1591, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1591, __pyx_L1_error);
    __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_datetime64_s, __pyx_v_unit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_8, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1592
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore             # <<<<<<<<<<<<<<
 *         arr = np.array([], dtype="timedelta64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1592, __pyx_L1_error)
      __pyx_t_5 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(((PyArrayObject *)__pyx_v_arr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1592, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1592, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1592, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1592, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1593
 *         arr = np.array([1, 2, 3], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([], dtype="timedelta64[%s]" % unit)             # <<<<<<<<<<<<<<
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="timedelta64[%s]" % unit)
*/
    __pyx_t_7 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_timedelta64_s, __pyx_v_unit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_9, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1593, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11);
      __Pyx_XDECREF(__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_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1593, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1594
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([], dtype="timedelta64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore             # <<<<<<<<<<<<<<
 *         arr = np.array([1, 2, 3], dtype="timedelta64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1594, __pyx_L1_error)
      __pyx_t_5 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(((PyArrayObject *)__pyx_v_arr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1594, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1594, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1594, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1594, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1595
 *         arr = np.array([], dtype="timedelta64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="timedelta64[%s]" % unit)             # <<<<<<<<<<<<<<
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 * 
*/
    __pyx_t_11 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_11);
    __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1595, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1595, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1595, __pyx_L1_error);
    __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_timedelta64_s, __pyx_v_unit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_8, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1596
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 *         arr = np.array([1, 2, 3], dtype="timedelta64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: numpy_share")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1596, __pyx_L1_error)
      __pyx_t_5 = __pyx_f_7cytimes_5utils_get_arr_nptime_unit(((PyArrayObject *)__pyx_v_arr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1596, __pyx_L1_error)
      __pyx_t_4 = __pyx_f_7cytimes_5utils_nptime_unit_int2str(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1596, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1596, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1596, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1588
 *         unit == nptime_unit_int2str(nptime_unit_str2int(unit))  # type: ignore
 * 
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         arr = np.array([], dtype="datetime64[%s]" % unit)
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1598
 *         assert unit == nptime_unit_int2str(get_arr_nptime_unit(arr))  # type: ignore
 * 
 *     print("Passed: numpy_share")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_4 = NULL;
  __pyx_t_10 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_numpy_share};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1600
 *     print("Passed: numpy_share")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1580
 * 
 * # . numpy.share
 * def _test_numpy_share() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("cytimes.utils._test_numpy_share", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1604
 * 
 * # . numpy.datetime64
 * def _test_datetime64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_81_test_datetime64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_81_test_datetime64_type_check = {"_test_datetime64_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_81_test_datetime64_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_81_test_datetime64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_datetime64_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_80_test_datetime64_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_80_test_datetime64_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_dt = NULL;
  long __pyx_v_dt2;
  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_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_datetime64_type_check", 0);

  /* "cytimes/utils.py":1605
 * # . numpy.datetime64
 * def _test_datetime64_type_check() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     dt = np.datetime64("2021-01-02")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1607
 *     import numpy as np
 * 
 *     dt = np.datetime64("2021-01-02")             # <<<<<<<<<<<<<<
 *     assert is_dt64(dt)  # type: ignore
 *     assure_dt64(dt)  # type: ignore
*/
  __pyx_t_3 = __pyx_v_np;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_2021_01_02};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime64, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_dt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1608
 * 
 *     dt = np.datetime64("2021-01-02")
 *     assert is_dt64(dt)  # type: ignore             # <<<<<<<<<<<<<<
 *     assure_dt64(dt)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = __pyx_f_7cytimes_5utils_is_dt64(__pyx_v_dt); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1608, __pyx_L1_error)
    if (unlikely(!__pyx_t_5)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1608, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1608, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1609
 *     dt = np.datetime64("2021-01-02")
 *     assert is_dt64(dt)  # type: ignore
 *     assure_dt64(dt)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     dt2 = 1
*/
  __pyx_t_5 = __pyx_f_7cytimes_5utils_assure_dt64(__pyx_v_dt); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1609, __pyx_L1_error)

  /* "cytimes/utils.py":1611
 *     assure_dt64(dt)  # type: ignore
 * 
 *     dt2 = 1             # <<<<<<<<<<<<<<
 *     assert not is_dt64(dt2)  # type: ignore
 *     try:
*/
  __pyx_v_dt2 = 1;

  /* "cytimes/utils.py":1612
 * 
 *     dt2 = 1
 *     assert not is_dt64(dt2)  # type: ignore             # <<<<<<<<<<<<<<
 *     try:
 *         assure_dt64(dt2)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_dt2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_f_7cytimes_5utils_is_dt64(__pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (!__pyx_t_5);
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1612, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1612, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1613
 *     dt2 = 1
 *     assert not is_dt64(dt2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_dt64(dt2)  # type: ignore
 *     except TypeError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "cytimes/utils.py":1614
 *     assert not is_dt64(dt2)  # type: ignore
 *     try:
 *         assure_dt64(dt2)  # type: ignore             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         pass
*/
      __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_dt2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __pyx_f_7cytimes_5utils_assure_dt64(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1614, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cytimes/utils.py":1613
 *     dt2 = 1
 *     assert not is_dt64(dt2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_dt64(dt2)  # type: ignore
 *     except TypeError:
*/
    }

    /* "cytimes/utils.py":1618
 *         pass
 *     else:
 *         raise AssertionError("Failed: datetime64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: datetime64_type_check")
*/
    /*else:*/ {
      __pyx_t_3 = NULL;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_datetime64_type_check};
        __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __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_1)) __PYX_ERR(0, 1618, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1618, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytimes/utils.py":1615
 *     try:
 *         assure_dt64(dt2)  # type: ignore
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         pass
 *     else:
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/utils.py":1613
 *     dt2 = 1
 *     assert not is_dt64(dt2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_dt64(dt2)  # type: ignore
 *     except TypeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_7, __pyx_t_8);
  }

  /* "cytimes/utils.py":1620
 *         raise AssertionError("Failed: datetime64_type_check")
 * 
 *     print("Passed: datetime64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_3 = NULL;
  __pyx_t_4 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_datetime64_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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_1)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1622
 *     print("Passed: datetime64_type_check")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1604
 * 
 * # . numpy.datetime64
 * def _test_datetime64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_AddTraceback("cytimes.utils._test_datetime64_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1625
 * 
 * 
 * def _test_datetime64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_83_test_datetime64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_83_test_datetime64_conversion = {"_test_datetime64_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_83_test_datetime64_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_83_test_datetime64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_datetime64_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_82_test_datetime64_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_82_test_datetime64_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_unit = NULL;
  long __pyx_v_i;
  PyObject *__pyx_v_dt64 = NULL;
  PyObject *__pyx_v_us = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  npy_int64 __pyx_t_10;
  int __pyx_t_11;
  PY_LONG_LONG __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_datetime64_conversion", 0);

  /* "cytimes/utils.py":1626
 * 
 * def _test_datetime64_conversion() -> None:
 *     import datetime, numpy as np             # <<<<<<<<<<<<<<
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1628
 *     import datetime, numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")             # <<<<<<<<<<<<<<
 *     for unit in units:
 *         for i in range(-500, 501):
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[60]);
  __pyx_v_units = __pyx_mstate_global->__pyx_tuple[60];

  /* "cytimes/utils.py":1629
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         for i in range(-500, 501):
 *             dt64 = np.datetime64(i, unit)
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1629, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1630
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:
 *         for i in range(-500, 501):             # <<<<<<<<<<<<<<
 *             dt64 = np.datetime64(i, unit)
 *             us = dt64.astype("datetime64[us]").astype("int64")
*/
    for (__pyx_t_5 = -500L; __pyx_t_5 < 0x1F5; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "cytimes/utils.py":1631
 *     for unit in units:
 *         for i in range(-500, 501):
 *             dt64 = np.datetime64(i, unit)             # <<<<<<<<<<<<<<
 *             us = dt64.astype("datetime64[us]").astype("int64")
 *             assert dt64_as_int64_us(dt64) == us  # type: ignore
*/
      __pyx_t_6 = __pyx_v_np;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_unit};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_datetime64, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (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_4)) __PYX_ERR(0, 1631, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_dt64, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cytimes/utils.py":1632
 *         for i in range(-500, 501):
 *             dt64 = np.datetime64(i, unit)
 *             us = dt64.astype("datetime64[us]").astype("int64")             # <<<<<<<<<<<<<<
 *             assert dt64_as_int64_us(dt64) == us  # type: ignore
 *             assert dt64_to_dt(dt64) == dt_fr_us(us)  # type: ignore
*/
      __pyx_t_9 = __pyx_v_dt64;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_datetime64_us};
        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1632, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = __pyx_t_6;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int64};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (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_4)) __PYX_ERR(0, 1632, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_us, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cytimes/utils.py":1633
 *             dt64 = np.datetime64(i, unit)
 *             us = dt64.astype("datetime64[us]").astype("int64")
 *             assert dt64_as_int64_us(dt64) == us  # type: ignore             # <<<<<<<<<<<<<<
 *             assert dt64_to_dt(dt64) == dt_fr_us(us)  # type: ignore
 * 
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_10 = __pyx_f_7cytimes_5utils_dt64_as_int64_us(__pyx_v_dt64, NULL); if (unlikely(__pyx_t_10 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyLong_From_npy_int64(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_us, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1633, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1633, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1633, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1634
 *             us = dt64.astype("datetime64[us]").astype("int64")
 *             assert dt64_as_int64_us(dt64) == us  # type: ignore
 *             assert dt64_to_dt(dt64) == dt_fr_us(us)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: datetime64_conversion")
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64_to_dt(__pyx_v_dt64, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_us); if (unlikely((__pyx_t_12 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1634, __pyx_L1_error)
        __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_dt_fr_us(__pyx_t_12, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1634, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_11)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1634, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1634, __pyx_L1_error)
      #endif
    }

    /* "cytimes/utils.py":1629
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         for i in range(-500, 501):
 *             dt64 = np.datetime64(i, unit)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1636
 *             assert dt64_to_dt(dt64) == dt_fr_us(us)  # type: ignore
 * 
 *     print("Passed: datetime64_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, np
*/
  __pyx_t_7 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Passed_datetime64_conversion};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1638
 *     print("Passed: datetime64_conversion")
 * 
 *     del datetime, np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1625
 * 
 * 
 * def _test_datetime64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cytimes.utils._test_datetime64_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_dt64);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1642
 * 
 * # . numpy.timedelta64
 * def _test_timedelta64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_85_test_timedelta64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_85_test_timedelta64_type_check = {"_test_timedelta64_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_85_test_timedelta64_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_85_test_timedelta64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_timedelta64_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_84_test_timedelta64_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_84_test_timedelta64_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_td = NULL;
  long __pyx_v_td2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_timedelta64_type_check", 0);

  /* "cytimes/utils.py":1643
 * # . numpy.timedelta64
 * def _test_timedelta64_type_check() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     td = np.timedelta64(1, "D")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1645
 *     import numpy as np
 * 
 *     td = np.timedelta64(1, "D")             # <<<<<<<<<<<<<<
 *     assert is_td64(td)  # type: ignore
 *     assure_td64(td)  # type: ignore
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_np, __pyx_mstate_global->__pyx_n_u_timedelta64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[61], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_td = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cytimes/utils.py":1646
 * 
 *     td = np.timedelta64(1, "D")
 *     assert is_td64(td)  # type: ignore             # <<<<<<<<<<<<<<
 *     assure_td64(td)  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_f_7cytimes_5utils_is_td64(__pyx_v_td); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1646, __pyx_L1_error)
    if (unlikely(!__pyx_t_4)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1646, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1646, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1647
 *     td = np.timedelta64(1, "D")
 *     assert is_td64(td)  # type: ignore
 *     assure_td64(td)  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     td2 = 1
*/
  __pyx_t_4 = __pyx_f_7cytimes_5utils_assure_td64(__pyx_v_td); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1647, __pyx_L1_error)

  /* "cytimes/utils.py":1649
 *     assure_td64(td)  # type: ignore
 * 
 *     td2 = 1             # <<<<<<<<<<<<<<
 *     assert not is_td64(td2)  # type: ignore
 *     try:
*/
  __pyx_v_td2 = 1;

  /* "cytimes/utils.py":1650
 * 
 *     td2 = 1
 *     assert not is_td64(td2)  # type: ignore             # <<<<<<<<<<<<<<
 *     try:
 *         assure_td64(td2)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_td2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_f_7cytimes_5utils_is_td64(__pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1650, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = (!__pyx_t_4);
    if (unlikely(!__pyx_t_5)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1650, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1650, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1651
 *     td2 = 1
 *     assert not is_td64(td2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_td64(td2)  # type: ignore
 *     except TypeError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cytimes/utils.py":1652
 *     assert not is_td64(td2)  # type: ignore
 *     try:
 *         assure_td64(td2)  # type: ignore             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         pass
*/
      __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v_td2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1652, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __pyx_f_7cytimes_5utils_assure_td64(__pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1652, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cytimes/utils.py":1651
 *     td2 = 1
 *     assert not is_td64(td2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_td64(td2)  # type: ignore
 *     except TypeError:
*/
    }

    /* "cytimes/utils.py":1656
 *         pass
 *     else:
 *         raise AssertionError("Failed: timedelta64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: timedelta64_type_check")
*/
    /*else:*/ {
      __pyx_t_1 = NULL;
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Failed_timedelta64_type_check};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_AssertionError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1656, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1656, __pyx_L5_except_error)
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cytimes/utils.py":1653
 *     try:
 *         assure_td64(td2)  # type: ignore
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         pass
 *     else:
*/
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError))));
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cytimes/utils.py":1651
 *     td2 = 1
 *     assert not is_td64(td2)  # type: ignore
 *     try:             # <<<<<<<<<<<<<<
 *         assure_td64(td2)  # type: ignore
 *     except TypeError:
*/
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_6, __pyx_t_7);
  }

  /* "cytimes/utils.py":1658
 *         raise AssertionError("Failed: timedelta64_type_check")
 * 
 *     print("Passed: timedelta64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_1 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Passed_timedelta64_type_check};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":1660
 *     print("Passed: timedelta64_type_check")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1642
 * 
 * # . numpy.timedelta64
 * def _test_timedelta64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_AddTraceback("cytimes.utils._test_timedelta64_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1663
 * 
 * 
 * def _test_timedelta64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_87_test_timedelta64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_87_test_timedelta64_conversion = {"_test_timedelta64_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_87_test_timedelta64_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_87_test_timedelta64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_timedelta64_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_86_test_timedelta64_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_86_test_timedelta64_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_unit = NULL;
  long __pyx_v_i;
  PyObject *__pyx_v_td64 = NULL;
  PyObject *__pyx_v_us = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  npy_int64 __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_timedelta64_conversion", 0);

  /* "cytimes/utils.py":1664
 * 
 * def _test_timedelta64_conversion() -> None:
 *     import datetime, numpy as np             # <<<<<<<<<<<<<<
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1666
 *     import datetime, numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")             # <<<<<<<<<<<<<<
 *     for unit in units:
 *         for i in range(-500, 501):
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[60]);
  __pyx_v_units = __pyx_mstate_global->__pyx_tuple[60];

  /* "cytimes/utils.py":1667
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         for i in range(-500, 501):
 *             td64 = np.timedelta64(i, unit)
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1667, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1668
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:
 *         for i in range(-500, 501):             # <<<<<<<<<<<<<<
 *             td64 = np.timedelta64(i, unit)
 *             us = td64.astype("timedelta64[us]").astype("int64")
*/
    for (__pyx_t_5 = -500L; __pyx_t_5 < 0x1F5; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "cytimes/utils.py":1669
 *     for unit in units:
 *         for i in range(-500, 501):
 *             td64 = np.timedelta64(i, unit)             # <<<<<<<<<<<<<<
 *             us = td64.astype("timedelta64[us]").astype("int64")
 *             assert td64_as_int64_us(td64) == us  # type: ignore
*/
      __pyx_t_6 = __pyx_v_np;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_v_unit};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta64, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (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_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_td64, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cytimes/utils.py":1670
 *         for i in range(-500, 501):
 *             td64 = np.timedelta64(i, unit)
 *             us = td64.astype("timedelta64[us]").astype("int64")             # <<<<<<<<<<<<<<
 *             assert td64_as_int64_us(td64) == us  # type: ignore
 *             assert td64_to_td(td64) == datetime.timedelta(microseconds=int(us))  # type: ignore
*/
      __pyx_t_9 = __pyx_v_td64;
      __Pyx_INCREF(__pyx_t_9);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_timedelta64_us};
        __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = __pyx_t_6;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int64};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (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_4)) __PYX_ERR(0, 1670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_us, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cytimes/utils.py":1671
 *             td64 = np.timedelta64(i, unit)
 *             us = td64.astype("timedelta64[us]").astype("int64")
 *             assert td64_as_int64_us(td64) == us  # type: ignore             # <<<<<<<<<<<<<<
 *             assert td64_to_td(td64) == datetime.timedelta(microseconds=int(us))  # type: ignore
 * 
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_10 = __pyx_f_7cytimes_5utils_td64_as_int64_us(__pyx_v_td64, NULL); if (unlikely(__pyx_t_10 == ((npy_int64)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyLong_From_npy_int64(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_us, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1671, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1671, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1671, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1672
 *             us = td64.astype("timedelta64[us]").astype("int64")
 *             assert td64_as_int64_us(td64) == us  # type: ignore
 *             assert td64_to_td(td64) == datetime.timedelta(microseconds=int(us))  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: timedelta64_conversion")
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_td64_to_td(__pyx_v_td64, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_v_datetime;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_v_us); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, NULL};
          __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1672, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_microseconds, __pyx_t_9, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1672, __pyx_L1_error)
          __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_timedelta, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1672, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1672, __pyx_L1_error)
      #endif
    }

    /* "cytimes/utils.py":1667
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 *     for unit in units:             # <<<<<<<<<<<<<<
 *         for i in range(-500, 501):
 *             td64 = np.timedelta64(i, unit)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1674
 *             assert td64_to_td(td64) == datetime.timedelta(microseconds=int(us))  # type: ignore
 * 
 *     print("Passed: timedelta64_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del datetime, np
*/
  __pyx_t_12 = NULL;
  __pyx_t_8 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_Passed_timedelta64_conversion};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1676
 *     print("Passed: timedelta64_conversion")
 * 
 *     del datetime, np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_datetime); __pyx_v_datetime = 0;
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1663
 * 
 * 
 * def _test_timedelta64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cytimes.utils._test_timedelta64_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_td64);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1680
 * 
 * # . numpy.ndarray
 * def _test_ndarray_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_89_test_ndarray_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_89_test_ndarray_type_check = {"_test_ndarray_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_89_test_ndarray_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_89_test_ndarray_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_88_test_ndarray_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_88_test_ndarray_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = 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;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_type_check", 0);

  /* "cytimes/utils.py":1681
 * # . numpy.ndarray
 * def _test_ndarray_type_check() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     assert is_arr(np.array([1, 2, 3]))  # type: ignore
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1683
 *     import numpy as np
 * 
 *     assert is_arr(np.array([1, 2, 3]))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_arr(np.array([]))  # type: ignore
 *     assert is_arr("a") == False  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1683, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1683, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1683, __pyx_L1_error);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_arr(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1683, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1683, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1684
 * 
 *     assert is_arr(np.array([1, 2, 3]))  # type: ignore
 *     assert is_arr(np.array([]))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_arr("a") == False  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_arr(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1684, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1684, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1685
 *     assert is_arr(np.array([1, 2, 3]))  # type: ignore
 *     assert is_arr(np.array([]))  # type: ignore
 *     assert is_arr("a") == False  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_f_7cytimes_5utils_is_arr(__pyx_mstate_global->__pyx_n_u_a); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1685, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_6 == 0);
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1685, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1685, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1687
 *     assert is_arr("a") == False  # type: ignore
 * 
 *     print("Passed: ndarray_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_3 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1689
 *     print("Passed: ndarray_type_check")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1680
 * 
 * # . numpy.ndarray
 * def _test_ndarray_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1693
 * 
 * # . numpy.ndarray - generate
 * def _test_ndarray_generate() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_91_test_ndarray_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_91_test_ndarray_generate = {"_test_ndarray_generate", (PyCFunction)__pyx_pw_7cytimes_5utils_91_test_ndarray_generate, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_91_test_ndarray_generate(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_generate (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_90_test_ndarray_generate(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_90_test_ndarray_generate(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyArrayObject *__pyx_v_arr1 = NULL;
  PyObject *__pyx_v_arr2 = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_generate", 0);

  /* "cytimes/utils.py":1694
 * # . numpy.ndarray - generate
 * def _test_ndarray_generate() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     arr1 = arr_zero_int64(5)  # type: ignore
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1696
 *     import numpy as np
 * 
 *     arr1 = arr_zero_int64(5)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr2 = np.array([0, 0, 0, 0, 0], dtype="int64")  # type: ignore
 *     assert np.equal(arr1, arr2).all()  # type: ignore
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_zero_int64(5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_arr1 = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1697
 * 
 *     arr1 = arr_zero_int64(5)  # type: ignore
 *     arr2 = np.array([0, 0, 0, 0, 0], dtype="int64")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert np.equal(arr1, arr2).all()  # type: ignore
 * 
*/
  __pyx_t_3 = __pyx_v_np;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1697, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1697, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1697, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1697, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 1697, __pyx_L1_error);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1697, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arr2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1698
 *     arr1 = arr_zero_int64(5)  # type: ignore
 *     arr2 = np.array([0, 0, 0, 0, 0], dtype="int64")  # type: ignore
 *     assert np.equal(arr1, arr2).all()  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     arr1 = arr_fill_int64(1, 5)  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_arr1), __pyx_v_arr2};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_6 = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1698, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1698, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1698, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1700
 *     assert np.equal(arr1, arr2).all()  # type: ignore
 * 
 *     arr1 = arr_fill_int64(1, 5)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr2 = np.array([1, 1, 1, 1, 1], dtype="int64")  # type: ignore
 *     assert np.equal(arr1, arr2).all()  # type: ignore
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_fill_int64(1, 5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_arr1, ((PyArrayObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1701
 * 
 *     arr1 = arr_fill_int64(1, 5)  # type: ignore
 *     arr2 = np.array([1, 1, 1, 1, 1], dtype="int64")  # type: ignore             # <<<<<<<<<<<<<<
 *     assert np.equal(arr1, arr2).all()  # type: ignore
 * 
*/
  __pyx_t_4 = __pyx_v_np;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyList_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1701, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1701, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1701, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1701, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1701, __pyx_L1_error);
  __pyx_t_5 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_6};
    __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF_SET(__pyx_v_arr2, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1702
 *     arr1 = arr_fill_int64(1, 5)  # type: ignore
 *     arr2 = np.array([1, 1, 1, 1, 1], dtype="int64")  # type: ignore
 *     assert np.equal(arr1, arr2).all()  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_generate")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_4 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_v_arr1), __pyx_v_arr2};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_3 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__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_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1702, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1702, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1704
 *     assert np.equal(arr1, arr2).all()  # type: ignore
 * 
 *     print("Passed: ndarray_generate")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_6 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_generate};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1706
 *     print("Passed: ndarray_generate")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1693
 * 
 * # . numpy.ndarray - generate
 * def _test_ndarray_generate() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_generate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr1);
  __Pyx_XDECREF(__pyx_v_arr2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1710
 * 
 * # . numpy.ndarray[datetime64]
 * def _test_ndarray_dt64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_93_test_ndarray_dt64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_93_test_ndarray_dt64_type_check = {"_test_ndarray_dt64_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_93_test_ndarray_dt64_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_93_test_ndarray_dt64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_dt64_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_92_test_ndarray_dt64_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_92_test_ndarray_dt64_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_dt64_type_check", 0);

  /* "cytimes/utils.py":1711
 * # . numpy.ndarray[datetime64]
 * def _test_ndarray_dt64_type_check() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="datetime64[ns]"))  # type: ignore
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1713
 *     import numpy as np
 * 
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="datetime64[ns]"))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_dt64arr(np.array([], dtype="datetime64[ns]"))  # type: ignore
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1713, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1713, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1713, __pyx_L1_error);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1713, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_datetime64_ns, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1713, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __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(0, 1713, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1713, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1713, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1713, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1714
 * 
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="datetime64[ns]"))  # type: ignore
 *     assert is_dt64arr(np.array([], dtype="datetime64[ns]"))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
 *     assert is_dt64arr(np.array([], dtype="int64")) == False  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_datetime64_ns, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1714, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 1714, __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(0, 1714, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1714, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1714, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1715
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="datetime64[ns]"))  # type: ignore
 *     assert is_dt64arr(np.array([], dtype="datetime64[ns]"))  # type: ignore
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_dt64arr(np.array([], dtype="int64")) == False  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1715, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1715, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1715, __pyx_L1_error);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1715, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __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(0, 1715, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_dt64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1715, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__pyx_t_7 == 0);
    if (unlikely(!__pyx_t_8)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1715, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1715, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1716
 *     assert is_dt64arr(np.array([], dtype="datetime64[ns]"))  # type: ignore
 *     assert is_dt64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
 *     assert is_dt64arr(np.array([], dtype="int64")) == False  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_dt64_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1716, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 1716, __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(0, 1716, __pyx_L1_error)
    __pyx_t_8 = __pyx_f_7cytimes_5utils_is_dt64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (__pyx_t_8 == 0);
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1716, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1716, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1718
 *     assert is_dt64arr(np.array([], dtype="int64")) == False  # type: ignore
 * 
 *     print("Passed: ndarray_dt64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_3 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_dt64_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1720
 *     print("Passed: ndarray_dt64_type_check")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1710
 * 
 * # . numpy.ndarray[datetime64]
 * def _test_ndarray_dt64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_dt64_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1723
 * 
 * 
 * def _test_ndarray_dt64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_95_test_ndarray_dt64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_95_test_ndarray_dt64_conversion = {"_test_ndarray_dt64_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_95_test_ndarray_dt64_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_95_test_ndarray_dt64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_dt64_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_94_test_ndarray_dt64_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_94_test_ndarray_dt64_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_my_unit = NULL;
  int __pyx_v_my_unit_int;
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_v_arr_i = NULL;
  PyObject *__pyx_v_to_unit = NULL;
  PyObject *__pyx_v_cmp = NULL;
  PyArrayObject *__pyx_v_val = NULL;
  long __pyx_7genexpr__pyx_v_i;
  long __pyx_8genexpr1__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10[3];
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_int64 __pyx_t_17;
  struct __pyx_opt_args_7cytimes_5utils_dt64arr_as_unit __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_dt64_conversion", 0);

  /* "cytimes/utils.py":1724
 * 
 * def _test_ndarray_dt64_conversion() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1726
 *     import numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")             # <<<<<<<<<<<<<<
 * 
 *     for my_unit in units:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[60]);
  __pyx_v_units = __pyx_mstate_global->__pyx_tuple[60];

  /* "cytimes/utils.py":1728
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1728, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_my_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1729
 * 
 *     for my_unit in units:
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore             # <<<<<<<<<<<<<<
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1729, __pyx_L1_error)
    __pyx_v_my_unit_int = __pyx_t_5;

    /* "cytimes/utils.py":1730
 *     for my_unit in units:
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")             # <<<<<<<<<<<<<<
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:
*/
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    { /* enter inner scope */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      for (__pyx_t_8 = -1000L; __pyx_t_8 < 0x3E9; __pyx_t_8+=1) {
        __pyx_7genexpr__pyx_v_i = __pyx_t_8;
        __pyx_t_9 = __Pyx_PyLong_From_long(__pyx_7genexpr__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1730, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1730, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    } /* exit inner scope */
    __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_my_unit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_datetime64_2;
    __pyx_t_10[1] = __pyx_t_9;
    __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__15;
    __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9));
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_11, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1731
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")             # <<<<<<<<<<<<<<
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")
*/
    __pyx_t_9 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_n_u_int64};
      __pyx_t_4 = __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;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1732
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:             # <<<<<<<<<<<<<<
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore
*/
    __pyx_t_4 = __pyx_v_units; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1732, __pyx_L1_error)
        #endif
        if (__pyx_t_13 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13));
      #else
      __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_13);
      #endif
      ++__pyx_t_13;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_to_unit, ((PyObject*)__pyx_t_9));
      __pyx_t_9 = 0;

      /* "cytimes/utils.py":1733
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      __pyx_t_6 = __pyx_v_arr;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_14 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_datetime64_2;
      __pyx_t_10[1] = __pyx_t_14;
      __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__15;
      __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14));
      if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_12 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_15};
        __pyx_t_7 = __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_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __pyx_t_11 = __pyx_t_7;
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_12 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_int64};
        __pyx_t_9 = __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_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cytimes/utils.py":1734
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr, to_unit, my_unit_int)  # type: ignore
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1734, __pyx_L1_error)
      __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(((PyArrayObject *)__pyx_v_arr), __pyx_v_to_unit, NULL)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_9));
      __pyx_t_9 = 0;

      /* "cytimes/utils.py":1735
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_int64(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_15 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_15);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_15, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1735, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __pyx_t_7 = __pyx_t_11;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1735, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1735, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1735, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1736
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr, to_unit, my_unit_int)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr_i, to_unit, my_unit_int)  # type: ignore
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1736, __pyx_L1_error)
      __pyx_t_17.__pyx_n = 1;
      __pyx_t_17.arr_reso = __pyx_v_my_unit_int;
      __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(((PyArrayObject *)__pyx_v_arr), __pyx_v_to_unit, &__pyx_t_17)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_9));
      __pyx_t_9 = 0;

      /* "cytimes/utils.py":1737
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_int64(arr_i, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_15 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_15);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_15, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1737, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_11 = __pyx_t_7;
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1737, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1737, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1737, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1737, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1738
 *             val = dt64arr_as_int64(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr_i, to_unit, my_unit_int)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 * 
*/
      if (!(likely(((__pyx_v_arr_i) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr_i, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1738, __pyx_L1_error)
      __pyx_t_17.__pyx_n = 1;
      __pyx_t_17.arr_reso = __pyx_v_my_unit_int;
      __pyx_t_9 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_int64(((PyArrayObject *)__pyx_v_arr_i), __pyx_v_to_unit, &__pyx_t_17)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1738, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_9));
      __pyx_t_9 = 0;

      /* "cytimes/utils.py":1739
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_int64(arr_i, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 * 
 *     for my_unit in units:
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_15 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_15);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_15, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1739, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __pyx_t_7 = __pyx_t_11;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1739, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1739, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1739, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1739, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1732
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:             # <<<<<<<<<<<<<<
 *             cmp = arr.astype(f"datetime64[{to_unit}]").astype("int64")
 *             val = dt64arr_as_int64(arr, to_unit)  # type: ignore
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/utils.py":1728
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1741
 *             assert np.equal(val, cmp).all()
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1741, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_my_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1742
 * 
 *     for my_unit in units:
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore             # <<<<<<<<<<<<<<
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
*/
    __pyx_t_5 = __pyx_f_7cytimes_5utils_nptime_unit_str2int(__pyx_v_my_unit); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1742, __pyx_L1_error)
    __pyx_v_my_unit_int = __pyx_t_5;

    /* "cytimes/utils.py":1743
 *     for my_unit in units:
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")             # <<<<<<<<<<<<<<
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:
*/
    __pyx_t_9 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_9);
    { /* enter inner scope */
      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      for (__pyx_t_8 = -1000L; __pyx_t_8 < 0x3E9; __pyx_t_8+=1) {
        __pyx_8genexpr1__pyx_v_i = __pyx_t_8;
        __pyx_t_7 = __Pyx_PyLong_From_long(__pyx_8genexpr1__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1743, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    } /* exit inner scope */
    __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_v_my_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_datetime64_2;
    __pyx_t_10[1] = __pyx_t_7;
    __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__15;
    __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
    if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_t_11};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_15, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1744
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")             # <<<<<<<<<<<<<<
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]")
*/
    __pyx_t_7 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_12 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int64};
      __pyx_t_4 = __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_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1745
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:             # <<<<<<<<<<<<<<
 *             cmp = arr.astype(f"datetime64[{to_unit}]")
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore
*/
    __pyx_t_4 = __pyx_v_units; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_13 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1745, __pyx_L1_error)
        #endif
        if (__pyx_t_13 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13));
      #else
      __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_13);
      #endif
      ++__pyx_t_13;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_to_unit, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "cytimes/utils.py":1746
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]")             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      __pyx_t_15 = __pyx_v_arr;
      __Pyx_INCREF(__pyx_t_15);
      __pyx_t_11 = __Pyx_PyUnicode_Unicode(__pyx_v_to_unit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_datetime64_2;
      __pyx_t_10[1] = __pyx_t_11;
      __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__15;
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1746, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_12 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_9};
        __pyx_t_7 = __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_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1746, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cytimes/utils.py":1747
 *         for to_unit in units:
 *             cmp = arr.astype(f"datetime64[{to_unit}]")
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr, to_unit, my_unit_int)  # type: ignore
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1747, __pyx_L1_error)
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(((PyArrayObject *)__pyx_v_arr), __pyx_v_to_unit, NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "cytimes/utils.py":1748
 *             cmp = arr.astype(f"datetime64[{to_unit}]")
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_unit(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_11 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_11, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1748, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
        }
        __pyx_t_9 = __pyx_t_15;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1748, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1748, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1748, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1748, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1749
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr, to_unit, my_unit_int)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr_i, to_unit, my_unit_int)  # type: ignore
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1749, __pyx_L1_error)
      __pyx_t_18.__pyx_n = 1;
      __pyx_t_18.arr_reso = __pyx_v_my_unit_int;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(((PyArrayObject *)__pyx_v_arr), __pyx_v_to_unit, &__pyx_t_18)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "cytimes/utils.py":1750
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 *             val = dt64arr_as_unit(arr_i, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_11 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_11, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1750, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
        }
        __pyx_t_15 = __pyx_t_9;
        __Pyx_INCREF(__pyx_t_15);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1750, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1750, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1750, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1750, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1751
 *             val = dt64arr_as_unit(arr, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr_i, to_unit, my_unit_int)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert np.equal(val, cmp).all()
 * 
*/
      if (!(likely(((__pyx_v_arr_i) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr_i, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1751, __pyx_L1_error)
      __pyx_t_18.__pyx_n = 1;
      __pyx_t_18.arr_reso = __pyx_v_my_unit_int;
      __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_as_unit(((PyArrayObject *)__pyx_v_arr_i), __pyx_v_to_unit, &__pyx_t_18)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1751, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "cytimes/utils.py":1752
 *             assert np.equal(val, cmp).all()
 *             val = dt64arr_as_unit(arr_i, to_unit, my_unit_int)  # type: ignore
 *             assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_dt64_conversion")
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_11 = __pyx_v_np;
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_11, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
          __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1752, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
        }
        __pyx_t_9 = __pyx_t_15;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_12 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1752, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 1752, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_16)) {
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
          __PYX_ERR(0, 1752, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 1752, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":1745
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
 *         arr_i = arr.astype("int64")
 *         for to_unit in units:             # <<<<<<<<<<<<<<
 *             cmp = arr.astype(f"datetime64[{to_unit}]")
 *             val = dt64arr_as_unit(arr, to_unit)  # type: ignore
*/
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cytimes/utils.py":1741
 *             assert np.equal(val, cmp).all()
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         my_unit_int: cython.int = nptime_unit_str2int(my_unit)  # type: ignore
 *         arr = np.array([i for i in range(-1000, 1001)], dtype=f"datetime64[{my_unit}]")
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1754
 *             assert np.equal(val, cmp).all()
 * 
 *     print("Passed: ndarray_dt64_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_4 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_dt64_conversion};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1756
 *     print("Passed: ndarray_dt64_conversion")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1723
 * 
 * 
 * def _test_ndarray_dt64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_dt64_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_arr_i);
  __Pyx_XDECREF(__pyx_v_to_unit);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XDECREF((PyObject *)__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1760
 * 
 * # . numpy.ndarray[timedelta64]
 * def _test_ndarray_td64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_97_test_ndarray_td64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_97_test_ndarray_td64_type_check = {"_test_ndarray_td64_type_check", (PyCFunction)__pyx_pw_7cytimes_5utils_97_test_ndarray_td64_type_check, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_97_test_ndarray_td64_type_check(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_td64_type_check (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_96_test_ndarray_td64_type_check(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_96_test_ndarray_td64_type_check(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_td64_type_check", 0);

  /* "cytimes/utils.py":1761
 * # . numpy.ndarray[timedelta64]
 * def _test_ndarray_td64_type_check() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     assert is_td64arr(np.array([1, 2, 3], dtype="timedelta64[ns]"))  # type: ignore
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1763
 *     import numpy as np
 * 
 *     assert is_td64arr(np.array([1, 2, 3], dtype="timedelta64[ns]"))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_td64arr(np.array([], dtype="timedelta64[ns]"))  # type: ignore
 *     assert is_td64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1763, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1763, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1763, __pyx_L1_error);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_timedelta64_ns, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __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(0, 1763, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_td64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1763, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1763, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1763, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1764
 * 
 *     assert is_td64arr(np.array([1, 2, 3], dtype="timedelta64[ns]"))  # type: ignore
 *     assert is_td64arr(np.array([], dtype="timedelta64[ns]"))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_td64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
 *     assert is_td64arr(np.array([], dtype="int64")) == False  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_timedelta64_ns, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1764, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 1764, __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(0, 1764, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_td64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1764, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1764, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1764, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1765
 *     assert is_td64arr(np.array([1, 2, 3], dtype="timedelta64[ns]"))  # type: ignore
 *     assert is_td64arr(np.array([], dtype="timedelta64[ns]"))  # type: ignore
 *     assert is_td64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore             # <<<<<<<<<<<<<<
 *     assert is_td64arr(np.array([], dtype="int64")) == False  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_3 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1765, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 1765, __pyx_L1_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_3);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 1765, __pyx_L1_error);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1765, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __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(0, 1765, __pyx_L1_error)
    __pyx_t_7 = __pyx_f_7cytimes_5utils_is_td64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1765, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = (__pyx_t_7 == 0);
    if (unlikely(!__pyx_t_8)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1765, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1765, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1766
 *     assert is_td64arr(np.array([], dtype="timedelta64[ns]"))  # type: ignore
 *     assert is_td64arr(np.array([1, 2, 3], dtype="int64")) == False  # type: ignore
 *     assert is_td64arr(np.array([], dtype="int64")) == False  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_td64_type_check")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1766, __pyx_L1_error)
      __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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(0, 1766, __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(0, 1766, __pyx_L1_error)
    __pyx_t_8 = __pyx_f_7cytimes_5utils_is_td64arr(((PyArrayObject *)__pyx_t_1)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (__pyx_t_8 == 0);
    if (unlikely(!__pyx_t_7)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 1766, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 1766, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":1768
 *     assert is_td64arr(np.array([], dtype="int64")) == False  # type: ignore
 * 
 *     print("Passed: ndarray_td64_type_check")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_3 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_td64_type_check};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1770
 *     print("Passed: ndarray_td64_type_check")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1760
 * 
 * # . numpy.ndarray[timedelta64]
 * def _test_ndarray_td64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_td64_type_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1773
 * 
 * 
 * def _test_ndarray_td64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_99_test_ndarray_td64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_99_test_ndarray_td64_conversion = {"_test_ndarray_td64_conversion", (PyCFunction)__pyx_pw_7cytimes_5utils_99_test_ndarray_td64_conversion, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_99_test_ndarray_td64_conversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_td64_conversion (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_98_test_ndarray_td64_conversion(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_98_test_ndarray_td64_conversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_my_unit = NULL;
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_v_cmp = NULL;
  PyArrayObject *__pyx_v_val = NULL;
  long __pyx_8genexpr2__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  long __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9[3];
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_td64_conversion", 0);

  /* "cytimes/utils.py":1774
 * 
 * def _test_ndarray_td64_conversion() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1776
 *     import numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")             # <<<<<<<<<<<<<<
 * 
 *     for my_unit in units:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[60]);
  __pyx_v_units = __pyx_mstate_global->__pyx_tuple[60];

  /* "cytimes/utils.py":1778
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         arr = np.array([i for i in range(-500, 501)], dtype=f"timedelta64[{my_unit}]")
 *         cmp = arr.astype(f"timedelta64[us]")
*/
  __pyx_t_1 = __pyx_v_units; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1778, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3));
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3);
    #endif
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_my_unit, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1779
 * 
 *     for my_unit in units:
 *         arr = np.array([i for i in range(-500, 501)], dtype=f"timedelta64[{my_unit}]")             # <<<<<<<<<<<<<<
 *         cmp = arr.astype(f"timedelta64[us]")
 *         val = td64arr_as_int64_us(arr)  # type: ignore
*/
    __pyx_t_5 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_5);
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      for (__pyx_t_7 = -500L; __pyx_t_7 < 0x1F5; __pyx_t_7+=1) {
        __pyx_8genexpr2__pyx_v_i = __pyx_t_7;
        __pyx_t_8 = __Pyx_PyLong_From_long(__pyx_8genexpr2__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1779, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    } /* exit inner scope */
    __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_my_unit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_timedelta64_2;
    __pyx_t_9[1] = __pyx_t_8;
    __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u__15;
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_6};
      __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_10, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1779, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1780
 *     for my_unit in units:
 *         arr = np.array([i for i in range(-500, 501)], dtype=f"timedelta64[{my_unit}]")
 *         cmp = arr.astype(f"timedelta64[us]")             # <<<<<<<<<<<<<<
 *         val = td64arr_as_int64_us(arr)  # type: ignore
 *         assert np.equal(val, cmp).all()
*/
    __pyx_t_8 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_timedelta64_us};
      __pyx_t_4 = __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_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_cmp, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1781
 *         arr = np.array([i for i in range(-500, 501)], dtype=f"timedelta64[{my_unit}]")
 *         cmp = arr.astype(f"timedelta64[us]")
 *         val = td64arr_as_int64_us(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert np.equal(val, cmp).all()
 * 
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1781, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_td64arr_as_int64_us(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_val, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1782
 *         cmp = arr.astype(f"timedelta64[us]")
 *         val = td64arr_as_int64_us(arr)  # type: ignore
 *         assert np.equal(val, cmp).all()             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_td64_conversion")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __pyx_v_np;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, ((PyObject *)__pyx_v_val), __pyx_v_cmp};
        __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
      }
      __pyx_t_8 = __pyx_t_10;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_11 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1782, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1782, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_12)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 1782, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1782, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1778
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")
 * 
 *     for my_unit in units:             # <<<<<<<<<<<<<<
 *         arr = np.array([i for i in range(-500, 501)], dtype=f"timedelta64[{my_unit}]")
 *         cmp = arr.astype(f"timedelta64[us]")
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1784
 *         assert np.equal(val, cmp).all()
 * 
 *     print("Passed: ndarray_td64_conversion")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_4 = NULL;
  __pyx_t_11 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_td64_conversion};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1786
 *     print("Passed: ndarray_td64_conversion")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":1773
 * 
 * 
 * def _test_ndarray_td64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_td64_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_my_unit);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_cmp);
  __Pyx_XDECREF((PyObject *)__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":1790
 * 
 * # . math
 * def _test_math() -> None:             # <<<<<<<<<<<<<<
 *     import math
 *     from decimal import (
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_101_test_math(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_101_test_math = {"_test_math", (PyCFunction)__pyx_pw_7cytimes_5utils_101_test_math, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_101_test_math(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_math (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_100_test_math(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_100_test_math(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_math = NULL;
  PyObject *__pyx_v_Decimal = NULL;
  PyObject *__pyx_v_ROUND_HALF_EVEN = NULL;
  PyObject *__pyx_v_ROUND_HALF_UP = NULL;
  PyObject *__pyx_v_ROUND_HALF_DOWN = NULL;
  PyObject *__pyx_v_ROUND_CEILING = NULL;
  PyObject *__pyx_v_ROUND_FLOOR = NULL;
  PyObject *__pyx_v_test_cases = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_v_factor = NULL;
  PY_LONG_LONG __pyx_v_res;
  PyObject *__pyx_v_exp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PY_LONG_LONG __pyx_t_9;
  PY_LONG_LONG __pyx_t_10;
  PY_LONG_LONG __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13[8];
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_math", 0);

  /* "cytimes/utils.py":1791
 * # . math
 * def _test_math() -> None:
 *     import math             # <<<<<<<<<<<<<<
 *     from decimal import (
 *         Decimal,
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_math, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_math = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1792
 * def _test_math() -> None:
 *     import math
 *     from decimal import (             # <<<<<<<<<<<<<<
 *         Decimal,
 *         ROUND_HALF_EVEN,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_EVEN,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_UP,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_DOWN,__pyx_mstate_global->__pyx_n_u_ROUND_CEILING,__pyx_mstate_global->__pyx_n_u_ROUND_FLOOR};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_decimal, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1792, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_EVEN,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_UP,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_DOWN,__pyx_mstate_global->__pyx_n_u_ROUND_CEILING,__pyx_mstate_global->__pyx_n_u_ROUND_FLOOR};
    for (__pyx_t_3=0; __pyx_t_3 < 6; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1792, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Decimal = __pyx_t_4;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_EVEN = __pyx_t_4;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_UP = __pyx_t_4;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_DOWN = __pyx_t_4;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_CEILING = __pyx_t_4;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_FLOOR = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1802
 * 
 *     # Modulo
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         (4, 2),
 *         (-9, 3),
*/
  __pyx_t_1 = PyList_New(28); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[64]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[64]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[64]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[65]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[65]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[65]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[66]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[66]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[66]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[67]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[67]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[67]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[70]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[70]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[70]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[71]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[71]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[71]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[72]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[72]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[72]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[73]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[73]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[73]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[74]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[74]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[74]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[75]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[75]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[75]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[76]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[76]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[76]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[77]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[77]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[77]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[79]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[79]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[79]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[55]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[57]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 1802, __pyx_L1_error);
  __pyx_v_test_cases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1832
 *         (-(2**62), -3),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         res = math_mod(num, factor)  # type: ignore
 *         exp = num % factor
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1832, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1832, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1832, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":1833
 *     ]
 *     for num, factor in test_cases:
 *         res = math_mod(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = num % factor
 *         assert res == exp, f"Failed: math_mod({num}, {factor}) = {res}, expected {exp}"
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1833, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1833, __pyx_L1_error)
    __pyx_t_11 = __pyx_f_7cytimes_5utils_math_mod(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1833, __pyx_L1_error)
    __pyx_v_res = __pyx_t_11;

    /* "cytimes/utils.py":1834
 *     for num, factor in test_cases:
 *         res = math_mod(num, factor)  # type: ignore
 *         exp = num % factor             # <<<<<<<<<<<<<<
 *         assert res == exp, f"Failed: math_mod({num}, {factor}) = {res}, expected {exp}"
 * 
*/
    __pyx_t_4 = PyNumber_Remainder(__pyx_v_num, __pyx_v_factor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1835
 *         res = math_mod(num, factor)  # type: ignore
 *         exp = num % factor
 *         assert res == exp, f"Failed: math_mod({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 * 
 *     # Round half to even / up / down
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_4 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1835, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_12)) {
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_mod;
        __pyx_t_13[1] = __pyx_t_6;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_4;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_5;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_7;
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_14, 0, 0);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __PYX_ERR(0, 1835, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1835, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1832
 *         (-(2**62), -3),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         res = math_mod(num, factor)  # type: ignore
 *         exp = num % factor
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1838
 * 
 *     # Round half to even / up / down
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         # . Small magnitudes
 *         (4, 2),
*/
  __pyx_t_1 = PyList_New(58); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[86]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[86]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[86]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[87]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[87]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[87]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[88]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[88]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[88]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[89]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[89]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[89]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[90]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[90]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[90]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[66]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[66]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[66]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[91]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[91]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[91]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[92]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[92]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[92]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[93]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[93]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[93]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[67]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[67]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[67]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[94]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[94]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[94]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[95]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[95]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[95]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[70]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[70]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[70]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[71]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[71]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[71]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[96]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[96]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[96]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[97]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[97]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[97]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[98]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[98]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[98]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[99]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[99]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[99]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[100]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[100]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[100]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[101]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[101]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[101]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[102]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[102]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[102]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[103]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[103]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[103]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[104]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[104]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[104]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[105]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[105]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[105]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[106]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[106]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 28, __pyx_mstate_global->__pyx_tuple[106]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[107]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[107]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 29, __pyx_mstate_global->__pyx_tuple[107]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[108]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[108]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 30, __pyx_mstate_global->__pyx_tuple[108]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[109]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[109]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 31, __pyx_mstate_global->__pyx_tuple[109]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[110]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[110]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 32, __pyx_mstate_global->__pyx_tuple[110]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[111]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[111]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 33, __pyx_mstate_global->__pyx_tuple[111]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[112]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[112]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 34, __pyx_mstate_global->__pyx_tuple[112]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[113]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[113]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 35, __pyx_mstate_global->__pyx_tuple[113]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[114]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[114]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 36, __pyx_mstate_global->__pyx_tuple[114]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[115]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[115]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 37, __pyx_mstate_global->__pyx_tuple[115]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[116]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[116]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 38, __pyx_mstate_global->__pyx_tuple[116]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[117]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[117]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 39, __pyx_mstate_global->__pyx_tuple[117]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 40, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 41, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 42, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 43, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 44, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 45, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[118]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[118]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 46, __pyx_mstate_global->__pyx_tuple[118]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[119]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[119]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 47, __pyx_mstate_global->__pyx_tuple[119]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[120]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[120]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 48, __pyx_mstate_global->__pyx_tuple[120]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[121]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[121]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 49, __pyx_mstate_global->__pyx_tuple[121]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[122]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[122]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 50, __pyx_mstate_global->__pyx_tuple[122]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[123]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[123]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 51, __pyx_mstate_global->__pyx_tuple[123]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[124]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[124]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 52, __pyx_mstate_global->__pyx_tuple[124]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[125]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[125]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 53, __pyx_mstate_global->__pyx_tuple[125]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[126]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[126]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 54, __pyx_mstate_global->__pyx_tuple[126]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[127]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[127]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 55, __pyx_mstate_global->__pyx_tuple[127]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[128]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[128]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 56, __pyx_mstate_global->__pyx_tuple[128]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[129]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[129]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 57, __pyx_mstate_global->__pyx_tuple[129]) != (0)) __PYX_ERR(0, 1838, __pyx_L1_error);
  __Pyx_DECREF_SET(__pyx_v_test_cases, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1900
 *         (2**62 + 2, -10),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         # half to even
 *         res = math_div_even(num, factor)  # type: ignore
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1900, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_14 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
      PyObject* sequence = __pyx_t_14;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1900, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_5);
      } else {
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1900, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1900, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
      }
      #else
      __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 1900, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L11_unpacking_done;
      __pyx_L10_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1900, __pyx_L1_error)
      __pyx_L11_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":1902
 *     for num, factor in test_cases:
 *         # half to even
 *         res = math_div_even(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_EVEN
*/
    __pyx_t_11 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_11 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1902, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1902, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_7cytimes_5utils_math_div_even(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1902, __pyx_L1_error)
    __pyx_v_res = __pyx_t_9;

    /* "cytimes/utils.py":1903
 *         # half to even
 *         res = math_div_even(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(             # <<<<<<<<<<<<<<
 *             rounding=ROUND_HALF_EVEN
 *         )
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_6 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_num};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__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_7)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_16 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_factor};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_16 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_16;
    __Pyx_INCREF(__pyx_t_5);

    /* "cytimes/utils.py":1904
 *         res = math_div_even(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_EVEN             # <<<<<<<<<<<<<<
 *         )
 *         assert (
*/
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_EVEN, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __pyx_t_14 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
    }
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_14);
    __pyx_t_14 = 0;

    /* "cytimes/utils.py":1906
 *             rounding=ROUND_HALF_EVEN
 *         )
 *         assert (             # <<<<<<<<<<<<<<
 *             res == exp
 *         ), f"Failed: math_div_even({num}, {factor}) = {res}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1907
 *         )
 *         assert (
 *             res == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: math_div_even({num}, {factor}) = {res}, expected {exp}"
 *         # half to up
*/
      __pyx_t_14 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_16 = PyObject_RichCompare(__pyx_t_14, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1907, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_12)) {

        /* "cytimes/utils.py":1908
 *         assert (
 *             res == exp
 *         ), f"Failed: math_div_even({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # half to up
 *         res = math_div_up(num, factor)  # type: ignore
*/
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_6 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_div_even;
        __pyx_t_13[1] = __pyx_t_16;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_14;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_6;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_5;
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1908, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_7, 0, 0);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __PYX_ERR(0, 1906, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1906, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1910
 *         ), f"Failed: math_div_even({num}, {factor}) = {res}, expected {exp}"
 *         # half to up
 *         res = math_div_up(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L1_error)
    __pyx_t_11 = __pyx_f_7cytimes_5utils_math_div_up(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L1_error)
    __pyx_v_res = __pyx_t_11;

    /* "cytimes/utils.py":1911
 *         # half to up
 *         res = math_div_up(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)             # <<<<<<<<<<<<<<
 *         assert (
 *             res == exp
*/
    __pyx_t_14 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_16 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16);
      assert(__pyx_t_14);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_num};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_14 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_4 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_14);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_factor};
      __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
    }
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_5 = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
      __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_UP, __pyx_t_16, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":1912
 *         res = math_div_up(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (             # <<<<<<<<<<<<<<
 *             res == exp
 *         ), f"Failed: math_div_up({num}, {factor}) = {res}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1913
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (
 *             res == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: math_div_up({num}, {factor}) = {res}, expected {exp}"
 *         # half to down
*/
      __pyx_t_7 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_12)) {

        /* "cytimes/utils.py":1914
 *         assert (
 *             res == exp
 *         ), f"Failed: math_div_up({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # half to down
 *         res = math_div_down(num, factor)  # type: ignore
*/
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_div_up;
        __pyx_t_13[1] = __pyx_t_4;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_7;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_16;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_5;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 1912, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1912, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1916
 *         ), f"Failed: math_div_up({num}, {factor}) = {res}, expected {exp}"
 *         # half to down
 *         res = math_div_down(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_DOWN
*/
    __pyx_t_11 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_11 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_7cytimes_5utils_math_div_down(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L1_error)
    __pyx_v_res = __pyx_t_9;

    /* "cytimes/utils.py":1917
 *         # half to down
 *         res = math_div_down(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(             # <<<<<<<<<<<<<<
 *             rounding=ROUND_HALF_DOWN
 *         )
*/
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_4 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_num};
      __pyx_t_16 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
    }
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_14 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_factor};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_t_14;
    __Pyx_INCREF(__pyx_t_5);

    /* "cytimes/utils.py":1918
 *         res = math_div_down(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_DOWN             # <<<<<<<<<<<<<<
 *         )
 *         assert (
*/
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_DOWN, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1917, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":1920
 *             rounding=ROUND_HALF_DOWN
 *         )
 *         assert (             # <<<<<<<<<<<<<<
 *             res == exp
 *         ), f"Failed: math_div_down({num}, {factor}) = {res}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1921
 *         )
 *         assert (
 *             res == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: math_div_down({num}, {factor}) = {res}, expected {exp}"
 * 
*/
      __pyx_t_6 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_14 = PyObject_RichCompare(__pyx_t_6, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1921, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_12)) {

        /* "cytimes/utils.py":1922
 *         assert (
 *             res == exp
 *         ), f"Failed: math_div_down({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 * 
 *     # Ceil / Floor
*/
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_div_down;
        __pyx_t_13[1] = __pyx_t_14;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_6;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_4;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_5;
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1922, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_16, 0, 0);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __PYX_ERR(0, 1920, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1920, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1900
 *         (2**62 + 2, -10),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         # half to even
 *         res = math_div_even(num, factor)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":1925
 * 
 *     # Ceil / Floor
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         # 1) Exact division (r == 0)
 *         (4, 2),
*/
  __pyx_t_1 = PyList_New(52); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[64]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[64]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[64]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[65]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[65]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[65]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[88]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[88]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[88]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[89]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[89]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[89]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[72]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[72]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[72]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[130]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[130]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[130]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[73]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[73]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[73]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[131]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[131]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[131]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[132]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[132]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[132]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[133]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[133]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[133]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[134]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[134]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[134]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[135]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[135]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[135]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[97]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[97]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[97]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[98]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[98]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[98]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[136]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[136]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[136]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[99]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[99]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[99]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[106]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[106]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[106]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[107]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[107]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[107]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[108]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[108]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[108]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[109]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[109]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[109]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[79]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[79]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[79]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[55]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[57]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[110]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[110]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 28, __pyx_mstate_global->__pyx_tuple[110]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[111]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[111]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 29, __pyx_mstate_global->__pyx_tuple[111]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[112]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[112]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 30, __pyx_mstate_global->__pyx_tuple[112]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[113]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[113]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 31, __pyx_mstate_global->__pyx_tuple[113]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[114]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[114]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 32, __pyx_mstate_global->__pyx_tuple[114]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[115]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[115]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 33, __pyx_mstate_global->__pyx_tuple[115]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[116]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[116]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 34, __pyx_mstate_global->__pyx_tuple[116]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[117]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[117]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 35, __pyx_mstate_global->__pyx_tuple[117]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[137]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[137]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 36, __pyx_mstate_global->__pyx_tuple[137]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[138]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[138]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 37, __pyx_mstate_global->__pyx_tuple[138]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[139]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[139]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 38, __pyx_mstate_global->__pyx_tuple[139]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[140]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[140]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 39, __pyx_mstate_global->__pyx_tuple[140]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 40, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 41, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 42, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 43, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 44, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 45, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[118]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[118]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 46, __pyx_mstate_global->__pyx_tuple[118]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[119]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[119]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 47, __pyx_mstate_global->__pyx_tuple[119]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[141]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[141]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 48, __pyx_mstate_global->__pyx_tuple[141]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[142]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[142]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 49, __pyx_mstate_global->__pyx_tuple[142]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[143]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[143]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 50, __pyx_mstate_global->__pyx_tuple[143]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[144]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[144]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 51, __pyx_mstate_global->__pyx_tuple[144]) != (0)) __PYX_ERR(0, 1925, __pyx_L1_error);
  __Pyx_DECREF_SET(__pyx_v_test_cases, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":1989
 *         (-(2**62), -(2**63 - 1)),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         res = math_div_ceil(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1989, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_16 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if ((likely(PyTuple_CheckExact(__pyx_t_16))) || (PyList_CheckExact(__pyx_t_16))) {
      PyObject* sequence = __pyx_t_16;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1989, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_4);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1989, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 1989, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L16_unpacking_done;
      __pyx_L15_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1989, __pyx_L1_error)
      __pyx_L16_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":1990
 *     ]
 *     for num, factor in test_cases:
 *         res = math_div_ceil(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1990, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1990, __pyx_L1_error)
    __pyx_t_11 = __pyx_f_7cytimes_5utils_math_div_ceil(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1990, __pyx_L1_error)
    __pyx_v_res = __pyx_t_11;

    /* "cytimes/utils.py":1991
 *     for num, factor in test_cases:
 *         res = math_div_ceil(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)             # <<<<<<<<<<<<<<
 *         assert (
 *             res == exp
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_14 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_14);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_14, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_num};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_7 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_factor};
      __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__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_14)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
    }
    __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_4 = __pyx_t_7;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_CEILING, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __pyx_t_16 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
    }
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "cytimes/utils.py":1992
 *         res = math_div_ceil(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (             # <<<<<<<<<<<<<<
 *             res == exp
 *         ), f"Failed: math_div_ceil({num}, {factor}) = {res}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1993
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (
 *             res == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: math_div_ceil({num}, {factor}) = {res}, expected {exp}"
 *         res = math_div_floor(num, factor)  # type: ignore
*/
      __pyx_t_16 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_16, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_12)) {

        /* "cytimes/utils.py":1994
 *         assert (
 *             res == exp
 *         ), f"Failed: math_div_ceil({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 *         res = math_div_floor(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
*/
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_14 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_div_ceil;
        __pyx_t_13[1] = __pyx_t_7;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_16;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_14;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_4;
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1994, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_5, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 1992, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1992, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1995
 *             res == exp
 *         ), f"Failed: math_div_ceil({num}, {factor}) = {res}, expected {exp}"
 *         res = math_div_floor(num, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (
*/
    __pyx_t_11 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_num); if (unlikely((__pyx_t_11 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_factor); if (unlikely((__pyx_t_10 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_7cytimes_5utils_math_div_floor(__pyx_t_11, __pyx_t_10, NULL); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
    __pyx_v_res = __pyx_t_9;

    /* "cytimes/utils.py":1996
 *         ), f"Failed: math_div_ceil({num}, {factor}) = {res}, expected {exp}"
 *         res = math_div_floor(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)             # <<<<<<<<<<<<<<
 *         assert (
 *             res == exp
*/
    __pyx_t_16 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_7 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_16);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_num};
      __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
    }
    __pyx_t_16 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_6 = __pyx_v_Decimal; 
    __pyx_t_15 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_16);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_15 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_factor};
      __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_15 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_FLOOR, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":1997
 *         res = math_div_floor(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (             # <<<<<<<<<<<<<<
 *             res == exp
 *         ), f"Failed: math_div_floor({num}, {factor}) = {res}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":1998
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (
 *             res == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: math_div_floor({num}, {factor}) = {res}, expected {exp}"
 * 
*/
      __pyx_t_5 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1998, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1998, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1998, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_12)) {

        /* "cytimes/utils.py":1999
 *         assert (
 *             res == exp
 *         ), f"Failed: math_div_floor({num}, {factor}) = {res}, expected {exp}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: math")
*/
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Failed_math_div_floor;
        __pyx_t_13[1] = __pyx_t_6;
        __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_13[3] = __pyx_t_5;
        __pyx_t_13[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_13[5] = __pyx_t_7;
        __pyx_t_13[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_13[7] = __pyx_t_4;
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_13, 8, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_14, 0, 0);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __PYX_ERR(0, 1997, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 1997, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":1989
 *         (-(2**62), -(2**63 - 1)),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         res = math_div_ceil(num, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2001
 *         ), f"Failed: math_div_floor({num}, {factor}) = {res}, expected {exp}"
 * 
 *     print("Passed: math")             # <<<<<<<<<<<<<<
 * 
 *     del (
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_Passed_math};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2003
 *     print("Passed: math")
 * 
 *     del (             # <<<<<<<<<<<<<<
 *         math,
 *         Decimal,
*/
  __Pyx_DECREF(__pyx_v_math); __pyx_v_math = 0;
  __Pyx_DECREF(__pyx_v_Decimal); __pyx_v_Decimal = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_EVEN); __pyx_v_ROUND_HALF_EVEN = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_UP); __pyx_v_ROUND_HALF_UP = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_DOWN); __pyx_v_ROUND_HALF_DOWN = 0;
  __Pyx_DECREF(__pyx_v_ROUND_CEILING); __pyx_v_ROUND_CEILING = 0;
  __Pyx_DECREF(__pyx_v_ROUND_FLOOR); __pyx_v_ROUND_FLOOR = 0;

  /* "cytimes/utils.py":1790
 * 
 * # . math
 * def _test_math() -> None:             # <<<<<<<<<<<<<<
 *     import math
 *     from decimal import (
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("cytimes.utils._test_math", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_math);
  __Pyx_XDECREF(__pyx_v_Decimal);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_EVEN);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_UP);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_DOWN);
  __Pyx_XDECREF(__pyx_v_ROUND_CEILING);
  __Pyx_XDECREF(__pyx_v_ROUND_FLOOR);
  __Pyx_XDECREF(__pyx_v_test_cases);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XDECREF(__pyx_v_factor);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":2014
 * 
 * 
 * def _test_ndarray_math() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     from decimal import (
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_103_test_ndarray_math(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_103_test_ndarray_math = {"_test_ndarray_math", (PyCFunction)__pyx_pw_7cytimes_5utils_103_test_ndarray_math, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_103_test_ndarray_math(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_ndarray_math (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_102_test_ndarray_math(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_102_test_ndarray_math(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_Decimal = NULL;
  PyObject *__pyx_v_ROUND_HALF_EVEN = NULL;
  PyObject *__pyx_v_ROUND_HALF_UP = NULL;
  PyObject *__pyx_v_ROUND_HALF_DOWN = NULL;
  PyObject *__pyx_v_ROUND_CEILING = NULL;
  PyObject *__pyx_v_ROUND_FLOOR = NULL;
  PyObject *__pyx_v_test_cases = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_v_factor = NULL;
  PyObject *__pyx_v_arr = NULL;
  PyArrayObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_exp = NULL;
  PyArrayObject *__pyx_v_res2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  size_t __pyx_t_9;
  npy_int64 __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14[8];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_ndarray_math", 0);

  /* "cytimes/utils.py":2015
 * 
 * def _test_ndarray_math() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 *     from decimal import (
 *         Decimal,
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2016
 * def _test_ndarray_math() -> None:
 *     import numpy as np
 *     from decimal import (             # <<<<<<<<<<<<<<
 *         Decimal,
 *         ROUND_HALF_EVEN,
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_EVEN,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_UP,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_DOWN,__pyx_mstate_global->__pyx_n_u_ROUND_CEILING,__pyx_mstate_global->__pyx_n_u_ROUND_FLOOR};
    __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_decimal, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2016, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Decimal,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_EVEN,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_UP,__pyx_mstate_global->__pyx_n_u_ROUND_HALF_DOWN,__pyx_mstate_global->__pyx_n_u_ROUND_CEILING,__pyx_mstate_global->__pyx_n_u_ROUND_FLOOR};
    for (__pyx_t_3=0; __pyx_t_3 < 6; __pyx_t_3++) {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      switch (__pyx_t_3) {
        case 0:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_Decimal = __pyx_t_4;
        break;
        case 1:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_EVEN = __pyx_t_4;
        break;
        case 2:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_UP = __pyx_t_4;
        break;
        case 3:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_HALF_DOWN = __pyx_t_4;
        break;
        case 4:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_CEILING = __pyx_t_4;
        break;
        case 5:
        __Pyx_INCREF(__pyx_t_4);
        __pyx_v_ROUND_FLOOR = __pyx_t_4;
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2026
 * 
 *     # Modulo
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         (4, 2),
 *         (-9, 3),
*/
  __pyx_t_1 = PyList_New(28); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[64]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[64]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[64]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[65]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[65]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[65]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[66]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[66]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[66]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[67]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[67]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[67]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[70]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[70]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[70]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[71]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[71]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[71]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[72]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[72]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[72]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[73]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[73]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[73]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[74]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[74]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[74]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[75]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[75]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[75]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[76]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[76]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[76]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[77]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[77]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[77]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[79]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[79]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[79]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[55]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[57]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 2026, __pyx_L1_error);
  __pyx_v_test_cases = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2056
 *         (-(2**62), -3),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         res = arr_mod(arr, factor)  # type: ignore
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2056, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2056, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_6);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2056, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2056, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_6);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2056, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 2056, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2056, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":2057
 *     ]
 *     for num, factor in test_cases:
 *         arr = np.array([num], dtype="int64")             # <<<<<<<<<<<<<<
 *         res = arr_mod(arr, factor)  # type: ignore
 *         exp = arr % factor
*/
    __pyx_t_6 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_num);
    __Pyx_GIVEREF(__pyx_v_num);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_num) != (0)) __PYX_ERR(0, 2057, __pyx_L1_error);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2057, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2058
 *     for num, factor in test_cases:
 *         arr = np.array([num], dtype="int64")
 *         res = arr_mod(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = arr % factor
 *         assert np.equal(res, exp).all()  # type: ignore
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2058, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2058, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_mod(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2059
 *         arr = np.array([num], dtype="int64")
 *         res = arr_mod(arr, factor)  # type: ignore
 *         exp = arr % factor             # <<<<<<<<<<<<<<
 *         assert np.equal(res, exp).all()  # type: ignore
 * 
*/
    __pyx_t_4 = PyNumber_Remainder(__pyx_v_arr, __pyx_v_factor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2060
 *         res = arr_mod(arr, factor)  # type: ignore
 *         exp = arr % factor
 *         assert np.equal(res, exp).all()  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     # Round half to even / up / down
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = __pyx_v_np;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, ((PyObject *)__pyx_v_res), __pyx_v_exp};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_equal, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_t_7 = __pyx_t_5;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_9 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_11)) {
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
        __PYX_ERR(0, 2060, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2060, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2056
 *         (-(2**62), -3),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         res = arr_mod(arr, factor)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2063
 * 
 *     # Round half to even / up / down
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         # . Small magnitudes
 *         (4, 2),
*/
  __pyx_t_1 = PyList_New(58); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[86]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[86]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[86]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[87]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[87]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[87]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[88]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[88]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[88]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[89]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[89]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[89]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[90]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[90]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[90]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[66]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[66]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[66]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[91]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[91]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[91]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[92]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[92]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[92]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[93]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[93]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[93]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[67]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[67]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[67]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[94]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[94]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[94]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[95]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[95]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[95]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[70]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[70]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[70]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[71]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[71]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[71]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[96]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[96]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[96]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[97]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[97]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[97]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[98]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[98]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[98]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[99]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[99]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[99]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[100]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[100]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[100]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[101]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[101]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[101]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[102]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[102]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[102]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[103]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[103]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[103]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[104]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[104]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[104]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[105]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[105]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[105]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[106]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[106]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 28, __pyx_mstate_global->__pyx_tuple[106]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[107]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[107]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 29, __pyx_mstate_global->__pyx_tuple[107]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[108]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[108]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 30, __pyx_mstate_global->__pyx_tuple[108]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[109]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[109]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 31, __pyx_mstate_global->__pyx_tuple[109]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[110]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[110]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 32, __pyx_mstate_global->__pyx_tuple[110]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[111]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[111]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 33, __pyx_mstate_global->__pyx_tuple[111]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[112]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[112]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 34, __pyx_mstate_global->__pyx_tuple[112]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[113]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[113]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 35, __pyx_mstate_global->__pyx_tuple[113]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[114]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[114]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 36, __pyx_mstate_global->__pyx_tuple[114]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[115]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[115]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 37, __pyx_mstate_global->__pyx_tuple[115]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[116]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[116]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 38, __pyx_mstate_global->__pyx_tuple[116]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[117]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[117]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 39, __pyx_mstate_global->__pyx_tuple[117]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 40, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 41, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 42, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 43, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 44, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 45, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[118]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[118]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 46, __pyx_mstate_global->__pyx_tuple[118]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[119]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[119]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 47, __pyx_mstate_global->__pyx_tuple[119]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[120]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[120]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 48, __pyx_mstate_global->__pyx_tuple[120]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[121]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[121]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 49, __pyx_mstate_global->__pyx_tuple[121]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[122]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[122]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 50, __pyx_mstate_global->__pyx_tuple[122]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[123]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[123]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 51, __pyx_mstate_global->__pyx_tuple[123]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[124]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[124]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 52, __pyx_mstate_global->__pyx_tuple[124]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[125]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[125]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 53, __pyx_mstate_global->__pyx_tuple[125]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[126]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[126]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 54, __pyx_mstate_global->__pyx_tuple[126]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[127]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[127]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 55, __pyx_mstate_global->__pyx_tuple[127]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[128]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[128]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 56, __pyx_mstate_global->__pyx_tuple[128]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[129]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[129]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 57, __pyx_mstate_global->__pyx_tuple[129]) != (0)) __PYX_ERR(0, 2063, __pyx_L1_error);
  __Pyx_DECREF_SET(__pyx_v_test_cases, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2125
 *         (2**62 + 2, -10),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         # half to even
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2125, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2125, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_7);
      } else {
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2125, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2125, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
      }
      #else
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 2125, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L11_unpacking_done;
      __pyx_L10_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2125, __pyx_L1_error)
      __pyx_L11_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":2126
 *     ]
 *     for num, factor in test_cases:
 *         arr = np.array([num], dtype="int64")             # <<<<<<<<<<<<<<
 *         # half to even
 *         res = arr_div_even(arr, factor)  # type: ignore
*/
    __pyx_t_7 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_num);
    __Pyx_GIVEREF(__pyx_v_num);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_num) != (0)) __PYX_ERR(0, 2126, __pyx_L1_error);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_5};
      __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2128
 *         arr = np.array([num], dtype="int64")
 *         # half to even
 *         res = arr_div_even(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_EVEN
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2128, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2128, __pyx_L1_error)
    __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2129
 *         # half to even
 *         res = arr_div_even(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(             # <<<<<<<<<<<<<<
 *             rounding=ROUND_HALF_EVEN
 *         )
*/
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_12 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_num};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_13 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_13);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_factor};
      __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_13 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_6 = __pyx_t_13;
    __Pyx_INCREF(__pyx_t_6);

    /* "cytimes/utils.py":2130
 *         res = arr_div_even(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_EVEN             # <<<<<<<<<<<<<<
 *         )
 *         assert (
*/
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_EVEN, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2129, __pyx_L1_error)
      __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cytimes/utils.py":2132
 *             rounding=ROUND_HALF_EVEN
 *         )
 *         assert (             # <<<<<<<<<<<<<<
 *             res[0] == exp
 *         ), f"Failed: arr_div_even({num}, {factor}) = {res[0]}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2133
 *         )
 *         assert (
 *             res[0] == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: arr_div_even({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to even multiple
*/
      __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyObject_RichCompare(__pyx_t_4, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2133, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2133, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_11)) {

        /* "cytimes/utils.py":2134
 *         assert (
 *             res[0] == exp
 *         ), f"Failed: arr_div_even({num}, {factor}) = {res[0]}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # half to even multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
*/
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_even;
        __pyx_t_14[1] = __pyx_t_13;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_14[3] = __pyx_t_4;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_14[5] = __pyx_t_6;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_14[7] = __pyx_t_12;
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_5, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 2132, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2132, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2136
 *         ), f"Failed: arr_div_even({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to even multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_even_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    __pyx_t_5 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_4611686018427387914, __pyx_v_num, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2136, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
      __Pyx_DECREF(__pyx_t_5);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_num, __pyx_mstate_global->__pyx_int_0x400000000000000a, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2136, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2136, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_11) {

      /* "cytimes/utils.py":2137
 *         # half to even multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_even_mul(arr, factor, 2)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert (
 *                 res2[0] == res[0] * 2
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2137, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2137, __pyx_L1_error)
      __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_even_mul(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, 2, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_res2, ((PyArrayObject *)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "cytimes/utils.py":2138
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_even_mul(arr, factor, 2)  # type: ignore
 *             assert (             # <<<<<<<<<<<<<<
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_even_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {

        /* "cytimes/utils.py":2139
 *             res2 = arr_div_even_mul(arr, factor, 2)  # type: ignore
 *             assert (
 *                 res2[0] == res[0] * 2             # <<<<<<<<<<<<<<
 *             ), f"Failed: arr_div_even_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # half to up
*/
        __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = __Pyx_PyLong_MultiplyObjC(__pyx_t_12, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2139, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2139, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {

          /* "cytimes/utils.py":2140
 *             assert (
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_even_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"             # <<<<<<<<<<<<<<
 *         # half to up
 *         res = arr_div_up(arr, factor)  # type: ignore
*/
          __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_13 = __Pyx_PyLong_MultiplyObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_even_mul;
          __pyx_t_14[1] = __pyx_t_12;
          __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_14[3] = __pyx_t_6;
          __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_2;
          __pyx_t_14[5] = __pyx_t_4;
          __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
          __pyx_t_14[7] = __pyx_t_5;
          __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2140, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_13, 0, 0);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __PYX_ERR(0, 2138, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 2138, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":2136
 *         ), f"Failed: arr_div_even({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to even multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_even_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    }

    /* "cytimes/utils.py":2142
 *             ), f"Failed: arr_div_even_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # half to up
 *         res = arr_div_up(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2142, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2142, __pyx_L1_error)
    __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_up(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_13));
    __pyx_t_13 = 0;

    /* "cytimes/utils.py":2143
 *         # half to up
 *         res = arr_div_up(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)             # <<<<<<<<<<<<<<
 *         assert (
 *             res[0] == exp
*/
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_12 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_num};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __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_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_7 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_factor};
      __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_5 = __pyx_t_7;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_UP, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __pyx_t_13 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_13);
    __pyx_t_13 = 0;

    /* "cytimes/utils.py":2144
 *         res = arr_div_up(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (             # <<<<<<<<<<<<<<
 *             res[0] == exp
 *         ), f"Failed: arr_div_up({num}, {factor}) = {res[0]}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2145
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_HALF_UP)
 *         assert (
 *             res[0] == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: arr_div_up({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to up multiple
*/
      __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_13, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2145, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_11)) {

        /* "cytimes/utils.py":2146
 *         assert (
 *             res[0] == exp
 *         ), f"Failed: arr_div_up({num}, {factor}) = {res[0]}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # half to up multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
*/
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_up;
        __pyx_t_14[1] = __pyx_t_7;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_14[3] = __pyx_t_13;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_14[5] = __pyx_t_5;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_14[7] = __pyx_t_12;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2144, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2144, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2148
 *         ), f"Failed: arr_div_up({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to up multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_up_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    __pyx_t_4 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_4611686018427387914, __pyx_v_num, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2148, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_4)) {
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_num, __pyx_mstate_global->__pyx_int_0x400000000000000a, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2148, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_11) {

      /* "cytimes/utils.py":2149
 *         # half to up multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_up_mul(arr, factor, 2)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert (
 *                 res2[0] == res[0] * 2
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2149, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L1_error)
      __pyx_t_4 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_up_mul(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, 2, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_res2, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "cytimes/utils.py":2150
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_up_mul(arr, factor, 2)  # type: ignore
 *             assert (             # <<<<<<<<<<<<<<
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_up_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {

        /* "cytimes/utils.py":2151
 *             res2 = arr_div_up_mul(arr, factor, 2)  # type: ignore
 *             assert (
 *                 res2[0] == res[0] * 2             # <<<<<<<<<<<<<<
 *             ), f"Failed: arr_div_up_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # half to down
*/
        __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = __Pyx_PyLong_MultiplyObjC(__pyx_t_12, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2151, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {

          /* "cytimes/utils.py":2152
 *             assert (
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_up_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"             # <<<<<<<<<<<<<<
 *         # half to down
 *         res = arr_div_down(arr, factor)  # type: ignore
*/
          __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = __Pyx_PyLong_MultiplyObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_up_mul;
          __pyx_t_14[1] = __pyx_t_12;
          __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_14[3] = __pyx_t_5;
          __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_2;
          __pyx_t_14[5] = __pyx_t_13;
          __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
          __pyx_t_14[7] = __pyx_t_4;
          __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_7, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(0, 2150, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 2150, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":2148
 *         ), f"Failed: arr_div_up({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to up multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_up_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    }

    /* "cytimes/utils.py":2154
 *             ), f"Failed: arr_div_up_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # half to down
 *         res = arr_div_down(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_DOWN
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2154, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2154, __pyx_L1_error)
    __pyx_t_7 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_down(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_7));
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":2155
 *         # half to down
 *         res = arr_div_down(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(             # <<<<<<<<<<<<<<
 *             rounding=ROUND_HALF_DOWN
 *         )
*/
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_12 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_num};
      __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    __pyx_t_5 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_6 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_factor};
      __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2155, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_4 = __pyx_t_6;
    __Pyx_INCREF(__pyx_t_4);

    /* "cytimes/utils.py":2156
 *         res = arr_div_down(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(
 *             rounding=ROUND_HALF_DOWN             # <<<<<<<<<<<<<<
 *         )
 *         assert (
*/
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_HALF_DOWN, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __pyx_t_7 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":2158
 *             rounding=ROUND_HALF_DOWN
 *         )
 *         assert (             # <<<<<<<<<<<<<<
 *             res[0] == exp
 *         ), f"Failed: arr_div_down({num}, {factor}) = {res[0]}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2159
 *         )
 *         assert (
 *             res[0] == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: arr_div_down({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to down multiple
*/
      __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2159, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2159, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) {

        /* "cytimes/utils.py":2160
 *         assert (
 *             res[0] == exp
 *         ), f"Failed: arr_div_down({num}, {factor}) = {res[0]}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # half to down multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
*/
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_down;
        __pyx_t_14[1] = __pyx_t_6;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_14[3] = __pyx_t_7;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_14[5] = __pyx_t_4;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_14[7] = __pyx_t_12;
        __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __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;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_13, 0, 0);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __PYX_ERR(0, 2158, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2158, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2162
 *         ), f"Failed: arr_div_down({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to down multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_down_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    __pyx_t_13 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_4611686018427387914, __pyx_v_num, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2162, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_13)) {
      __Pyx_DECREF(__pyx_t_13);
      __pyx_t_13 = PyObject_RichCompare(__pyx_v_num, __pyx_mstate_global->__pyx_int_0x400000000000000a, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2162, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2162, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_11) {

      /* "cytimes/utils.py":2163
 *         # half to down multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_down_mul(arr, factor, 2)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert (
 *                 res2[0] == res[0] * 2
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2163, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2163, __pyx_L1_error)
      __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_down_mul(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, 2, NULL)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_XDECREF_SET(__pyx_v_res2, ((PyArrayObject *)__pyx_t_13));
      __pyx_t_13 = 0;

      /* "cytimes/utils.py":2164
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_down_mul(arr, factor, 2)  # type: ignore
 *             assert (             # <<<<<<<<<<<<<<
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_down_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {

        /* "cytimes/utils.py":2165
 *             res2 = arr_div_down_mul(arr, factor, 2)  # type: ignore
 *             assert (
 *                 res2[0] == res[0] * 2             # <<<<<<<<<<<<<<
 *             ), f"Failed: arr_div_down_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 * 
*/
        __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_12, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_13, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2165, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2165, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {

          /* "cytimes/utils.py":2166
 *             assert (
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_down_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"             # <<<<<<<<<<<<<<
 * 
 *     # Ceil / Floor
*/
          __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_6 = __Pyx_PyLong_MultiplyObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_down_mul;
          __pyx_t_14[1] = __pyx_t_12;
          __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_14[3] = __pyx_t_4;
          __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_2;
          __pyx_t_14[5] = __pyx_t_7;
          __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
          __pyx_t_14[7] = __pyx_t_13;
          __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2166, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(0, 2164, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 2164, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":2162
 *         ), f"Failed: arr_div_down({num}, {factor}) = {res[0]}, expected {exp}"
 *         # half to down multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_down_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    }

    /* "cytimes/utils.py":2125
 *         (2**62 + 2, -10),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         # half to even
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2169
 * 
 *     # Ceil / Floor
 *     test_cases = [             # <<<<<<<<<<<<<<
 *         # 1) Exact division (r == 0)
 *         (4, 2),
*/
  __pyx_t_1 = PyList_New(52); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[62]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[63]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[64]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[64]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[64]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[65]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[65]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[65]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[68]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[88]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[88]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[88]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[69]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[89]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[89]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[89]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[72]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[72]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[72]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[130]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[130]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[130]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[73]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[73]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[73]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[131]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[131]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[131]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[132]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[132]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[132]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[133]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[133]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[133]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[134]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[134]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[134]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[135]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[135]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[135]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[97]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[97]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[97]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[98]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[98]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[98]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[136]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[136]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[136]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[99]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[99]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[99]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[106]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[106]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[106]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[107]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[107]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[107]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[108]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[108]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[108]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[109]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[109]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[109]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[78]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[79]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[79]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[79]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[55]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[57]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[110]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[110]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 28, __pyx_mstate_global->__pyx_tuple[110]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[111]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[111]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 29, __pyx_mstate_global->__pyx_tuple[111]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[112]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[112]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 30, __pyx_mstate_global->__pyx_tuple[112]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[113]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[113]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 31, __pyx_mstate_global->__pyx_tuple[113]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[114]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[114]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 32, __pyx_mstate_global->__pyx_tuple[114]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[115]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[115]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 33, __pyx_mstate_global->__pyx_tuple[115]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[116]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[116]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 34, __pyx_mstate_global->__pyx_tuple[116]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[117]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[117]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 35, __pyx_mstate_global->__pyx_tuple[117]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[137]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[137]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 36, __pyx_mstate_global->__pyx_tuple[137]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[138]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[138]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 37, __pyx_mstate_global->__pyx_tuple[138]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[139]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[139]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 38, __pyx_mstate_global->__pyx_tuple[139]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[140]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[140]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 39, __pyx_mstate_global->__pyx_tuple[140]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 40, __pyx_mstate_global->__pyx_tuple[80]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 41, __pyx_mstate_global->__pyx_tuple[81]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 42, __pyx_mstate_global->__pyx_tuple[84]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 43, __pyx_mstate_global->__pyx_tuple[85]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 44, __pyx_mstate_global->__pyx_tuple[82]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 45, __pyx_mstate_global->__pyx_tuple[83]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[118]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[118]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 46, __pyx_mstate_global->__pyx_tuple[118]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[119]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[119]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 47, __pyx_mstate_global->__pyx_tuple[119]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[141]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[141]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 48, __pyx_mstate_global->__pyx_tuple[141]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[142]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[142]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 49, __pyx_mstate_global->__pyx_tuple[142]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[143]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[143]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 50, __pyx_mstate_global->__pyx_tuple[143]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[144]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[144]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 51, __pyx_mstate_global->__pyx_tuple[144]) != (0)) __PYX_ERR(0, 2169, __pyx_L1_error);
  __Pyx_DECREF_SET(__pyx_v_test_cases, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2233
 *         (-(2**62), -(2**63 - 1)),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         # Ceil
*/
  __pyx_t_1 = __pyx_v_test_cases; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2233, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_3;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2233, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_13);
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_7);
      } else {
        __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2233, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_13);
        __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2233, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_7);
      }
      #else
      __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_13 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_13)) goto __pyx_L18_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_13);
      index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L18_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 2233, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L19_unpacking_done;
      __pyx_L18_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2233, __pyx_L1_error)
      __pyx_L19_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_13);
    __pyx_t_13 = 0;
    __Pyx_XDECREF_SET(__pyx_v_factor, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cytimes/utils.py":2234
 *     ]
 *     for num, factor in test_cases:
 *         arr = np.array([num], dtype="int64")             # <<<<<<<<<<<<<<
 *         # Ceil
 *         res = arr_div_ceil(arr, factor)  # type: ignore
*/
    __pyx_t_7 = __pyx_v_np;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_v_num);
    __Pyx_GIVEREF(__pyx_v_num);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v_num) != (0)) __PYX_ERR(0, 2234, __pyx_L1_error);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_13};
      __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2234, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":2236
 *         arr = np.array([num], dtype="int64")
 *         # Ceil
 *         res = arr_div_ceil(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2236, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2236, __pyx_L1_error)
    __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":2237
 *         # Ceil
 *         res = arr_div_ceil(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)             # <<<<<<<<<<<<<<
 *         assert (
 *             res[0] == exp
*/
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_12 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_num};
      __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
    }
    __pyx_t_7 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_5 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_factor};
      __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_4 = __pyx_t_5;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_CEILING, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2237, __pyx_L1_error)
      __pyx_t_6 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2237, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_exp, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cytimes/utils.py":2238
 *         res = arr_div_ceil(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (             # <<<<<<<<<<<<<<
 *             res[0] == exp
 *         ), f"Failed: arr_div_ceil({num}, {factor}) = {res[0]}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2239
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_CEILING)
 *         assert (
 *             res[0] == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: arr_div_ceil({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Ceil multiple
*/
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2239, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2239, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_11)) {

        /* "cytimes/utils.py":2240
 *         assert (
 *             res[0] == exp
 *         ), f"Failed: arr_div_ceil({num}, {factor}) = {res[0]}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # Ceil multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
*/
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_ceil;
        __pyx_t_14[1] = __pyx_t_5;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_14[3] = __pyx_t_6;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_14[5] = __pyx_t_4;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_14[7] = __pyx_t_12;
        __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __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;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_13, 0, 0);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __PYX_ERR(0, 2238, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2238, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2242
 *         ), f"Failed: arr_div_ceil({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Ceil multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_ceil_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    __pyx_t_13 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_4611686018427387914, __pyx_v_num, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2242, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_13)) {
      __Pyx_DECREF(__pyx_t_13);
      __pyx_t_13 = PyObject_RichCompare(__pyx_v_num, __pyx_mstate_global->__pyx_int_0x400000000000000a, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2242, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2242, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_11) {

      /* "cytimes/utils.py":2243
 *         # Ceil multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_ceil_mul(arr, factor, 2)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert (
 *                 res2[0] == res[0] * 2
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2243, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L1_error)
      __pyx_t_13 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_ceil_mul(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, 2, NULL)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_XDECREF_SET(__pyx_v_res2, ((PyArrayObject *)__pyx_t_13));
      __pyx_t_13 = 0;

      /* "cytimes/utils.py":2244
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_ceil_mul(arr, factor, 2)  # type: ignore
 *             assert (             # <<<<<<<<<<<<<<
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_ceil_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {

        /* "cytimes/utils.py":2245
 *             res2 = arr_div_ceil_mul(arr, factor, 2)  # type: ignore
 *             assert (
 *                 res2[0] == res[0] * 2             # <<<<<<<<<<<<<<
 *             ), f"Failed: arr_div_ceil_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # Floor
*/
        __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_12, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2245, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_13, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2245, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2245, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {

          /* "cytimes/utils.py":2246
 *             assert (
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_ceil_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"             # <<<<<<<<<<<<<<
 *         # Floor
 *         res = arr_div_floor(arr, factor)  # type: ignore
*/
          __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_5 = __Pyx_PyLong_MultiplyObjC(__pyx_t_13, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_ceil_mul;
          __pyx_t_14[1] = __pyx_t_12;
          __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_14[3] = __pyx_t_4;
          __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_2;
          __pyx_t_14[5] = __pyx_t_6;
          __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
          __pyx_t_14[7] = __pyx_t_13;
          __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_5, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(0, 2244, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 2244, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":2242
 *         ), f"Failed: arr_div_ceil({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Ceil multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_ceil_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    }

    /* "cytimes/utils.py":2248
 *             ), f"Failed: arr_div_ceil_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 *         # Floor
 *         res = arr_div_floor(arr, factor)  # type: ignore             # <<<<<<<<<<<<<<
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (
*/
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2248, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L1_error)
    __pyx_t_5 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_res, ((PyArrayObject *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":2249
 *         # Floor
 *         res = arr_div_floor(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)             # <<<<<<<<<<<<<<
 *         assert (
 *             res[0] == exp
*/
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_12 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_12, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_num};
      __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_4 = NULL;
    __Pyx_INCREF(__pyx_v_Decimal);
    __pyx_t_7 = __pyx_v_Decimal; 
    __pyx_t_9 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_9 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_factor};
      __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
    }
    __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_13 = __pyx_t_7;
    __Pyx_INCREF(__pyx_t_13);
    __pyx_t_9 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, NULL};
      __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_rounding, __pyx_v_ROUND_FLOOR, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2249, __pyx_L1_error)
      __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_to_integral_value, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_DECREF_SET(__pyx_v_exp, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":2250
 *         res = arr_div_floor(arr, factor)  # type: ignore
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (             # <<<<<<<<<<<<<<
 *             res[0] == exp
 *         ), f"Failed: arr_div_floor({num}, {factor}) = {res[0]}, expected {exp}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2251
 *         exp = (Decimal(num) / Decimal(factor)).to_integral_value(rounding=ROUND_FLOOR)
 *         assert (
 *             res[0] == exp             # <<<<<<<<<<<<<<
 *         ), f"Failed: arr_div_floor({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Floor multiple
*/
      __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_v_exp, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2251, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_11)) {

        /* "cytimes/utils.py":2252
 *         assert (
 *             res[0] == exp
 *         ), f"Failed: arr_div_floor({num}, {factor}) = {res[0]}, expected {exp}"             # <<<<<<<<<<<<<<
 *         # Floor multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
*/
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_exp, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_floor;
        __pyx_t_14[1] = __pyx_t_7;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_14[3] = __pyx_t_5;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_14[5] = __pyx_t_13;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_14[7] = __pyx_t_12;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2252, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 2250, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2250, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2254
 *         ), f"Failed: arr_div_floor({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Floor multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_floor_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    __pyx_t_6 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_neg_4611686018427387914, __pyx_v_num, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2254, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_6)) {
      __Pyx_DECREF(__pyx_t_6);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_num, __pyx_mstate_global->__pyx_int_0x400000000000000a, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2254, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {

      /* "cytimes/utils.py":2255
 *         # Floor multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_floor_mul(arr, factor, 2)  # type: ignore             # <<<<<<<<<<<<<<
 *             assert (
 *                 res2[0] == res[0] * 2
*/
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2255, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyLong_As_npy_int64(__pyx_v_factor); if (unlikely((__pyx_t_10 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2255, __pyx_L1_error)
      __pyx_t_6 = ((PyObject *)__pyx_f_7cytimes_5utils_arr_div_floor_mul(((PyArrayObject *)__pyx_v_arr), __pyx_t_10, 2, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_res2, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cytimes/utils.py":2256
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2
 *             res2 = arr_div_floor_mul(arr, factor, 2)  # type: ignore
 *             assert (             # <<<<<<<<<<<<<<
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_floor_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
*/
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {

        /* "cytimes/utils.py":2257
 *             res2 = arr_div_floor_mul(arr, factor, 2)  # type: ignore
 *             assert (
 *                 res2[0] == res[0] * 2             # <<<<<<<<<<<<<<
 *             ), f"Failed: arr_div_floor_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 * 
*/
        __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2257, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2257, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyLong_MultiplyObjC(__pyx_t_12, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2257, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_6, __pyx_t_13, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2257, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2257, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_11)) {

          /* "cytimes/utils.py":2258
 *             assert (
 *                 res2[0] == res[0] * 2
 *             ), f"Failed: arr_div_floor_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: ndarray_math")
*/
          __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_num, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_factor, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res2), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_res), 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyLong_MultiplyObjC(__pyx_t_6, __pyx_mstate_global->__pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_arr_div_floor_mul;
          __pyx_t_14[1] = __pyx_t_12;
          __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__3;
          __pyx_t_14[3] = __pyx_t_13;
          __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_2;
          __pyx_t_14[5] = __pyx_t_5;
          __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u_expected;
          __pyx_t_14[7] = __pyx_t_6;
          __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2258, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_7, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(0, 2256, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 2256, __pyx_L1_error)
      #endif

      /* "cytimes/utils.py":2254
 *         ), f"Failed: arr_div_floor({num}, {factor}) = {res[0]}, expected {exp}"
 *         # Floor multiple
 *         if -(2**62) - 10 < num < 2**62 + 10:  # avoid overflow in *2             # <<<<<<<<<<<<<<
 *             res2 = arr_div_floor_mul(arr, factor, 2)  # type: ignore
 *             assert (
*/
    }

    /* "cytimes/utils.py":2233
 *         (-(2**62), -(2**63 - 1)),
 *     ]
 *     for num, factor in test_cases:             # <<<<<<<<<<<<<<
 *         arr = np.array([num], dtype="int64")
 *         # Ceil
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2260
 *             ), f"Failed: arr_div_floor_mul({num}, {factor}, 2) = {res2[0]}, expected {res[0] * 2}"
 * 
 *     print("Passed: ndarray_math")             # <<<<<<<<<<<<<<
 * 
 *     del (
*/
  __pyx_t_7 = NULL;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Passed_ndarray_math};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2262
 *     print("Passed: ndarray_math")
 * 
 *     del (             # <<<<<<<<<<<<<<
 *         np,
 *         Decimal,
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;
  __Pyx_DECREF(__pyx_v_Decimal); __pyx_v_Decimal = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_EVEN); __pyx_v_ROUND_HALF_EVEN = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_UP); __pyx_v_ROUND_HALF_UP = 0;
  __Pyx_DECREF(__pyx_v_ROUND_HALF_DOWN); __pyx_v_ROUND_HALF_DOWN = 0;
  __Pyx_DECREF(__pyx_v_ROUND_CEILING); __pyx_v_ROUND_CEILING = 0;
  __Pyx_DECREF(__pyx_v_ROUND_FLOOR); __pyx_v_ROUND_FLOOR = 0;

  /* "cytimes/utils.py":2014
 * 
 * 
 * def _test_ndarray_math() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     from decimal import (
*/

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._test_ndarray_math", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_Decimal);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_EVEN);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_UP);
  __Pyx_XDECREF(__pyx_v_ROUND_HALF_DOWN);
  __Pyx_XDECREF(__pyx_v_ROUND_CEILING);
  __Pyx_XDECREF(__pyx_v_ROUND_FLOOR);
  __Pyx_XDECREF(__pyx_v_test_cases);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XDECREF(__pyx_v_factor);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_exp);
  __Pyx_XDECREF((PyObject *)__pyx_v_res2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":2273
 * 
 * 
 * def _test_sec_to_us() -> None:             # <<<<<<<<<<<<<<
 * 
 *     pairs = [
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_105_test_sec_to_us(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_105_test_sec_to_us = {"_test_sec_to_us", (PyCFunction)__pyx_pw_7cytimes_5utils_105_test_sec_to_us, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_105_test_sec_to_us(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_sec_to_us (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_104_test_sec_to_us(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_104_test_sec_to_us(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_pairs = NULL;
  PyObject *__pyx_v_ss = NULL;
  PyObject *__pyx_v_us = NULL;
  PY_LONG_LONG __pyx_v_res;
  struct tm __pyx_v_t1;
  struct tm __pyx_v_t2;
  __pyx_t_7cytimes_5utils_hmsf __pyx_v_h1;
  __pyx_t_7cytimes_5utils_hmsf __pyx_v_h2;
  PyDateTime_Date *__pyx_v_d1 = NULL;
  PyDateTime_Date *__pyx_v_d2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __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)(PyObject *);
  double __pyx_t_8;
  PY_LONG_LONG __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11[6];
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14[8];
  __pyx_t_7cytimes_5utils_hmsf __pyx_t_15;
  size_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_sec_to_us", 0);

  /* "cytimes/utils.py":2275
 * def _test_sec_to_us() -> None:
 * 
 *     pairs = [             # <<<<<<<<<<<<<<
 *         (0.0, 0),
 *         (1.0, 1_000_000),
*/
  __pyx_t_1 = PyList_New(30); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[145]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[145]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_tuple[145]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[146]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[146]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_tuple[146]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[147]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[147]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_mstate_global->__pyx_tuple[147]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[148]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[148]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_mstate_global->__pyx_tuple[148]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[149]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[149]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_mstate_global->__pyx_tuple[149]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[150]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[150]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_mstate_global->__pyx_tuple[150]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[151]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[151]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_mstate_global->__pyx_tuple[151]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[152]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[152]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_mstate_global->__pyx_tuple[152]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[153]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[153]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_mstate_global->__pyx_tuple[153]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[154]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[154]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_mstate_global->__pyx_tuple[154]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[155]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[155]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_mstate_global->__pyx_tuple[155]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[156]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[156]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_mstate_global->__pyx_tuple[156]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[157]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[157]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_mstate_global->__pyx_tuple[157]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[158]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[158]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_mstate_global->__pyx_tuple[158]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[159]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[159]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_mstate_global->__pyx_tuple[159]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[160]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[160]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 15, __pyx_mstate_global->__pyx_tuple[160]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[161]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[161]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 16, __pyx_mstate_global->__pyx_tuple[161]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[152]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[152]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 17, __pyx_mstate_global->__pyx_tuple[152]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[162]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[162]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 18, __pyx_mstate_global->__pyx_tuple[162]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[163]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[163]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 19, __pyx_mstate_global->__pyx_tuple[163]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[164]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[164]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 20, __pyx_mstate_global->__pyx_tuple[164]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[165]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[165]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 21, __pyx_mstate_global->__pyx_tuple[165]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[166]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[166]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 22, __pyx_mstate_global->__pyx_tuple[166]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[167]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[167]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 23, __pyx_mstate_global->__pyx_tuple[167]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[168]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[168]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 24, __pyx_mstate_global->__pyx_tuple[168]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[169]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[169]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 25, __pyx_mstate_global->__pyx_tuple[169]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[170]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[170]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 26, __pyx_mstate_global->__pyx_tuple[170]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[171]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[171]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 27, __pyx_mstate_global->__pyx_tuple[171]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[172]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[172]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 28, __pyx_mstate_global->__pyx_tuple[172]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[173]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[173]);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 29, __pyx_mstate_global->__pyx_tuple[173]) != (0)) __PYX_ERR(0, 2275, __pyx_L1_error);
  __pyx_v_pairs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2307
 *         (-2_147_483_648.000001, -2_147_483_648_000_001),
 *     ]
 *     for ss, us in pairs:             # <<<<<<<<<<<<<<
 *         # sec_to_us
 *         res = sec_to_us(ss)  # type: ignore
*/
  __pyx_t_1 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_SIZE
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2307, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference);
    ++__pyx_t_2;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2307, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_5);
      } else {
        __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2307, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error)
        __Pyx_XGOTREF(__pyx_t_5);
      }
      #else
      __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 2307, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2307, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_ss, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_us, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":2309
 *     for ss, us in pairs:
 *         # sec_to_us
 *         res = sec_to_us(ss)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert res == us, f"Failed: sec_to_us({ss}) = {res}, expected {us}"
 * 
*/
    __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_v_ss); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2309, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_7cytimes_5utils_sec_to_us(__pyx_t_8); if (unlikely(__pyx_t_9 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 2309, __pyx_L1_error)
    __pyx_v_res = __pyx_t_9;

    /* "cytimes/utils.py":2310
 *         # sec_to_us
 *         res = sec_to_us(ss)  # type: ignore
 *         assert res == us, f"Failed: sec_to_us({ss}) = {res}, expected {us}"             # <<<<<<<<<<<<<<
 * 
 *         # tm_from_*
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_3 = __Pyx_PyLong_From_PY_LONG_LONG(__pyx_v_res); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_us, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 2310, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_10)) {
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_ss, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_res, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_us, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11[0] = __pyx_mstate_global->__pyx_kp_u_Failed_sec_to_us;
        __pyx_t_11[1] = __pyx_t_5;
        __pyx_t_11[2] = __pyx_mstate_global->__pyx_kp_u__16;
        __pyx_t_11[3] = __pyx_t_3;
        __pyx_t_11[4] = __pyx_mstate_global->__pyx_kp_u_expected;
        __pyx_t_11[5] = __pyx_t_4;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_11, 6, 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2310, __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_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 2310, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2310, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2313
 * 
 *         # tm_from_*
 *         t1 = tm_fr_sec(ss)  # type: ignore             # <<<<<<<<<<<<<<
 *         t2 = tm_fr_us(us)  # type: ignore
 *         assert (
*/
    __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_v_ss); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2313, __pyx_L1_error)
    __pyx_v_t1 = __pyx_f_7cytimes_5utils_tm_fr_sec(__pyx_t_8);

    /* "cytimes/utils.py":2314
 *         # tm_from_*
 *         t1 = tm_fr_sec(ss)  # type: ignore
 *         t2 = tm_fr_us(us)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert (
 *             t1.tm_sec == t2.tm_sec
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_us); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L1_error)
    __pyx_v_t2 = __pyx_f_7cytimes_5utils_tm_fr_us(__pyx_t_9);

    /* "cytimes/utils.py":2315
 *         t1 = tm_fr_sec(ss)  # type: ignore
 *         t2 = tm_fr_us(us)  # type: ignore
 *         assert (             # <<<<<<<<<<<<<<
 *             t1.tm_sec == t2.tm_sec
 *             and t1.tm_min == t2.tm_min
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2316
 *         t2 = tm_fr_us(us)  # type: ignore
 *         assert (
 *             t1.tm_sec == t2.tm_sec             # <<<<<<<<<<<<<<
 *             and t1.tm_min == t2.tm_min
 *             and t1.tm_hour == t2.tm_hour
*/
      __pyx_t_12 = (__pyx_v_t1.tm_sec == __pyx_v_t2.tm_sec);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2317
 *         assert (
 *             t1.tm_sec == t2.tm_sec
 *             and t1.tm_min == t2.tm_min             # <<<<<<<<<<<<<<
 *             and t1.tm_hour == t2.tm_hour
 *             and t1.tm_mday == t2.tm_mday
*/
      __pyx_t_12 = (__pyx_v_t1.tm_min == __pyx_v_t2.tm_min);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2318
 *             t1.tm_sec == t2.tm_sec
 *             and t1.tm_min == t2.tm_min
 *             and t1.tm_hour == t2.tm_hour             # <<<<<<<<<<<<<<
 *             and t1.tm_mday == t2.tm_mday
 *             and t1.tm_mon == t2.tm_mon
*/
      __pyx_t_12 = (__pyx_v_t1.tm_hour == __pyx_v_t2.tm_hour);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2319
 *             and t1.tm_min == t2.tm_min
 *             and t1.tm_hour == t2.tm_hour
 *             and t1.tm_mday == t2.tm_mday             # <<<<<<<<<<<<<<
 *             and t1.tm_mon == t2.tm_mon
 *             and t1.tm_year == t2.tm_year
*/
      __pyx_t_12 = (__pyx_v_t1.tm_mday == __pyx_v_t2.tm_mday);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2320
 *             and t1.tm_hour == t2.tm_hour
 *             and t1.tm_mday == t2.tm_mday
 *             and t1.tm_mon == t2.tm_mon             # <<<<<<<<<<<<<<
 *             and t1.tm_year == t2.tm_year
 *             and t1.tm_wday == t2.tm_wday
*/
      __pyx_t_12 = (__pyx_v_t1.tm_mon == __pyx_v_t2.tm_mon);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2321
 *             and t1.tm_mday == t2.tm_mday
 *             and t1.tm_mon == t2.tm_mon
 *             and t1.tm_year == t2.tm_year             # <<<<<<<<<<<<<<
 *             and t1.tm_wday == t2.tm_wday
 *             and t1.tm_yday == t2.tm_yday
*/
      __pyx_t_12 = (__pyx_v_t1.tm_year == __pyx_v_t2.tm_year);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2322
 *             and t1.tm_mon == t2.tm_mon
 *             and t1.tm_year == t2.tm_year
 *             and t1.tm_wday == t2.tm_wday             # <<<<<<<<<<<<<<
 *             and t1.tm_yday == t2.tm_yday
 *             and t1.tm_isdst == t2.tm_isdst
*/
      __pyx_t_12 = (__pyx_v_t1.tm_wday == __pyx_v_t2.tm_wday);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2323
 *             and t1.tm_year == t2.tm_year
 *             and t1.tm_wday == t2.tm_wday
 *             and t1.tm_yday == t2.tm_yday             # <<<<<<<<<<<<<<
 *             and t1.tm_isdst == t2.tm_isdst
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {t1}\nhmsf_fr_us({us})\n => {t2}"
*/
      __pyx_t_12 = (__pyx_v_t1.tm_yday == __pyx_v_t2.tm_yday);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L7_bool_binop_done;
      }

      /* "cytimes/utils.py":2324
 *             and t1.tm_wday == t2.tm_wday
 *             and t1.tm_yday == t2.tm_yday
 *             and t1.tm_isdst == t2.tm_isdst             # <<<<<<<<<<<<<<
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {t1}\nhmsf_fr_us({us})\n => {t2}"
 * 
*/
      __pyx_t_12 = (__pyx_v_t1.tm_isdst == __pyx_v_t2.tm_isdst);
      __pyx_t_10 = __pyx_t_12;
      __pyx_L7_bool_binop_done:;
      if (unlikely(!__pyx_t_10)) {

        /* "cytimes/utils.py":2325
 *             and t1.tm_yday == t2.tm_yday
 *             and t1.tm_isdst == t2.tm_isdst
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {t1}\nhmsf_fr_us({us})\n => {t2}"             # <<<<<<<<<<<<<<
 * 
 *         # hmsf_from_*
*/
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_ss, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __pyx_convert__to_py_struct__tm(__pyx_v_t1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_us, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __pyx_convert__to_py_struct__tm(__pyx_v_t2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_hmsf_fr_sec;
        __pyx_t_14[1] = __pyx_t_6;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[3] = __pyx_t_3;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_hmsf_fr_us;
        __pyx_t_14[5] = __pyx_t_4;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[7] = __pyx_t_13;
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 6 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_5, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 2315, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2315, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2328
 * 
 *         # hmsf_from_*
 *         h1 = hmsf_fr_sec(ss)  # type: ignore             # <<<<<<<<<<<<<<
 *         h2 = hmsf_fr_us(us)  # type: ignore
 *         assert (
*/
    __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_v_ss); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2328, __pyx_L1_error)
    __pyx_t_15 = __pyx_f_7cytimes_5utils_hmsf_fr_sec(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2328, __pyx_L1_error)
    __pyx_v_h1 = __pyx_t_15;

    /* "cytimes/utils.py":2329
 *         # hmsf_from_*
 *         h1 = hmsf_fr_sec(ss)  # type: ignore
 *         h2 = hmsf_fr_us(us)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert (
 *             h1.hour == h2.hour
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_us); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2329, __pyx_L1_error)
    __pyx_v_h2 = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_t_9);

    /* "cytimes/utils.py":2330
 *         h1 = hmsf_fr_sec(ss)  # type: ignore
 *         h2 = hmsf_fr_us(us)  # type: ignore
 *         assert (             # <<<<<<<<<<<<<<
 *             h1.hour == h2.hour
 *             and h1.minute == h2.minute
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2331
 *         h2 = hmsf_fr_us(us)  # type: ignore
 *         assert (
 *             h1.hour == h2.hour             # <<<<<<<<<<<<<<
 *             and h1.minute == h2.minute
 *             and h1.second == h2.second
*/
      __pyx_t_12 = (__pyx_v_h1.hour == __pyx_v_h2.hour);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L16_bool_binop_done;
      }

      /* "cytimes/utils.py":2332
 *         assert (
 *             h1.hour == h2.hour
 *             and h1.minute == h2.minute             # <<<<<<<<<<<<<<
 *             and h1.second == h2.second
 *             and h1.microsecond == h2.microsecond
*/
      __pyx_t_12 = (__pyx_v_h1.minute == __pyx_v_h2.minute);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L16_bool_binop_done;
      }

      /* "cytimes/utils.py":2333
 *             h1.hour == h2.hour
 *             and h1.minute == h2.minute
 *             and h1.second == h2.second             # <<<<<<<<<<<<<<
 *             and h1.microsecond == h2.microsecond
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {h1}\nhmsf_fr_us({us})\n => {h2}"
*/
      __pyx_t_12 = (__pyx_v_h1.second == __pyx_v_h2.second);
      if (__pyx_t_12) {
      } else {
        __pyx_t_10 = __pyx_t_12;
        goto __pyx_L16_bool_binop_done;
      }

      /* "cytimes/utils.py":2334
 *             and h1.minute == h2.minute
 *             and h1.second == h2.second
 *             and h1.microsecond == h2.microsecond             # <<<<<<<<<<<<<<
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {h1}\nhmsf_fr_us({us})\n => {h2}"
 * 
*/
      __pyx_t_12 = (__pyx_v_h1.microsecond == __pyx_v_h2.microsecond);
      __pyx_t_10 = __pyx_t_12;
      __pyx_L16_bool_binop_done:;
      if (unlikely(!__pyx_t_10)) {

        /* "cytimes/utils.py":2335
 *             and h1.second == h2.second
 *             and h1.microsecond == h2.microsecond
 *         ), f"Failed:\nhmsf_fr_sec({ss})\n => {h1}\nhmsf_fr_us({us})\n => {h2}"             # <<<<<<<<<<<<<<
 * 
 *         # date_from_*
*/
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_ss, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = __pyx_convert__to_py___pyx_t_7cytimes_5utils_hmsf(__pyx_v_h1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_us, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_3 = __pyx_convert__to_py___pyx_t_7cytimes_5utils_hmsf(__pyx_v_h2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_hmsf_fr_sec;
        __pyx_t_14[1] = __pyx_t_5;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[3] = __pyx_t_4;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_hmsf_fr_us;
        __pyx_t_14[5] = __pyx_t_13;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[7] = __pyx_t_6;
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 6 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 2330, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2330, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2338
 * 
 *         # date_from_*
 *         d1 = date_fr_sec(ss)  # type: ignore             # <<<<<<<<<<<<<<
 *         d2 = date_fr_us(us)  # type: ignore
 *         assert (
*/
    __pyx_t_8 = __Pyx_PyFloat_AsDouble(__pyx_v_ss); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2338, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_sec(__pyx_t_8, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_d1, ((PyDateTime_Date *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":2339
 *         # date_from_*
 *         d1 = date_fr_sec(ss)  # type: ignore
 *         d2 = date_fr_us(us)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert (
 *             d1 == d2
*/
    __pyx_t_9 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_v_us); if (unlikely((__pyx_t_9 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2339, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_f_7cytimes_5utils_date_fr_us(__pyx_t_9, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_d2, ((PyDateTime_Date *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cytimes/utils.py":2340
 *         d1 = date_fr_sec(ss)  # type: ignore
 *         d2 = date_fr_us(us)  # type: ignore
 *         assert (             # <<<<<<<<<<<<<<
 *             d1 == d2
 *         ), f"Failed:\ndate_fr_sec({ss})\n => {d1}\ndate_fr_us({us})\n => {d2}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {

      /* "cytimes/utils.py":2341
 *         d2 = date_fr_us(us)  # type: ignore
 *         assert (
 *             d1 == d2             # <<<<<<<<<<<<<<
 *         ), f"Failed:\ndate_fr_sec({ss})\n => {d1}\ndate_fr_us({us})\n => {d2}"
 * 
*/
      __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_d1), ((PyObject *)__pyx_v_d2), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2341, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 2341, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_10)) {

        /* "cytimes/utils.py":2342
 *         assert (
 *             d1 == d2
 *         ), f"Failed:\ndate_fr_sec({ss})\n => {d1}\ndate_fr_us({us})\n => {d2}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: sec_to_us")
*/
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_ss, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_d1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_us, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_4 = __Pyx_PyObject_FormatSimple(((PyObject *)__pyx_v_d2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_14[0] = __pyx_mstate_global->__pyx_kp_u_Failed_date_fr_sec;
        __pyx_t_14[1] = __pyx_t_3;
        __pyx_t_14[2] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[3] = __pyx_t_6;
        __pyx_t_14[4] = __pyx_mstate_global->__pyx_kp_u_date_fr_us;
        __pyx_t_14[5] = __pyx_t_13;
        __pyx_t_14[6] = __pyx_mstate_global->__pyx_kp_u__17;
        __pyx_t_14[7] = __pyx_t_4;
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 6 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_5, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 2340, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2340, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2307
 *         (-2_147_483_648.000001, -2_147_483_648_000_001),
 *     ]
 *     for ss, us in pairs:             # <<<<<<<<<<<<<<
 *         # sec_to_us
 *         res = sec_to_us(ss)  # type: ignore
*/
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2344
 *         ), f"Failed:\ndate_fr_sec({ss})\n => {d1}\ndate_fr_us({us})\n => {d2}"
 * 
 *     print("Passed: sec_to_us")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_5 = NULL;
  __pyx_t_16 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_sec_to_us};
    __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cytimes/utils.py":2273
 * 
 * 
 * def _test_sec_to_us() -> None:             # <<<<<<<<<<<<<<
 * 
 *     pairs = [
*/

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cytimes.utils._test_sec_to_us", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pairs);
  __Pyx_XDECREF(__pyx_v_ss);
  __Pyx_XDECREF(__pyx_v_us);
  __Pyx_XDECREF((PyObject *)__pyx_v_d1);
  __Pyx_XDECREF((PyObject *)__pyx_v_d2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":2347
 * 
 * 
 * def _cross_test_with_ndarray() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_107_cross_test_with_ndarray(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_107_cross_test_with_ndarray = {"_cross_test_with_ndarray", (PyCFunction)__pyx_pw_7cytimes_5utils_107_cross_test_with_ndarray, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_107_cross_test_with_ndarray(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cross_test_with_ndarray (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_106_cross_test_with_ndarray(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_106_cross_test_with_ndarray(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_np = NULL;
  PyObject *__pyx_v_V = NULL;
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_v_arr_i = NULL;
  PyObject *__pyx_v_arr_f = NULL;
  PyArrayObject *__pyx_v_arr_Y = NULL;
  PyArrayObject *__pyx_v_arr_M = NULL;
  PyArrayObject *__pyx_v_arr_D = NULL;
  PyArrayObject *__pyx_v_arr_h = NULL;
  PyArrayObject *__pyx_v_arr_m = NULL;
  PyArrayObject *__pyx_v_arr_s = NULL;
  PyArrayObject *__pyx_v_arr_us = NULL;
  Py_ssize_t __pyx_v_i;
  PY_LONG_LONG __pyx_v_us_i;
  double __pyx_v_ss_f;
  PY_LONG_LONG __pyx_v_yy;
  PY_LONG_LONG __pyx_v_mm;
  PY_LONG_LONG __pyx_v_dd;
  PY_LONG_LONG __pyx_v_hh;
  PY_LONG_LONG __pyx_v_mi;
  PY_LONG_LONG __pyx_v_ss;
  PY_LONG_LONG __pyx_v_us;
  __pyx_t_7cytimes_5utils_ymd __pyx_v__ymd;
  __pyx_t_7cytimes_5utils_hmsf __pyx_v__hmsf;
  struct tm __pyx_v__tm;
  __pyx_t_7cytimes_5utils_dtm __pyx_v__dtm;
  PyArrayObject *__pyx_v_arr_ord = NULL;
  PyArrayObject *__pyx_v_arr_wkdy = NULL;
  PY_LONG_LONG __pyx_v_ord_i;
  PY_LONG_LONG __pyx_v_wkd_i;
  int __pyx_v_wkd;
  PyObject *__pyx_8genexpr3__pyx_v_i = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_i = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  size_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PY_LONG_LONG __pyx_t_14;
  double __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17[3];
  __pyx_t_7cytimes_5utils_hmsf __pyx_t_18;
  __pyx_t_7cytimes_5utils_dtm __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cross_test_with_ndarray", 0);

  /* "cytimes/utils.py":2348
 * 
 * def _cross_test_with_ndarray() -> None:
 *     import numpy as np             # <<<<<<<<<<<<<<
 * 
 *     # Times
*/
  __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_np = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2351
 * 
 *     # Times
 *     V = 9_999_999             # <<<<<<<<<<<<<<
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[us]")
 *     arr_i = arr.astype("int64")
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_int_9999999);
  __pyx_v_V = __pyx_mstate_global->__pyx_int_9999999;

  /* "cytimes/utils.py":2352
 *     # Times
 *     V = 9_999_999
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[us]")             # <<<<<<<<<<<<<<
 *     arr_i = arr.astype("int64")
 *     arr_f = arr_i.astype("float64") / 1_000_000.0
*/
  __pyx_t_3 = __pyx_v_np;
  __Pyx_INCREF(__pyx_t_3);
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2352, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = PyNumber_Negative(__pyx_v_V); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2352, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_AddObjC(__pyx_v_V, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2352, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__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;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2352, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2352, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2352, __pyx_L5_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      {
        __pyx_t_5 = __pyx_t_10(__pyx_t_8);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2352, __pyx_L5_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_i, __pyx_t_5);
      __pyx_t_5 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr3__pyx_v_i))) __PYX_ERR(0, 2352, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_datetime64_us, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2352, __pyx_L1_error)
    __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2353
 *     V = 9_999_999
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[us]")
 *     arr_i = arr.astype("int64")             # <<<<<<<<<<<<<<
 *     arr_f = arr_i.astype("float64") / 1_000_000.0
 *     arr_Y = dt64arr_year(arr)  # type: ignore
*/
  __pyx_t_8 = __pyx_v_arr;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int64};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_v_arr_i = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cytimes/utils.py":2354
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[us]")
 *     arr_i = arr.astype("int64")
 *     arr_f = arr_i.astype("float64") / 1_000_000.0             # <<<<<<<<<<<<<<
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore
*/
  __pyx_t_8 = __pyx_v_arr_i;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_n_u_float64};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_8 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_1, __pyx_mstate_global->__pyx_float_1000000_0, 1000000.0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_arr_f = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2355
 *     arr_i = arr.astype("int64")
 *     arr_f = arr_i.astype("float64") / 1_000_000.0
 *     arr_Y = dt64arr_year(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2355, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_year(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_Y = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2356
 *     arr_f = arr_i.astype("float64") / 1_000_000.0
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     arr_h = dt64arr_hour(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2356, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_M = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2357
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_h = dt64arr_hour(arr)  # type: ignore
 *     arr_m = dt64arr_minute(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2357, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_D = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2358
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     arr_h = dt64arr_hour(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_m = dt64arr_minute(arr)  # type: ignore
 *     arr_s = dt64arr_second(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2358, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_hour(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_h = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2359
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     arr_h = dt64arr_hour(arr)  # type: ignore
 *     arr_m = dt64arr_minute(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_s = dt64arr_second(arr)  # type: ignore
 *     arr_us = dt64arr_microsecond(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2359, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_minute(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_m = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2360
 *     arr_h = dt64arr_hour(arr)  # type: ignore
 *     arr_m = dt64arr_minute(arr)  # type: ignore
 *     arr_s = dt64arr_second(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_us = dt64arr_microsecond(arr)  # type: ignore
 *     for i in range(len(arr)):
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2360, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_second(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_s = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2361
 *     arr_m = dt64arr_minute(arr)  # type: ignore
 *     arr_s = dt64arr_second(arr)  # type: ignore
 *     arr_us = dt64arr_microsecond(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     for i in range(len(arr)):
 *         us_i: cython.longlong = arr_i[i]
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2361, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_microsecond(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_us = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2362
 *     arr_s = dt64arr_second(arr)  # type: ignore
 *     arr_us = dt64arr_microsecond(arr)  # type: ignore
 *     for i in range(len(arr)):             # <<<<<<<<<<<<<<
 *         us_i: cython.longlong = arr_i[i]
 *         ss_f: cython.double = arr_f[i]
*/
  __pyx_t_11 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2362, __pyx_L1_error)
  __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;

    /* "cytimes/utils.py":2363
 *     arr_us = dt64arr_microsecond(arr)  # type: ignore
 *     for i in range(len(arr)):
 *         us_i: cython.longlong = arr_i[i]             # <<<<<<<<<<<<<<
 *         ss_f: cython.double = arr_f[i]
 *         yy: cython.longlong = arr_Y[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_arr_i, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2363, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_us_i = __pyx_t_14;

    /* "cytimes/utils.py":2364
 *     for i in range(len(arr)):
 *         us_i: cython.longlong = arr_i[i]
 *         ss_f: cython.double = arr_f[i]             # <<<<<<<<<<<<<<
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_arr_f, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_15 = __Pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2364, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_ss_f = __pyx_t_15;

    /* "cytimes/utils.py":2365
 *         us_i: cython.longlong = arr_i[i]
 *         ss_f: cython.double = arr_f[i]
 *         yy: cython.longlong = arr_Y[i]             # <<<<<<<<<<<<<<
 *         mm: cython.longlong = arr_M[i]
 *         dd: cython.longlong = arr_D[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_Y), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_yy = __pyx_t_14;

    /* "cytimes/utils.py":2366
 *         ss_f: cython.double = arr_f[i]
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]             # <<<<<<<<<<<<<<
 *         dd: cython.longlong = arr_D[i]
 *         hh: cython.longlong = arr_h[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_M), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2366, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_mm = __pyx_t_14;

    /* "cytimes/utils.py":2367
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]
 *         dd: cython.longlong = arr_D[i]             # <<<<<<<<<<<<<<
 *         hh: cython.longlong = arr_h[i]
 *         mi: cython.longlong = arr_m[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_D), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_dd = __pyx_t_14;

    /* "cytimes/utils.py":2368
 *         mm: cython.longlong = arr_M[i]
 *         dd: cython.longlong = arr_D[i]
 *         hh: cython.longlong = arr_h[i]             # <<<<<<<<<<<<<<
 *         mi: cython.longlong = arr_m[i]
 *         ss: cython.longlong = arr_s[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_h), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2368, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_hh = __pyx_t_14;

    /* "cytimes/utils.py":2369
 *         dd: cython.longlong = arr_D[i]
 *         hh: cython.longlong = arr_h[i]
 *         mi: cython.longlong = arr_m[i]             # <<<<<<<<<<<<<<
 *         ss: cython.longlong = arr_s[i]
 *         us: cython.longlong = arr_us[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_m), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2369, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_mi = __pyx_t_14;

    /* "cytimes/utils.py":2370
 *         hh: cython.longlong = arr_h[i]
 *         mi: cython.longlong = arr_m[i]
 *         ss: cython.longlong = arr_s[i]             # <<<<<<<<<<<<<<
 *         us: cython.longlong = arr_us[i]
 * 
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_s), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2370, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_ss = __pyx_t_14;

    /* "cytimes/utils.py":2371
 *         mi: cython.longlong = arr_m[i]
 *         ss: cython.longlong = arr_s[i]
 *         us: cython.longlong = arr_us[i]             # <<<<<<<<<<<<<<
 * 
 *         # YMD from microseconds
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_us), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2371, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_us = __pyx_t_14;

    /* "cytimes/utils.py":2374
 * 
 *         # YMD from microseconds
 *         _ymd = ymd_fr_us(us_i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_us(__pyx_v_us_i);

    /* "cytimes/utils.py":2375
 *         # YMD from microseconds
 *         _ymd = ymd_fr_us(us_i)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2375, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2375, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2375, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2375, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2376
 *         _ymd = ymd_fr_us(us_i)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.month == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2376, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2376, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2377
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"             # <<<<<<<<<<<<<<
 * 
 *         # YMD from seconds (float)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.day == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2377, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2377, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2380
 * 
 *         # YMD from seconds (float)
 *         _ymd = ymd_fr_sec(ss_f)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_sec(__pyx_v_ss_f);

    /* "cytimes/utils.py":2381
 *         # YMD from seconds (float)
 *         _ymd = ymd_fr_sec(ss_f)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2381, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2381, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2382
 *         _ymd = ymd_fr_sec(ss_f)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.month == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2382, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2382, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2383
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"             # <<<<<<<<<<<<<<
 * 
 *         # hmsf From microseconds
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.day == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2383, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2383, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2383, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2386
 * 
 *         # hmsf From microseconds
 *         _hmsf = hmsf_fr_us(us_i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
*/
    __pyx_v__hmsf = __pyx_f_7cytimes_5utils_hmsf_fr_us(__pyx_v_us_i);

    /* "cytimes/utils.py":2387
 *         # hmsf From microseconds
 *         _hmsf = hmsf_fr_us(us_i)  # type: ignore
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2387, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2387, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2388
 *         _hmsf = hmsf_fr_us(us_i)  # type: ignore
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.minute == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.minute, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2388, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2388, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2389
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.second == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2389, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2389, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2389, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2389, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2389, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2390
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"             # <<<<<<<<<<<<<<
 * 
 *         # hmsf From seconds (float)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.microsecond == __pyx_v_us);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_us, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2390, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2390, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2393
 * 
 *         # hmsf From seconds (float)
 *         _hmsf = hmsf_fr_sec(ss_f)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
*/
    __pyx_t_18 = __pyx_f_7cytimes_5utils_hmsf_fr_sec(__pyx_v_ss_f); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2393, __pyx_L1_error)
    __pyx_v__hmsf = __pyx_t_18;

    /* "cytimes/utils.py":2394
 *         # hmsf From seconds (float)
 *         _hmsf = hmsf_fr_sec(ss_f)  # type: ignore
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2394, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2394, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2395
 *         _hmsf = hmsf_fr_sec(ss_f)  # type: ignore
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.minute == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.minute, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2395, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2395, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2395, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2396
 *         assert _hmsf.hour == hh, f"{_hmsf.hour} != {hh}"
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"             # <<<<<<<<<<<<<<
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.second == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2396, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2396, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2397
 *         assert _hmsf.minute == mi, f"{_hmsf.minute} != {mi}"
 *         assert _hmsf.second == ss, f"{_hmsf.second} != {ss}"
 *         assert _hmsf.microsecond == us, f"{_hmsf.microsecond} != {us}"             # <<<<<<<<<<<<<<
 * 
 *         # tm from microseconds
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__hmsf.microsecond == __pyx_v_us);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__hmsf.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_us, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2397, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2397, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2400
 * 
 *         # tm from microseconds
 *         _tm = tm_fr_us(us_i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
*/
    __pyx_v__tm = __pyx_f_7cytimes_5utils_tm_fr_us(__pyx_v_us_i);

    /* "cytimes/utils.py":2401
 *         # tm from microseconds
 *         _tm = tm_fr_us(us_i)  # type: ignore
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2401, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2401, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2402
 *         _tm = tm_fr_us(us_i)  # type: ignore
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_mon == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_mon, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2402, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2402, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2402, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2403
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_mday == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_mday, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2403, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2403, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2404
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2404, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2404, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2404, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2404, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2404, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2405
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_min == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_min, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2405, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2405, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2406
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"             # <<<<<<<<<<<<<<
 * 
 *         # tm from seconds (float)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_sec == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2406, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2406, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2409
 * 
 *         # tm from seconds (float)
 *         _tm = tm_fr_sec(ss_f)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
*/
    __pyx_v__tm = __pyx_f_7cytimes_5utils_tm_fr_sec(__pyx_v_ss_f);

    /* "cytimes/utils.py":2410
 *         # tm from seconds (float)
 *         _tm = tm_fr_sec(ss_f)  # type: ignore
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_year, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2410, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2410, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2411
 *         _tm = tm_fr_sec(ss_f)  # type: ignore
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_mon == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_mon, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2411, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2411, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2412
 *         assert _tm.tm_year == yy, f"{_tm.tm_year} != {yy}"
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_mday == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_mday, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2412, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2412, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2412, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2413
 *         assert _tm.tm_mon == mm, f"{_tm.tm_mon} != {mm}"
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2413, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2413, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2414
 *         assert _tm.tm_mday == dd, f"{_tm.tm_mday} != {dd}"
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_min == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_min, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2414, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2414, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2415
 *         assert _tm.tm_hour == hh, f"{_tm.tm_hour} != {hh}"
 *         assert _tm.tm_min == mi, f"{_tm.tm_min} != {mi}"
 *         assert _tm.tm_sec == ss, f"{_tm.tm_sec} != {ss}"             # <<<<<<<<<<<<<<
 * 
 *         # dtm from microseconds
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__tm.tm_sec == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__tm.tm_sec, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2415, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2415, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2418
 * 
 *         # dtm from microseconds
 *         _dtm = dtm_fr_us(us_i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
*/
    __pyx_v__dtm = __pyx_f_7cytimes_5utils_dtm_fr_us(__pyx_v_us_i);

    /* "cytimes/utils.py":2419
 *         # dtm from microseconds
 *         _dtm = dtm_fr_us(us_i)  # type: ignore
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2419, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2419, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2420
 *         _dtm = dtm_fr_us(us_i)  # type: ignore
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.month == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2420, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2420, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2421
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"             # <<<<<<<<<<<<<<
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.day == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2421, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2421, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2421, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2422
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2422, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2422, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2423
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.minute == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.minute, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2423, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2423, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2424
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"             # <<<<<<<<<<<<<<
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.second == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2424, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2424, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2424, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2425
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"             # <<<<<<<<<<<<<<
 * 
 *         # dtm from seconds (float)
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.microsecond == __pyx_v_us);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_us, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2425, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2425, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2428
 * 
 *         # dtm from seconds (float)
 *         _dtm = dtm_fr_sec(ss_f)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
*/
    __pyx_t_19 = __pyx_f_7cytimes_5utils_dtm_fr_sec(__pyx_v_ss_f); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2428, __pyx_L1_error)
    __pyx_v__dtm = __pyx_t_19;

    /* "cytimes/utils.py":2429
 *         # dtm from seconds (float)
 *         _dtm = dtm_fr_sec(ss_f)  # type: ignore
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2429, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2429, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2430
 *         _dtm = dtm_fr_sec(ss_f)  # type: ignore
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.month == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2430, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2430, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2431
 *         assert _dtm.year == yy, f"{_dtm.year} != {yy}"
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"             # <<<<<<<<<<<<<<
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.day == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2431, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2431, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2432
 *         assert _dtm.month == mm, f"{_dtm.month} != {mm}"
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"             # <<<<<<<<<<<<<<
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.hour == __pyx_v_hh);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.hour, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_hh, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2432, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2432, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2432, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2433
 *         assert _dtm.day == dd, f"{_dtm.day} != {dd}"
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"             # <<<<<<<<<<<<<<
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.minute == __pyx_v_mi);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.minute, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mi, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2433, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2433, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2434
 *         assert _dtm.hour == hh, f"{_dtm.hour} != {hh}"
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"             # <<<<<<<<<<<<<<
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.second == __pyx_v_ss);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.second, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_ss, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2434, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2434, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2435
 *         assert _dtm.minute == mi, f"{_dtm.minute} != {mi}"
 *         assert _dtm.second == ss, f"{_dtm.second} != {ss}"
 *         assert _dtm.microsecond == us, f"{_dtm.microsecond} != {us}"             # <<<<<<<<<<<<<<
 * 
 *     # Dates
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__dtm.microsecond == __pyx_v_us);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__dtm.microsecond, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_us, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_1;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2435, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2435, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2435, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":2438
 * 
 *     # Dates
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[D]")             # <<<<<<<<<<<<<<
 *     arr_ord = dt64arr_to_ord(arr)  # type: ignore
 *     arr_wkdy = dt64arr_weekday(arr)  # type: ignore
*/
  __pyx_t_1 = __pyx_v_np;
  __Pyx_INCREF(__pyx_t_1);
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_7 = PyNumber_Negative(__pyx_v_V); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2438, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_V, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = 1;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_6};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2438, __pyx_L14_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      {
        __pyx_t_3 = __pyx_t_10(__pyx_t_6);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2438, __pyx_L14_error)
            PyErr_Clear();
          }
          break;
        }
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr4__pyx_v_i))) __PYX_ERR(0, 2438, __pyx_L14_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i); __pyx_8genexpr4__pyx_v_i = 0;
    goto __pyx_L18_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i); __pyx_8genexpr4__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L18_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = 0;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_4};
    __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_mstate_global->__pyx_kp_u_datetime64_D, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_array, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __Pyx_DECREF_SET(__pyx_v_arr, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2439
 *     # Dates
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[D]")
 *     arr_ord = dt64arr_to_ord(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_wkdy = dt64arr_weekday(arr)  # type: ignore
 *     arr_Y = dt64arr_year(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2439, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_to_ord(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_ord = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2440
 *     arr = np.array([i for i in range(-V, V + 1)], dtype="datetime64[D]")
 *     arr_ord = dt64arr_to_ord(arr)  # type: ignore
 *     arr_wkdy = dt64arr_weekday(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2440, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_weekday(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_arr_wkdy = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2441
 *     arr_ord = dt64arr_to_ord(arr)  # type: ignore
 *     arr_wkdy = dt64arr_weekday(arr)  # type: ignore
 *     arr_Y = dt64arr_year(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2441, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_year(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF_SET(__pyx_v_arr_Y, ((PyArrayObject *)__pyx_t_8));
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2442
 *     arr_wkdy = dt64arr_weekday(arr)  # type: ignore
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     for i in range(len(arr)):
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2442, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_month(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF_SET(__pyx_v_arr_M, ((PyArrayObject *)__pyx_t_8));
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2443
 *     arr_Y = dt64arr_year(arr)  # type: ignore
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore             # <<<<<<<<<<<<<<
 *     for i in range(len(arr)):
 *         ord_i: cython.longlong = arr_ord[i]
*/
  if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2443, __pyx_L1_error)
  __pyx_t_8 = ((PyObject *)__pyx_f_7cytimes_5utils_dt64arr_day(((PyArrayObject *)__pyx_v_arr), NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF_SET(__pyx_v_arr_D, ((PyArrayObject *)__pyx_t_8));
  __pyx_t_8 = 0;

  /* "cytimes/utils.py":2444
 *     arr_M = dt64arr_month(arr)  # type: ignore
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     for i in range(len(arr)):             # <<<<<<<<<<<<<<
 *         ord_i: cython.longlong = arr_ord[i]
 *         wkd_i: cython.longlong = arr_wkdy[i]
*/
  __pyx_t_11 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2444, __pyx_L1_error)
  __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;

    /* "cytimes/utils.py":2445
 *     arr_D = dt64arr_day(arr)  # type: ignore
 *     for i in range(len(arr)):
 *         ord_i: cython.longlong = arr_ord[i]             # <<<<<<<<<<<<<<
 *         wkd_i: cython.longlong = arr_wkdy[i]
 *         yy: cython.longlong = arr_Y[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_ord), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2445, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_ord_i = __pyx_t_14;

    /* "cytimes/utils.py":2446
 *     for i in range(len(arr)):
 *         ord_i: cython.longlong = arr_ord[i]
 *         wkd_i: cython.longlong = arr_wkdy[i]             # <<<<<<<<<<<<<<
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_wkdy), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2446, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_wkd_i = __pyx_t_14;

    /* "cytimes/utils.py":2447
 *         ord_i: cython.longlong = arr_ord[i]
 *         wkd_i: cython.longlong = arr_wkdy[i]
 *         yy: cython.longlong = arr_Y[i]             # <<<<<<<<<<<<<<
 *         mm: cython.longlong = arr_M[i]
 *         dd: cython.longlong = arr_D[i]
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_Y), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2447, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_yy = __pyx_t_14;

    /* "cytimes/utils.py":2448
 *         wkd_i: cython.longlong = arr_wkdy[i]
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]             # <<<<<<<<<<<<<<
 *         dd: cython.longlong = arr_D[i]
 * 
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_M), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2448, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_mm = __pyx_t_14;

    /* "cytimes/utils.py":2449
 *         yy: cython.longlong = arr_Y[i]
 *         mm: cython.longlong = arr_M[i]
 *         dd: cython.longlong = arr_D[i]             # <<<<<<<<<<<<<<
 * 
 *         # YMD from ordinal
*/
    __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_arr_D), __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2449, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = __Pyx_PyLong_As_PY_LONG_LONG(__pyx_t_8); if (unlikely((__pyx_t_14 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_dd = __pyx_t_14;

    /* "cytimes/utils.py":2452
 * 
 *         # YMD from ordinal
 *         _ymd = ymd_fr_ord(ord_i)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
*/
    __pyx_v__ymd = __pyx_f_7cytimes_5utils_ymd_fr_ord(__pyx_v_ord_i);

    /* "cytimes/utils.py":2453
 *         # YMD from ordinal
 *         _ymd = ymd_fr_ord(ord_i)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"             # <<<<<<<<<<<<<<
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.year == __pyx_v_yy);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.year, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2453, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_yy, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2453, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_6;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2453, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2453, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2453, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2454
 *         _ymd = ymd_fr_ord(ord_i)  # type: ignore
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"             # <<<<<<<<<<<<<<
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"
 * 
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.month == __pyx_v_mm);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.month, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_mm, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_6;
        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127);
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_8, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 2454, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2454, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2455
 *         assert _ymd.year == yy, f"{_ymd.year} != {yy}"
 *         assert _ymd.month == mm, f"{_ymd.month} != {mm}"
 *         assert _ymd.day == dd, f"{_ymd.day} != {dd}"             # <<<<<<<<<<<<<<
 * 
 *         # Weekday
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v__ymd.day == __pyx_v_dd);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_8 = __Pyx_PyUnicode_From_int(__pyx_v__ymd.day, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_dd, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_17[0] = __pyx_t_8;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_6;
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_4, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 2455, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2455, __pyx_L1_error)
    #endif

    /* "cytimes/utils.py":2458
 * 
 *         # Weekday
 *         wkd = ymd_weekday(yy, mm, dd)  # type: ignore             # <<<<<<<<<<<<<<
 *         assert wkd == wkd_i, f"{wkd_i} != {wkd_i}"
 * 
*/
    __pyx_v_wkd = __pyx_f_7cytimes_5utils_ymd_weekday(__pyx_v_yy, __pyx_v_mm, __pyx_v_dd);

    /* "cytimes/utils.py":2459
 *         # Weekday
 *         wkd = ymd_weekday(yy, mm, dd)  # type: ignore
 *         assert wkd == wkd_i, f"{wkd_i} != {wkd_i}"             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: cross_test_with_ndarray")
*/
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_16 = (__pyx_v_wkd == __pyx_v_wkd_i);
      if (unlikely(!__pyx_t_16)) {
        __pyx_t_4 = __Pyx_PyUnicode_From_PY_LONG_LONG(__pyx_v_wkd_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2459, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_17[0] = __pyx_t_4;
        __pyx_t_17[1] = __pyx_mstate_global->__pyx_kp_u__14;
        __pyx_t_17[2] = __pyx_t_4;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_17, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) * 2 + 4, 127);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2459, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(0, 2459, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(0, 2459, __pyx_L1_error)
    #endif
  }

  /* "cytimes/utils.py":2461
 *         assert wkd == wkd_i, f"{wkd_i} != {wkd_i}"
 * 
 *     print("Passed: cross_test_with_ndarray")             # <<<<<<<<<<<<<<
 * 
 *     del np
*/
  __pyx_t_4 = NULL;
  __pyx_t_9 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Passed_cross_test_with_ndarray};
    __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cytimes/utils.py":2463
 *     print("Passed: cross_test_with_ndarray")
 * 
 *     del np             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_DECREF(__pyx_v_np); __pyx_v_np = 0;

  /* "cytimes/utils.py":2347
 * 
 * 
 * def _cross_test_with_ndarray() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/

  /* 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_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.utils._cross_test_with_ndarray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_np);
  __Pyx_XDECREF(__pyx_v_V);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_arr_i);
  __Pyx_XDECREF(__pyx_v_arr_f);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_Y);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_M);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_D);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_h);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_m);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_s);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_us);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_ord);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr_wkdy);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":2466
 * 
 * 
 * def _test_slice_to_uint() -> None:             # <<<<<<<<<<<<<<
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 *     i_str = "0123456789"
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_109_test_slice_to_uint(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_109_test_slice_to_uint = {"_test_slice_to_uint", (PyCFunction)__pyx_pw_7cytimes_5utils_109_test_slice_to_uint, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_109_test_slice_to_uint(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_slice_to_uint (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_108_test_slice_to_uint(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_108_test_slice_to_uint(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_non_digits = NULL;
  PyObject *__pyx_v_i_str = NULL;
  Py_ssize_t __pyx_v_i_len;
  PyObject *__pyx_v_pfix = NULL;
  PyObject *__pyx_v_sfix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  void *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  unsigned PY_LONG_LONG __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  size_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_slice_to_uint", 0);

  /* "cytimes/utils.py":2467
 * 
 * def _test_slice_to_uint() -> None:
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"             # <<<<<<<<<<<<<<
 *     i_str = "0123456789"
 *     i_len: cython.Py_ssize_t = len(i_str)
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcde);
  __pyx_v_non_digits = __pyx_mstate_global->__pyx_kp_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcde;

  /* "cytimes/utils.py":2468
 * def _test_slice_to_uint() -> None:
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 *     i_str = "0123456789"             # <<<<<<<<<<<<<<
 *     i_len: cython.Py_ssize_t = len(i_str)
 *     for pfix in non_digits:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_0123456789);
  __pyx_v_i_str = __pyx_mstate_global->__pyx_kp_u_0123456789;

  /* "cytimes/utils.py":2469
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 *     i_str = "0123456789"
 *     i_len: cython.Py_ssize_t = len(i_str)             # <<<<<<<<<<<<<<
 *     for pfix in non_digits:
 *         try:
*/
  __pyx_t_1 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_i_str); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2469, __pyx_L1_error)
  __pyx_v_i_len = __pyx_t_1;

  /* "cytimes/utils.py":2470
 *     i_str = "0123456789"
 *     i_len: cython.Py_ssize_t = len(i_str)
 *     for pfix in non_digits:             # <<<<<<<<<<<<<<
 *         try:
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore
*/
  __Pyx_INCREF(__pyx_v_non_digits);
  __pyx_t_2 = __pyx_v_non_digits;
  __pyx_t_6 = __Pyx_init_unicode_iteration(__pyx_t_2, (&__pyx_t_3), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2470, __pyx_L1_error)
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7++) {
    __pyx_t_1 = __pyx_t_7;
    __pyx_t_8 = __Pyx_PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_5, __pyx_t_4, __pyx_t_1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_pfix, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/utils.py":2471
 *     i_len: cython.Py_ssize_t = len(i_str)
 *     for pfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
    {
      __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/utils.py":2472
 *     for pfix in non_digits:
 *         try:
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
*/
        __pyx_t_8 = PyNumber_Add(__pyx_v_pfix, __pyx_v_i_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2472, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 2472, __pyx_L5_error)
        __pyx_t_12 = __pyx_f_7cytimes_5utils_slice_to_uint(((PyObject*)__pyx_t_8), 0, (__pyx_v_i_len + 1), NULL); if (unlikely(__pyx_t_12 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(0, 2472, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/utils.py":2471
 *     i_len: cython.Py_ssize_t = len(i_str)
 *     for pfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/utils.py":2473
 *         try:
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
      if (__pyx_t_6) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;

      /* "cytimes/utils.py":2471
 *     i_len: cython.Py_ssize_t = len(i_str)
 *     for pfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(pfix + i_str, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
      __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_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);
      __pyx_L12_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":2476
 *             pass
 * 
 *     for sfix in non_digits:             # <<<<<<<<<<<<<<
 *         try:
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore
*/
  __Pyx_INCREF(__pyx_v_non_digits);
  __pyx_t_2 = __pyx_v_non_digits;
  __pyx_t_6 = __Pyx_init_unicode_iteration(__pyx_t_2, (&__pyx_t_1), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2476, __pyx_L1_error)
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7++) {
    __pyx_t_3 = __pyx_t_7;
    __pyx_t_8 = __Pyx_PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_5, __pyx_t_4, __pyx_t_3)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_sfix, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cytimes/utils.py":2477
 * 
 *     for sfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      /*try:*/ {

        /* "cytimes/utils.py":2478
 *     for sfix in non_digits:
 *         try:
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
*/
        __pyx_t_8 = PyNumber_Add(__pyx_v_i_str, __pyx_v_sfix); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2478, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 2478, __pyx_L17_error)
        __pyx_t_12 = __pyx_f_7cytimes_5utils_slice_to_uint(((PyObject*)__pyx_t_8), 0, (__pyx_v_i_len + 1), NULL); if (unlikely(__pyx_t_12 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(0, 2478, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cytimes/utils.py":2477
 * 
 *     for sfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L24_try_end;
      __pyx_L17_error:;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cytimes/utils.py":2479
 *         try:
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
      if (__pyx_t_6) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L18_exception_handled;
      }
      goto __pyx_L19_except_error;

      /* "cytimes/utils.py":2477
 * 
 *     for sfix in non_digits:
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_uint(i_str + sfix, 0, i_len + 1)  # type: ignore
 *         except ValueError:
*/
      __pyx_L19_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      goto __pyx_L1_error;
      __pyx_L18_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      __pyx_L24_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":2482
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 1)  # type: ignore
 *     except ValueError:
*/
  {
    __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/utils.py":2483
 * 
 *     try:
 *         slice_to_uint("", 0, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
*/
      __pyx_t_12 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_mstate_global->__pyx_kp_u__5, 0, 1, NULL); if (unlikely(__pyx_t_12 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(0, 2483, __pyx_L27_error)

      /* "cytimes/utils.py":2482
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 1)  # type: ignore
 *     except ValueError:
*/
    }
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L32_try_end;
    __pyx_L27_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/utils.py":2484
 *     try:
 *         slice_to_uint("", 0, 1)  # type: ignore
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L28_exception_handled;
    }
    goto __pyx_L29_except_error;

    /* "cytimes/utils.py":2482
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 1)  # type: ignore
 *     except ValueError:
*/
    __pyx_L29_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_L28_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);
    __pyx_L32_try_end:;
  }

  /* "cytimes/utils.py":2487
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 0)  # type: ignore
 *     except ValueError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "cytimes/utils.py":2488
 * 
 *     try:
 *         slice_to_uint("", 0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
*/
      __pyx_t_12 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_mstate_global->__pyx_kp_u__5, 0, 0, NULL); if (unlikely(__pyx_t_12 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(0, 2488, __pyx_L35_error)

      /* "cytimes/utils.py":2487
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 0)  # type: ignore
 *     except ValueError:
*/
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L40_try_end;
    __pyx_L35_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cytimes/utils.py":2489
 *     try:
 *         slice_to_uint("", 0, 0)  # type: ignore
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_5) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L36_exception_handled;
    }
    goto __pyx_L37_except_error;

    /* "cytimes/utils.py":2487
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_uint("", 0, 0)  # type: ignore
 *     except ValueError:
*/
    __pyx_L37_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L36_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    __pyx_L40_try_end:;
  }

  /* "cytimes/utils.py":2492
 *         pass
 * 
 *     assert slice_to_uint(i_str, 0, i_len) == 123456789  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     print("Passed: slice_to_uint")
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_12 = __pyx_f_7cytimes_5utils_slice_to_uint(__pyx_v_i_str, 0, __pyx_v_i_len, NULL); if (unlikely(__pyx_t_12 == ((unsigned PY_LONG_LONG)-1LL))) __PYX_ERR(0, 2492, __pyx_L1_error)
    __pyx_t_13 = (__pyx_t_12 == 0x75BCD15);
    if (unlikely(!__pyx_t_13)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2492, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2492, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2494
 *     assert slice_to_uint(i_str, 0, i_len) == 123456789  # type: ignore
 * 
 *     print("Passed: slice_to_uint")             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_14 = NULL;
  __pyx_t_15 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_Passed_slice_to_uint};
    __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __pyx_callargs+__pyx_t_15, (2-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cytimes/utils.py":2466
 * 
 * 
 * def _test_slice_to_uint() -> None:             # <<<<<<<<<<<<<<
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 *     i_str = "0123456789"
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("cytimes.utils._test_slice_to_uint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_non_digits);
  __Pyx_XDECREF(__pyx_v_i_str);
  __Pyx_XDECREF(__pyx_v_pfix);
  __Pyx_XDECREF(__pyx_v_sfix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cytimes/utils.py":2497
 * 
 * 
 * def _test_slice_to_ufloat() -> None:             # <<<<<<<<<<<<<<
 * 
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore
*/

/* Python wrapper */
static PyObject *__pyx_pw_7cytimes_5utils_111_test_slice_to_ufloat(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7cytimes_5utils_111_test_slice_to_ufloat = {"_test_slice_to_ufloat", (PyCFunction)__pyx_pw_7cytimes_5utils_111_test_slice_to_ufloat, METH_NOARGS, 0};
static PyObject *__pyx_pw_7cytimes_5utils_111_test_slice_to_ufloat(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_test_slice_to_ufloat (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7cytimes_5utils_110_test_slice_to_ufloat(__pyx_self);

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

static PyObject *__pyx_pf_7cytimes_5utils_110_test_slice_to_ufloat(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  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;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_test_slice_to_ufloat", 0);

  /* "cytimes/utils.py":2499
 * def _test_slice_to_ufloat() -> None:
 * 
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore             # <<<<<<<<<<<<<<
 *     assert slice_to_ufloat("1.1", 0, 3) == 1.1  # type: ignore
 *     assert slice_to_ufloat("0.1", 0, 3) == 0.1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u_1, 0, 1, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2499, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 1.0);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2499, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2499, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2500
 * 
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore
 *     assert slice_to_ufloat("1.1", 0, 3) == 1.1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert slice_to_ufloat("0.1", 0, 3) == 0.1  # type: ignore
 *     assert slice_to_ufloat(".1", 0, 2) == 0.1  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u_1_1, 0, 3, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2500, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 1.1);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2500, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2500, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2501
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore
 *     assert slice_to_ufloat("1.1", 0, 3) == 1.1  # type: ignore
 *     assert slice_to_ufloat("0.1", 0, 3) == 0.1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert slice_to_ufloat(".1", 0, 2) == 0.1  # type: ignore
 *     assert slice_to_ufloat("1.", 0, 2) == 1.0  # type: ignore
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u_0_1, 0, 3, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2501, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 0.1);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2501, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2501, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2502
 *     assert slice_to_ufloat("1.1", 0, 3) == 1.1  # type: ignore
 *     assert slice_to_ufloat("0.1", 0, 3) == 0.1  # type: ignore
 *     assert slice_to_ufloat(".1", 0, 2) == 0.1  # type: ignore             # <<<<<<<<<<<<<<
 *     assert slice_to_ufloat("1.", 0, 2) == 1.0  # type: ignore
 * 
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u_1_3, 0, 2, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2502, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 0.1);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2502, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2502, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2503
 *     assert slice_to_ufloat("0.1", 0, 3) == 0.1  # type: ignore
 *     assert slice_to_ufloat(".1", 0, 2) == 0.1  # type: ignore
 *     assert slice_to_ufloat("1.", 0, 2) == 1.0  # type: ignore             # <<<<<<<<<<<<<<
 * 
 *     for i in (
*/
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u_1_2, 0, 2, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 == 1.0);
    if (unlikely(!__pyx_t_2)) {
      __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0);
      __PYX_ERR(0, 2503, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(0, 2503, __pyx_L1_error)
  #endif

  /* "cytimes/utils.py":2505
 *     assert slice_to_ufloat("1.", 0, 2) == 1.0  # type: ignore
 * 
 *     for i in (             # <<<<<<<<<<<<<<
 *         "1.1.1",
 *         "1..1",
*/
  __pyx_t_3 = __pyx_mstate_global->__pyx_tuple[174]; __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= 11) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4));
    #else
    __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4);
    #endif
    ++__pyx_t_4;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_i, ((PyObject*)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "cytimes/utils.py":2518
 *         "1.1 ",
 *     ):
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_ufloat(i, 0, len(i))  # type: ignore
 *         except ValueError:
*/
    {
      __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/utils.py":2519
 *     ):
 *         try:
 *             slice_to_ufloat(i, 0, len(i))  # type: ignore             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
*/
        if (unlikely(__pyx_v_i == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(0, 2519, __pyx_L5_error)
        }
        __pyx_t_9 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_i); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2519, __pyx_L5_error)
        __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_v_i, 0, __pyx_t_9, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2519, __pyx_L5_error)

        /* "cytimes/utils.py":2518
 *         "1.1 ",
 *     ):
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_ufloat(i, 0, len(i))  # type: ignore
 *         except ValueError:
*/
      }
      __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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cytimes/utils.py":2520
 *         try:
 *             slice_to_ufloat(i, 0, len(i))  # type: ignore
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
*/
      __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
      if (__pyx_t_10) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;

      /* "cytimes/utils.py":2518
 *         "1.1 ",
 *     ):
 *         try:             # <<<<<<<<<<<<<<
 *             slice_to_ufloat(i, 0, len(i))  # type: ignore
 *         except ValueError:
*/
      __pyx_L7_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_L6_exception_handled:;
      __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);
      __pyx_L12_try_end:;
    }

    /* "cytimes/utils.py":2505
 *     assert slice_to_ufloat("1.", 0, 2) == 1.0  # type: ignore
 * 
 *     for i in (             # <<<<<<<<<<<<<<
 *         "1.1.1",
 *         "1..1",
*/
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":2523
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 1)  # type: ignore
 *     except ValueError:
*/
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "cytimes/utils.py":2524
 * 
 *     try:
 *         slice_to_ufloat("", 0, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u__5, 0, 1, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2524, __pyx_L16_error)

      /* "cytimes/utils.py":2523
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 1)  # type: ignore
 *     except ValueError:
*/
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/utils.py":2525
 *     try:
 *         slice_to_ufloat("", 0, 1)  # type: ignore
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;

    /* "cytimes/utils.py":2523
 *             pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 1)  # type: ignore
 *     except ValueError:
*/
    __pyx_L18_except_error:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L17_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
    __pyx_L21_try_end:;
  }

  /* "cytimes/utils.py":2528
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 0)  # type: ignore
 *     except ValueError:
*/
  {
    __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/utils.py":2529
 * 
 *     try:
 *         slice_to_ufloat("", 0, 0)  # type: ignore             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
*/
      __pyx_t_1 = __pyx_f_7cytimes_5utils_slice_to_ufloat(__pyx_mstate_global->__pyx_kp_u__5, 0, 0, NULL); if (unlikely(__pyx_t_1 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2529, __pyx_L24_error)

      /* "cytimes/utils.py":2528
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 0)  # type: ignore
 *     except ValueError:
*/
    }
    __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_L29_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cytimes/utils.py":2530
 *     try:
 *         slice_to_ufloat("", 0, 0)  # type: ignore
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
*/
    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ValueError))));
    if (__pyx_t_10) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L25_exception_handled;
    }
    goto __pyx_L26_except_error;

    /* "cytimes/utils.py":2528
 *         pass
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         slice_to_ufloat("", 0, 0)  # type: ignore
 *     except ValueError:
*/
    __pyx_L26_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_L25_exception_handled:;
    __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);
    __pyx_L29_try_end:;
  }

  /* "cytimes/utils.py":2533
 *         pass
 * 
 *     print("Passed: slice_to_ufloat")             # <<<<<<<<<<<<<<
*/
  __pyx_t_5 = NULL;
  __pyx_t_11 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Passed_slice_to_ufloat};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_print, __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;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cytimes/utils.py":2497
 * 
 * 
 * def _test_slice_to_ufloat() -> None:             # <<<<<<<<<<<<<<
 * 
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cytimes.utils._test_slice_to_ufloat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

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_v_7cytimes_5utils_NAT = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_EPOCH_DT = ((PyDateTime_DateTime *)Py_None); Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_UTC = ((PyDateTime_TZInfo *)Py_None); Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_T_TIMEZONE = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_T_ZONEINFO = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils__LOCAL_TIMEZONE = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils__UTC_ALIASES = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_YY = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_MM = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_WW = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_DD = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_HH = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_MI = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_SS = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_MS = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_US = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_NS = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_PS = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_FS = Py_None; Py_INCREF(Py_None);
  __pyx_v_7cytimes_5utils_DT64_DTYPE_AS = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_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_export_code", 0);
  /*--- Variable export code ---*/
  {
    __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PY_LONG_LONG_PyDateTime_DateTime);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_export_name = __pyx_export_signature + 185;
    void *const __pyx_export_pointers[] = {(void *)&__pyx_v_7cytimes_5utils_DT64_NS_DD_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_DD_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_HH_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_HH_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MI_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MI_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MM_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MM_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MS_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_MS_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_NS_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_NS_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_SS_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_SS_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_US_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_US_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_WW_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_WW_MIN, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_YY_MAX, (void *)&__pyx_v_7cytimes_5utils_DT64_NS_YY_MIN, (void *)&__pyx_v_7cytimes_5utils_EPOCH_C100, (void *)&__pyx_v_7cytimes_5utils_EPOCH_C4, (void *)&__pyx_v_7cytimes_5utils_EPOCH_C400, (void *)&__pyx_v_7cytimes_5utils_EPOCH_CBASE, (void *)&__pyx_v_7cytimes_5utils_EPOCH_DAY, (void *)&__pyx_v_7cytimes_5utils_EPOCH_HOUR, (void *)&__pyx_v_7cytimes_5utils_EPOCH_MICROSECOND, (void *)&__pyx_v_7cytimes_5utils_EPOCH_MILLISECOND, (void *)&__pyx_v_7cytimes_5utils_EPOCH_MINUTE, (void *)&__pyx_v_7cytimes_5utils_EPOCH_MONTH, (void *)&__pyx_v_7cytimes_5utils_EPOCH_SECOND, (void *)&__pyx_v_7cytimes_5utils_EPOCH_YEAR, (void *)&__pyx_v_7cytimes_5utils_MS_DAY, (void *)&__pyx_v_7cytimes_5utils_MS_HOUR, (void *)&__pyx_v_7cytimes_5utils_MS_MINUTE, (void *)&__pyx_v_7cytimes_5utils_MS_SECOND, (void *)&__pyx_v_7cytimes_5utils_NS_DAY, (void *)&__pyx_v_7cytimes_5utils_NS_HOUR, (void *)&__pyx_v_7cytimes_5utils_NS_MICROSECOND, (void *)&__pyx_v_7cytimes_5utils_NS_MILLISECOND, (void *)&__pyx_v_7cytimes_5utils_NS_MINUTE, (void *)&__pyx_v_7cytimes_5utils_NS_SECOND, (void *)&__pyx_v_7cytimes_5utils_SS_DAY, (void *)&__pyx_v_7cytimes_5utils_SS_HOUR, (void *)&__pyx_v_7cytimes_5utils_SS_MINUTE, (void *)&__pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_MM_SECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND, (void *)&__pyx_v_7cytimes_5utils_TD64_YY_SECOND, (void *)&__pyx_v_7cytimes_5utils_US_DAY, (void *)&__pyx_v_7cytimes_5utils_US_HOUR, (void *)&__pyx_v_7cytimes_5utils_US_MILLISECOND, (void *)&__pyx_v_7cytimes_5utils_US_MINUTE, (void *)&__pyx_v_7cytimes_5utils_US_SECOND, (void *)&__pyx_v_7cytimes_5utils_EPOCH_DT, (void *)&__pyx_v_7cytimes_5utils_UTC, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_AS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_DD, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_FS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_HH, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_MI, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_MM, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_MS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_NS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_PS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_SS, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_US, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_WW, (void *)&__pyx_v_7cytimes_5utils_DT64_DTYPE_YY, (void *)&__pyx_v_7cytimes_5utils_NAT, (void *)&__pyx_v_7cytimes_5utils_T_TIMEZONE, (void *)&__pyx_v_7cytimes_5utils_T_ZONEINFO, (void *)&__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE, (void *)&__pyx_v_7cytimes_5utils__UTC_ALIASES, (void *)&__pyx_v_7cytimes_5utils_TD64_MM_DAY, (void *)&__pyx_v_7cytimes_5utils_TD64_YY_DAY, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_AS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_FS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_PS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_US, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW, (void *)&__pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY, (void *)&__pyx_v_7cytimes_5utils_NULL_TZOFFSET, (void *)&__pyx_v_7cytimes_5utils_ORDINAL_MAX, (void *)&__pyx_v_7cytimes_5utils_DAYS_BR_MONTH, (void *)&__pyx_v_7cytimes_5utils_DAYS_IN_MONTH, (void *)&__pyx_v_7cytimes_5utils_DAYS_BR_QUARTER, (void *)&__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER, (void *) NULL};
    void *const *__pyx_export_pointer = __pyx_export_pointers;
    const char *__pyx_export_current_signature = __pyx_export_signature;
    while (*__pyx_export_pointer) {
      if (__Pyx_ExportVoidPtr(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_export_pointer;
      __pyx_export_name = strchr(__pyx_export_name, '\0') + 1;
      __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1;
      if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_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_export_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_export_code", 0);
  /*--- Function export code ---*/
  {
    __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_PyObject_PyObject_tz_parse);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_export_name = __pyx_export_signature + 23;
    void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_7cytimes_5utils_tz_parse, (void (*)(void)) NULL};
    void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers;
    const char *__pyx_export_current_signature = __pyx_export_signature;
    while (*__pyx_export_pointer) {
      if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_export_pointer;
      __pyx_export_name = strchr(__pyx_export_name, '\0') + 1;
      __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1;
      if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_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_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

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(6, 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(6, 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(7, 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(7, 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(8, 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(8, 16, __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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 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(1, 907, __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(3, 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(3, 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(3, 56, __pyx_L1_error)
  __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(3, 82, __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(3, 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(3, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_utils(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_utils},
  #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,
      "utils",
      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_utils(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_utils(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_utils(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;
  static int __pyx_t_6[13];
  static int __pyx_t_7[13];
  static int __pyx_t_8[5];
  static int __pyx_t_9[5];
  struct __pyx_opt_args_7cpython_8datetime_datetime_new __pyx_t_10;
  PY_LONG_LONG __pyx_t_11;
  size_t __pyx_t_12;
  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_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'utils' 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 "utils" 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_utils", 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__utils) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __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.utils")) {
      if (unlikely((PyDict_SetItemString(modules, "cytimes.utils", __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);
  if (unlikely((__Pyx_modinit_variable_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_init_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "cytimes/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;

  /* "cytimes/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/utils.py":12
 * 
 * 
 * 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, 12, __pyx_L1_error)

  /* "cytimes/utils.py":13
 * 
 * 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, 13, __pyx_L1_error)

  /* "cytimes/utils.py":14
 * np.import_array()
 * np.import_umath()
 * datetime.import_datetime()             # <<<<<<<<<<<<<<
 * 
 * # Python imports
*/
  __pyx_f_7cpython_8datetime_import_datetime();

  /* "cytimes/utils.py":17
 * 
 * # Python imports
 * import numpy as np             # <<<<<<<<<<<<<<
 * import pandas as pd
 * import datetime, zoneinfo
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __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, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":18
 * # Python imports
 * import numpy as np
 * import pandas as pd             # <<<<<<<<<<<<<<
 * import datetime, zoneinfo
 * from functools import lru_cache as _lru_cache
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __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_pd, __pyx_t_2) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":19
 * import numpy as np
 * import pandas as pd
 * import datetime, zoneinfo             # <<<<<<<<<<<<<<
 * from functools import lru_cache as _lru_cache
 * from cytimes import errors
*/
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_datetime, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zoneinfo, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_zoneinfo, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":20
 * import pandas as pd
 * import datetime, zoneinfo
 * from functools import lru_cache as _lru_cache             # <<<<<<<<<<<<<<
 * from cytimes import errors
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_lru_cache};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_functools, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __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_lru_cache};
    __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, 20, __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_lru_cache_2, __pyx_t_5) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
        break;
        default:;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":21
 * import datetime, zoneinfo
 * from functools import lru_cache as _lru_cache
 * from cytimes import errors             # <<<<<<<<<<<<<<
 * 
 * # Constants --------------------------------------------------------------------------------------------
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cytimes, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __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_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, 21, __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, 21, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":25
 * # Constants --------------------------------------------------------------------------------------------
 * # . argument
 * SENTINEL: int = -1             # <<<<<<<<<<<<<<
 * # . pandas
 * NAT: object = pd.NaT
*/
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SENTINEL, __pyx_mstate_global->__pyx_int_neg_1) < (0)) __PYX_ERR(0, 25, __pyx_L1_error)

  /* "cytimes/utils.py":27
 * SENTINEL: int = -1
 * # . pandas
 * NAT: object = pd.NaT             # <<<<<<<<<<<<<<
 * # . calendar
 * # fmt: off
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NaT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_NAT);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_NAT, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":30
 * # . calendar
 * # fmt: off
 * DAYS_BR_MONTH: cython.int[13] = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]             # <<<<<<<<<<<<<<
 * DAYS_IN_MONTH: cython.int[13] = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
 * DAYS_BR_QUARTER: cython.int[5] = [0, 90, 181, 273, 365]
*/
  __pyx_t_6[0] = 0;
  __pyx_t_6[1] = 31;
  __pyx_t_6[2] = 59;
  __pyx_t_6[3] = 90;
  __pyx_t_6[4] = 0x78;
  __pyx_t_6[5] = 0x97;
  __pyx_t_6[6] = 0xB5;
  __pyx_t_6[7] = 0xD4;
  __pyx_t_6[8] = 0xF3;
  __pyx_t_6[9] = 0x111;
  __pyx_t_6[10] = 0x130;
  __pyx_t_6[11] = 0x14E;
  __pyx_t_6[12] = 0x16D;
  memcpy(&(__pyx_v_7cytimes_5utils_DAYS_BR_MONTH[0]), __pyx_t_6, sizeof(__pyx_v_7cytimes_5utils_DAYS_BR_MONTH[0]) * (13));

  /* "cytimes/utils.py":31
 * # fmt: off
 * DAYS_BR_MONTH: cython.int[13] = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]
 * DAYS_IN_MONTH: cython.int[13] = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]             # <<<<<<<<<<<<<<
 * DAYS_BR_QUARTER: cython.int[5] = [0, 90, 181, 273, 365]
 * DAYS_IN_QUARTER: cython.int[5] = [0, 90, 91, 92, 92]
*/
  __pyx_t_7[0] = 0;
  __pyx_t_7[1] = 31;
  __pyx_t_7[2] = 28;
  __pyx_t_7[3] = 31;
  __pyx_t_7[4] = 30;
  __pyx_t_7[5] = 31;
  __pyx_t_7[6] = 30;
  __pyx_t_7[7] = 31;
  __pyx_t_7[8] = 31;
  __pyx_t_7[9] = 30;
  __pyx_t_7[10] = 31;
  __pyx_t_7[11] = 30;
  __pyx_t_7[12] = 31;
  memcpy(&(__pyx_v_7cytimes_5utils_DAYS_IN_MONTH[0]), __pyx_t_7, sizeof(__pyx_v_7cytimes_5utils_DAYS_IN_MONTH[0]) * (13));

  /* "cytimes/utils.py":32
 * DAYS_BR_MONTH: cython.int[13] = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]
 * DAYS_IN_MONTH: cython.int[13] = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
 * DAYS_BR_QUARTER: cython.int[5] = [0, 90, 181, 273, 365]             # <<<<<<<<<<<<<<
 * DAYS_IN_QUARTER: cython.int[5] = [0, 90, 91, 92, 92]
 * # fmt: on
*/
  __pyx_t_8[0] = 0;
  __pyx_t_8[1] = 90;
  __pyx_t_8[2] = 0xB5;
  __pyx_t_8[3] = 0x111;
  __pyx_t_8[4] = 0x16D;
  memcpy(&(__pyx_v_7cytimes_5utils_DAYS_BR_QUARTER[0]), __pyx_t_8, sizeof(__pyx_v_7cytimes_5utils_DAYS_BR_QUARTER[0]) * (5));

  /* "cytimes/utils.py":33
 * DAYS_IN_MONTH: cython.int[13] = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
 * DAYS_BR_QUARTER: cython.int[5] = [0, 90, 181, 273, 365]
 * DAYS_IN_QUARTER: cython.int[5] = [0, 90, 91, 92, 92]             # <<<<<<<<<<<<<<
 * # fmt: on
 * # . date
*/
  __pyx_t_9[0] = 0;
  __pyx_t_9[1] = 90;
  __pyx_t_9[2] = 91;
  __pyx_t_9[3] = 92;
  __pyx_t_9[4] = 92;
  memcpy(&(__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[0]), __pyx_t_9, sizeof(__pyx_v_7cytimes_5utils_DAYS_IN_QUARTER[0]) * (5));

  /* "cytimes/utils.py":36
 * # fmt: on
 * # . date
 * ORDINAL_MAX: cython.int = 3_652_059             # <<<<<<<<<<<<<<
 * # . datetime
 * #: EPOCH (1970-01-01)
*/
  __pyx_v_7cytimes_5utils_ORDINAL_MAX = 0x37B9DB;

  /* "cytimes/utils.py":40
 * #: EPOCH (1970-01-01)
 * EPOCH_DT: datetime.datetime = datetime.datetime_new(
 *     1970, 1, 1, 0, 0, 0, 0, datetime.get_utc(), 0             # <<<<<<<<<<<<<<
 * )
 * EPOCH_YEAR: cython.longlong = 1970
*/
  __pyx_t_5 = __pyx_f_7cpython_8datetime_get_utc(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cytimes/utils.py":39
 * # . datetime
 * #: EPOCH (1970-01-01)
 * EPOCH_DT: datetime.datetime = datetime.datetime_new(             # <<<<<<<<<<<<<<
 *     1970, 1, 1, 0, 0, 0, 0, datetime.get_utc(), 0
 * )
*/
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.fold = 0;
  __pyx_t_2 = ((PyObject *)__pyx_f_7cpython_8datetime_datetime_new(0x7B2, 1, 1, 0, 0, 0, 0, __pyx_t_5, &__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_XGOTREF((PyObject *)__pyx_v_7cytimes_5utils_EPOCH_DT);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_EPOCH_DT, ((PyDateTime_DateTime *)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":42
 *     1970, 1, 1, 0, 0, 0, 0, datetime.get_utc(), 0
 * )
 * EPOCH_YEAR: cython.longlong = 1970             # <<<<<<<<<<<<<<
 * EPOCH_MONTH: cython.longlong = 23_628
 * EPOCH_DAY: cython.longlong = 719_163
*/
  __pyx_v_7cytimes_5utils_EPOCH_YEAR = 0x7B2;

  /* "cytimes/utils.py":43
 * )
 * EPOCH_YEAR: cython.longlong = 1970
 * EPOCH_MONTH: cython.longlong = 23_628             # <<<<<<<<<<<<<<
 * EPOCH_DAY: cython.longlong = 719_163
 * EPOCH_HOUR: cython.longlong = EPOCH_DAY * 24
*/
  __pyx_v_7cytimes_5utils_EPOCH_MONTH = 0x5C4C;

  /* "cytimes/utils.py":44
 * EPOCH_YEAR: cython.longlong = 1970
 * EPOCH_MONTH: cython.longlong = 23_628
 * EPOCH_DAY: cython.longlong = 719_163             # <<<<<<<<<<<<<<
 * EPOCH_HOUR: cython.longlong = EPOCH_DAY * 24
 * EPOCH_MINUTE: cython.longlong = EPOCH_HOUR * 60
*/
  __pyx_v_7cytimes_5utils_EPOCH_DAY = 0xAF93B;

  /* "cytimes/utils.py":45
 * EPOCH_MONTH: cython.longlong = 23_628
 * EPOCH_DAY: cython.longlong = 719_163
 * EPOCH_HOUR: cython.longlong = EPOCH_DAY * 24             # <<<<<<<<<<<<<<
 * EPOCH_MINUTE: cython.longlong = EPOCH_HOUR * 60
 * EPOCH_SECOND: cython.longlong = EPOCH_MINUTE * 60
*/
  __pyx_v_7cytimes_5utils_EPOCH_HOUR = (__pyx_v_7cytimes_5utils_EPOCH_DAY * 24);

  /* "cytimes/utils.py":46
 * EPOCH_DAY: cython.longlong = 719_163
 * EPOCH_HOUR: cython.longlong = EPOCH_DAY * 24
 * EPOCH_MINUTE: cython.longlong = EPOCH_HOUR * 60             # <<<<<<<<<<<<<<
 * EPOCH_SECOND: cython.longlong = EPOCH_MINUTE * 60
 * EPOCH_MILLISECOND: cython.longlong = EPOCH_SECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_EPOCH_MINUTE = (__pyx_v_7cytimes_5utils_EPOCH_HOUR * 60);

  /* "cytimes/utils.py":47
 * EPOCH_HOUR: cython.longlong = EPOCH_DAY * 24
 * EPOCH_MINUTE: cython.longlong = EPOCH_HOUR * 60
 * EPOCH_SECOND: cython.longlong = EPOCH_MINUTE * 60             # <<<<<<<<<<<<<<
 * EPOCH_MILLISECOND: cython.longlong = EPOCH_SECOND * 1_000
 * EPOCH_MICROSECOND: cython.longlong = EPOCH_MILLISECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_EPOCH_SECOND = (__pyx_v_7cytimes_5utils_EPOCH_MINUTE * 60);

  /* "cytimes/utils.py":48
 * EPOCH_MINUTE: cython.longlong = EPOCH_HOUR * 60
 * EPOCH_SECOND: cython.longlong = EPOCH_MINUTE * 60
 * EPOCH_MILLISECOND: cython.longlong = EPOCH_SECOND * 1_000             # <<<<<<<<<<<<<<
 * EPOCH_MICROSECOND: cython.longlong = EPOCH_MILLISECOND * 1_000
 * #: EPOCH pre-compute
*/
  __pyx_v_7cytimes_5utils_EPOCH_MILLISECOND = (__pyx_v_7cytimes_5utils_EPOCH_SECOND * 0x3E8);

  /* "cytimes/utils.py":49
 * EPOCH_SECOND: cython.longlong = EPOCH_MINUTE * 60
 * EPOCH_MILLISECOND: cython.longlong = EPOCH_SECOND * 1_000
 * EPOCH_MICROSECOND: cython.longlong = EPOCH_MILLISECOND * 1_000             # <<<<<<<<<<<<<<
 * #: EPOCH pre-compute
 * EPOCH_C4: cython.longlong = math_div_floor(1970, 4)  # type: ignore
*/
  __pyx_v_7cytimes_5utils_EPOCH_MICROSECOND = (__pyx_v_7cytimes_5utils_EPOCH_MILLISECOND * 0x3E8);

  /* "cytimes/utils.py":51
 * EPOCH_MICROSECOND: cython.longlong = EPOCH_MILLISECOND * 1_000
 * #: EPOCH pre-compute
 * EPOCH_C4: cython.longlong = math_div_floor(1970, 4)  # type: ignore             # <<<<<<<<<<<<<<
 * EPOCH_C100: cython.longlong = math_div_floor(1970, 100)  # type: ignore
 * EPOCH_C400: cython.longlong = math_div_floor(1970, 400)  # type: ignore
*/
  __pyx_t_11 = __pyx_f_7cytimes_5utils_math_div_floor(0x7B2, 4, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L1_error)
  __pyx_v_7cytimes_5utils_EPOCH_C4 = __pyx_t_11;

  /* "cytimes/utils.py":52
 * #: EPOCH pre-compute
 * EPOCH_C4: cython.longlong = math_div_floor(1970, 4)  # type: ignore
 * EPOCH_C100: cython.longlong = math_div_floor(1970, 100)  # type: ignore             # <<<<<<<<<<<<<<
 * EPOCH_C400: cython.longlong = math_div_floor(1970, 400)  # type: ignore
 * EPOCH_CBASE: cython.longlong = EPOCH_C4 - EPOCH_C100 + EPOCH_C400
*/
  __pyx_t_11 = __pyx_f_7cytimes_5utils_math_div_floor(0x7B2, 0x64, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 52, __pyx_L1_error)
  __pyx_v_7cytimes_5utils_EPOCH_C100 = __pyx_t_11;

  /* "cytimes/utils.py":53
 * EPOCH_C4: cython.longlong = math_div_floor(1970, 4)  # type: ignore
 * EPOCH_C100: cython.longlong = math_div_floor(1970, 100)  # type: ignore
 * EPOCH_C400: cython.longlong = math_div_floor(1970, 400)  # type: ignore             # <<<<<<<<<<<<<<
 * EPOCH_CBASE: cython.longlong = EPOCH_C4 - EPOCH_C100 + EPOCH_C400
 * # . timezone
*/
  __pyx_t_11 = __pyx_f_7cytimes_5utils_math_div_floor(0x7B2, 0x190, NULL); if (unlikely(__pyx_t_11 == ((PY_LONG_LONG)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 53, __pyx_L1_error)
  __pyx_v_7cytimes_5utils_EPOCH_C400 = __pyx_t_11;

  /* "cytimes/utils.py":54
 * EPOCH_C100: cython.longlong = math_div_floor(1970, 100)  # type: ignore
 * EPOCH_C400: cython.longlong = math_div_floor(1970, 400)  # type: ignore
 * EPOCH_CBASE: cython.longlong = EPOCH_C4 - EPOCH_C100 + EPOCH_C400             # <<<<<<<<<<<<<<
 * # . timezone
 * UTC: datetime.tzinfo = datetime.get_utc()
*/
  __pyx_v_7cytimes_5utils_EPOCH_CBASE = ((__pyx_v_7cytimes_5utils_EPOCH_C4 - __pyx_v_7cytimes_5utils_EPOCH_C100) + __pyx_v_7cytimes_5utils_EPOCH_C400);

  /* "cytimes/utils.py":56
 * EPOCH_CBASE: cython.longlong = EPOCH_C4 - EPOCH_C100 + EPOCH_C400
 * # . timezone
 * UTC: datetime.tzinfo = datetime.get_utc()             # <<<<<<<<<<<<<<
 * T_TIMEZONE: object = datetime.timezone
 * T_ZONEINFO: object = zoneinfo.ZoneInfo
*/
  __pyx_t_2 = __pyx_f_7cpython_8datetime_get_utc(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __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_tzinfo))))) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_XGOTREF((PyObject *)__pyx_v_7cytimes_5utils_UTC);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_UTC, ((PyDateTime_TZInfo *)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":57
 * # . timezone
 * UTC: datetime.tzinfo = datetime.get_utc()
 * T_TIMEZONE: object = datetime.timezone             # <<<<<<<<<<<<<<
 * T_ZONEINFO: object = zoneinfo.ZoneInfo
 * NULL_TZOFFSET: cython.int = -100_000  # Sentinel for null offset
*/
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_timezone); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_T_TIMEZONE);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_T_TIMEZONE, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":58
 * UTC: datetime.tzinfo = datetime.get_utc()
 * T_TIMEZONE: object = datetime.timezone
 * T_ZONEINFO: object = zoneinfo.ZoneInfo             # <<<<<<<<<<<<<<
 * NULL_TZOFFSET: cython.int = -100_000  # Sentinel for null offset
 * # . conversion for seconds
*/
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_zoneinfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ZoneInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_T_ZONEINFO);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_T_ZONEINFO, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":59
 * T_TIMEZONE: object = datetime.timezone
 * T_ZONEINFO: object = zoneinfo.ZoneInfo
 * NULL_TZOFFSET: cython.int = -100_000  # Sentinel for null offset             # <<<<<<<<<<<<<<
 * # . conversion for seconds
 * SS_MINUTE: cython.longlong = 60
*/
  __pyx_v_7cytimes_5utils_NULL_TZOFFSET = -100000;

  /* "cytimes/utils.py":61
 * NULL_TZOFFSET: cython.int = -100_000  # Sentinel for null offset
 * # . conversion for seconds
 * SS_MINUTE: cython.longlong = 60             # <<<<<<<<<<<<<<
 * SS_HOUR: cython.longlong = SS_MINUTE * 60
 * SS_DAY: cython.longlong = SS_HOUR * 24
*/
  __pyx_v_7cytimes_5utils_SS_MINUTE = 60;

  /* "cytimes/utils.py":62
 * # . conversion for seconds
 * SS_MINUTE: cython.longlong = 60
 * SS_HOUR: cython.longlong = SS_MINUTE * 60             # <<<<<<<<<<<<<<
 * SS_DAY: cython.longlong = SS_HOUR * 24
 * # . conversion for milliseconds
*/
  __pyx_v_7cytimes_5utils_SS_HOUR = (__pyx_v_7cytimes_5utils_SS_MINUTE * 60);

  /* "cytimes/utils.py":63
 * SS_MINUTE: cython.longlong = 60
 * SS_HOUR: cython.longlong = SS_MINUTE * 60
 * SS_DAY: cython.longlong = SS_HOUR * 24             # <<<<<<<<<<<<<<
 * # . conversion for milliseconds
 * MS_SECOND: cython.longlong = 1_000
*/
  __pyx_v_7cytimes_5utils_SS_DAY = (__pyx_v_7cytimes_5utils_SS_HOUR * 24);

  /* "cytimes/utils.py":65
 * SS_DAY: cython.longlong = SS_HOUR * 24
 * # . conversion for milliseconds
 * MS_SECOND: cython.longlong = 1_000             # <<<<<<<<<<<<<<
 * MS_MINUTE: cython.longlong = MS_SECOND * 60
 * MS_HOUR: cython.longlong = MS_MINUTE * 60
*/
  __pyx_v_7cytimes_5utils_MS_SECOND = 0x3E8;

  /* "cytimes/utils.py":66
 * # . conversion for milliseconds
 * MS_SECOND: cython.longlong = 1_000
 * MS_MINUTE: cython.longlong = MS_SECOND * 60             # <<<<<<<<<<<<<<
 * MS_HOUR: cython.longlong = MS_MINUTE * 60
 * MS_DAY: cython.longlong = MS_HOUR * 24
*/
  __pyx_v_7cytimes_5utils_MS_MINUTE = (__pyx_v_7cytimes_5utils_MS_SECOND * 60);

  /* "cytimes/utils.py":67
 * MS_SECOND: cython.longlong = 1_000
 * MS_MINUTE: cython.longlong = MS_SECOND * 60
 * MS_HOUR: cython.longlong = MS_MINUTE * 60             # <<<<<<<<<<<<<<
 * MS_DAY: cython.longlong = MS_HOUR * 24
 * # . conversion for microseconds
*/
  __pyx_v_7cytimes_5utils_MS_HOUR = (__pyx_v_7cytimes_5utils_MS_MINUTE * 60);

  /* "cytimes/utils.py":68
 * MS_MINUTE: cython.longlong = MS_SECOND * 60
 * MS_HOUR: cython.longlong = MS_MINUTE * 60
 * MS_DAY: cython.longlong = MS_HOUR * 24             # <<<<<<<<<<<<<<
 * # . conversion for microseconds
 * US_MILLISECOND: cython.longlong = 1_000
*/
  __pyx_v_7cytimes_5utils_MS_DAY = (__pyx_v_7cytimes_5utils_MS_HOUR * 24);

  /* "cytimes/utils.py":70
 * MS_DAY: cython.longlong = MS_HOUR * 24
 * # . conversion for microseconds
 * US_MILLISECOND: cython.longlong = 1_000             # <<<<<<<<<<<<<<
 * US_SECOND: cython.longlong = US_MILLISECOND * 1_000
 * US_MINUTE: cython.longlong = US_SECOND * 60
*/
  __pyx_v_7cytimes_5utils_US_MILLISECOND = 0x3E8;

  /* "cytimes/utils.py":71
 * # . conversion for microseconds
 * US_MILLISECOND: cython.longlong = 1_000
 * US_SECOND: cython.longlong = US_MILLISECOND * 1_000             # <<<<<<<<<<<<<<
 * US_MINUTE: cython.longlong = US_SECOND * 60
 * US_HOUR: cython.longlong = US_MINUTE * 60
*/
  __pyx_v_7cytimes_5utils_US_SECOND = (__pyx_v_7cytimes_5utils_US_MILLISECOND * 0x3E8);

  /* "cytimes/utils.py":72
 * US_MILLISECOND: cython.longlong = 1_000
 * US_SECOND: cython.longlong = US_MILLISECOND * 1_000
 * US_MINUTE: cython.longlong = US_SECOND * 60             # <<<<<<<<<<<<<<
 * US_HOUR: cython.longlong = US_MINUTE * 60
 * US_DAY: cython.longlong = US_HOUR * 24
*/
  __pyx_v_7cytimes_5utils_US_MINUTE = (__pyx_v_7cytimes_5utils_US_SECOND * 60);

  /* "cytimes/utils.py":73
 * US_SECOND: cython.longlong = US_MILLISECOND * 1_000
 * US_MINUTE: cython.longlong = US_SECOND * 60
 * US_HOUR: cython.longlong = US_MINUTE * 60             # <<<<<<<<<<<<<<
 * US_DAY: cython.longlong = US_HOUR * 24
 * # . conversion for nanoseconds
*/
  __pyx_v_7cytimes_5utils_US_HOUR = (__pyx_v_7cytimes_5utils_US_MINUTE * 60);

  /* "cytimes/utils.py":74
 * US_MINUTE: cython.longlong = US_SECOND * 60
 * US_HOUR: cython.longlong = US_MINUTE * 60
 * US_DAY: cython.longlong = US_HOUR * 24             # <<<<<<<<<<<<<<
 * # . conversion for nanoseconds
 * NS_MICROSECOND: cython.longlong = 1_000
*/
  __pyx_v_7cytimes_5utils_US_DAY = (__pyx_v_7cytimes_5utils_US_HOUR * 24);

  /* "cytimes/utils.py":76
 * US_DAY: cython.longlong = US_HOUR * 24
 * # . conversion for nanoseconds
 * NS_MICROSECOND: cython.longlong = 1_000             # <<<<<<<<<<<<<<
 * NS_MILLISECOND: cython.longlong = NS_MICROSECOND * 1_000
 * NS_SECOND: cython.longlong = NS_MILLISECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_NS_MICROSECOND = 0x3E8;

  /* "cytimes/utils.py":77
 * # . conversion for nanoseconds
 * NS_MICROSECOND: cython.longlong = 1_000
 * NS_MILLISECOND: cython.longlong = NS_MICROSECOND * 1_000             # <<<<<<<<<<<<<<
 * NS_SECOND: cython.longlong = NS_MILLISECOND * 1_000
 * NS_MINUTE: cython.longlong = NS_SECOND * 60
*/
  __pyx_v_7cytimes_5utils_NS_MILLISECOND = (__pyx_v_7cytimes_5utils_NS_MICROSECOND * 0x3E8);

  /* "cytimes/utils.py":78
 * NS_MICROSECOND: cython.longlong = 1_000
 * NS_MILLISECOND: cython.longlong = NS_MICROSECOND * 1_000
 * NS_SECOND: cython.longlong = NS_MILLISECOND * 1_000             # <<<<<<<<<<<<<<
 * NS_MINUTE: cython.longlong = NS_SECOND * 60
 * NS_HOUR: cython.longlong = NS_MINUTE * 60
*/
  __pyx_v_7cytimes_5utils_NS_SECOND = (__pyx_v_7cytimes_5utils_NS_MILLISECOND * 0x3E8);

  /* "cytimes/utils.py":79
 * NS_MILLISECOND: cython.longlong = NS_MICROSECOND * 1_000
 * NS_SECOND: cython.longlong = NS_MILLISECOND * 1_000
 * NS_MINUTE: cython.longlong = NS_SECOND * 60             # <<<<<<<<<<<<<<
 * NS_HOUR: cython.longlong = NS_MINUTE * 60
 * NS_DAY: cython.longlong = NS_HOUR * 24
*/
  __pyx_v_7cytimes_5utils_NS_MINUTE = (__pyx_v_7cytimes_5utils_NS_SECOND * 60);

  /* "cytimes/utils.py":80
 * NS_SECOND: cython.longlong = NS_MILLISECOND * 1_000
 * NS_MINUTE: cython.longlong = NS_SECOND * 60
 * NS_HOUR: cython.longlong = NS_MINUTE * 60             # <<<<<<<<<<<<<<
 * NS_DAY: cython.longlong = NS_HOUR * 24
 * # . conversion for timedelta64
*/
  __pyx_v_7cytimes_5utils_NS_HOUR = (__pyx_v_7cytimes_5utils_NS_MINUTE * 60);

  /* "cytimes/utils.py":81
 * NS_MINUTE: cython.longlong = NS_SECOND * 60
 * NS_HOUR: cython.longlong = NS_MINUTE * 60
 * NS_DAY: cython.longlong = NS_HOUR * 24             # <<<<<<<<<<<<<<
 * # . conversion for timedelta64
 * TD64_YY_DAY: cython.double = 365.2425  # Exact days in a year for td64
*/
  __pyx_v_7cytimes_5utils_NS_DAY = (__pyx_v_7cytimes_5utils_NS_HOUR * 24);

  /* "cytimes/utils.py":83
 * NS_DAY: cython.longlong = NS_HOUR * 24
 * # . conversion for timedelta64
 * TD64_YY_DAY: cython.double = 365.2425  # Exact days in a year for td64             # <<<<<<<<<<<<<<
 * TD64_YY_SECOND: cython.longlong = int(TD64_YY_DAY * SS_DAY)
 * TD64_YY_MILLISECOND: cython.longlong = TD64_YY_SECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_YY_DAY = 365.2425;

  /* "cytimes/utils.py":84
 * # . conversion for timedelta64
 * TD64_YY_DAY: cython.double = 365.2425  # Exact days in a year for td64
 * TD64_YY_SECOND: cython.longlong = int(TD64_YY_DAY * SS_DAY)             # <<<<<<<<<<<<<<
 * TD64_YY_MILLISECOND: cython.longlong = TD64_YY_SECOND * 1_000
 * TD64_YY_MICROSECOND: cython.longlong = TD64_YY_MILLISECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_YY_SECOND = ((PY_LONG_LONG)(__pyx_v_7cytimes_5utils_TD64_YY_DAY * __pyx_v_7cytimes_5utils_SS_DAY));

  /* "cytimes/utils.py":85
 * TD64_YY_DAY: cython.double = 365.2425  # Exact days in a year for td64
 * TD64_YY_SECOND: cython.longlong = int(TD64_YY_DAY * SS_DAY)
 * TD64_YY_MILLISECOND: cython.longlong = TD64_YY_SECOND * 1_000             # <<<<<<<<<<<<<<
 * TD64_YY_MICROSECOND: cython.longlong = TD64_YY_MILLISECOND * 1_000
 * TD64_YY_NANOSECOND: cython.longlong = TD64_YY_MICROSECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND = (__pyx_v_7cytimes_5utils_TD64_YY_SECOND * 0x3E8);

  /* "cytimes/utils.py":86
 * TD64_YY_SECOND: cython.longlong = int(TD64_YY_DAY * SS_DAY)
 * TD64_YY_MILLISECOND: cython.longlong = TD64_YY_SECOND * 1_000
 * TD64_YY_MICROSECOND: cython.longlong = TD64_YY_MILLISECOND * 1_000             # <<<<<<<<<<<<<<
 * TD64_YY_NANOSECOND: cython.longlong = TD64_YY_MICROSECOND * 1_000
 * TD64_MM_DAY: cython.double = 30.436875  # Exact days in a month for td64
*/
  __pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND = (__pyx_v_7cytimes_5utils_TD64_YY_MILLISECOND * 0x3E8);

  /* "cytimes/utils.py":87
 * TD64_YY_MILLISECOND: cython.longlong = TD64_YY_SECOND * 1_000
 * TD64_YY_MICROSECOND: cython.longlong = TD64_YY_MILLISECOND * 1_000
 * TD64_YY_NANOSECOND: cython.longlong = TD64_YY_MICROSECOND * 1_000             # <<<<<<<<<<<<<<
 * TD64_MM_DAY: cython.double = 30.436875  # Exact days in a month for td64
 * TD64_MM_SECOND: cython.longlong = int(TD64_MM_DAY * SS_DAY)
*/
  __pyx_v_7cytimes_5utils_TD64_YY_NANOSECOND = (__pyx_v_7cytimes_5utils_TD64_YY_MICROSECOND * 0x3E8);

  /* "cytimes/utils.py":88
 * TD64_YY_MICROSECOND: cython.longlong = TD64_YY_MILLISECOND * 1_000
 * TD64_YY_NANOSECOND: cython.longlong = TD64_YY_MICROSECOND * 1_000
 * TD64_MM_DAY: cython.double = 30.436875  # Exact days in a month for td64             # <<<<<<<<<<<<<<
 * TD64_MM_SECOND: cython.longlong = int(TD64_MM_DAY * SS_DAY)
 * TD64_MM_MILLISECOND: cython.longlong = TD64_MM_SECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_MM_DAY = 30.436875;

  /* "cytimes/utils.py":89
 * TD64_YY_NANOSECOND: cython.longlong = TD64_YY_MICROSECOND * 1_000
 * TD64_MM_DAY: cython.double = 30.436875  # Exact days in a month for td64
 * TD64_MM_SECOND: cython.longlong = int(TD64_MM_DAY * SS_DAY)             # <<<<<<<<<<<<<<
 * TD64_MM_MILLISECOND: cython.longlong = TD64_MM_SECOND * 1_000
 * TD64_MM_MICROSECOND: cython.longlong = TD64_MM_MILLISECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_MM_SECOND = ((PY_LONG_LONG)(__pyx_v_7cytimes_5utils_TD64_MM_DAY * __pyx_v_7cytimes_5utils_SS_DAY));

  /* "cytimes/utils.py":90
 * TD64_MM_DAY: cython.double = 30.436875  # Exact days in a month for td64
 * TD64_MM_SECOND: cython.longlong = int(TD64_MM_DAY * SS_DAY)
 * TD64_MM_MILLISECOND: cython.longlong = TD64_MM_SECOND * 1_000             # <<<<<<<<<<<<<<
 * TD64_MM_MICROSECOND: cython.longlong = TD64_MM_MILLISECOND * 1_000
 * TD64_MM_NANOSECOND: cython.longlong = TD64_MM_MICROSECOND * 1_000
*/
  __pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND = (__pyx_v_7cytimes_5utils_TD64_MM_SECOND * 0x3E8);

  /* "cytimes/utils.py":91
 * TD64_MM_SECOND: cython.longlong = int(TD64_MM_DAY * SS_DAY)
 * TD64_MM_MILLISECOND: cython.longlong = TD64_MM_SECOND * 1_000
 * TD64_MM_MICROSECOND: cython.longlong = TD64_MM_MILLISECOND * 1_000             # <<<<<<<<<<<<<<
 * TD64_MM_NANOSECOND: cython.longlong = TD64_MM_MICROSECOND * 1_000
 * # . datetime64 range
*/
  __pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND = (__pyx_v_7cytimes_5utils_TD64_MM_MILLISECOND * 0x3E8);

  /* "cytimes/utils.py":92
 * TD64_MM_MILLISECOND: cython.longlong = TD64_MM_SECOND * 1_000
 * TD64_MM_MICROSECOND: cython.longlong = TD64_MM_MILLISECOND * 1_000
 * TD64_MM_NANOSECOND: cython.longlong = TD64_MM_MICROSECOND * 1_000             # <<<<<<<<<<<<<<
 * # . datetime64 range
 * #: Minimum datetime64 in nanoseconds (1677-09-21 00:12:43.145224193)
*/
  __pyx_v_7cytimes_5utils_TD64_MM_NANOSECOND = (__pyx_v_7cytimes_5utils_TD64_MM_MICROSECOND * 0x3E8);

  /* "cytimes/utils.py":95
 * # . datetime64 range
 * #: Minimum datetime64 in nanoseconds (1677-09-21 00:12:43.145224193)
 * DT64_NS_YY_MIN: cython.longlong = -293  # >= 1678             # <<<<<<<<<<<<<<
 * DT64_NS_MM_MIN: cython.longlong = -3_508  # >= 1677-10
 * DT64_NS_WW_MIN: cython.longlong = -15_251  # >= 1677-09-30
*/
  __pyx_v_7cytimes_5utils_DT64_NS_YY_MIN = -293LL;

  /* "cytimes/utils.py":96
 * #: Minimum datetime64 in nanoseconds (1677-09-21 00:12:43.145224193)
 * DT64_NS_YY_MIN: cython.longlong = -293  # >= 1678
 * DT64_NS_MM_MIN: cython.longlong = -3_508  # >= 1677-10             # <<<<<<<<<<<<<<
 * DT64_NS_WW_MIN: cython.longlong = -15_251  # >= 1677-09-30
 * DT64_NS_DD_MIN: cython.longlong = -106_751  # >= 1677-09-22
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MM_MIN = -3508LL;

  /* "cytimes/utils.py":97
 * DT64_NS_YY_MIN: cython.longlong = -293  # >= 1678
 * DT64_NS_MM_MIN: cython.longlong = -3_508  # >= 1677-10
 * DT64_NS_WW_MIN: cython.longlong = -15_251  # >= 1677-09-30             # <<<<<<<<<<<<<<
 * DT64_NS_DD_MIN: cython.longlong = -106_751  # >= 1677-09-22
 * DT64_NS_HH_MIN: cython.longlong = DT64_NS_DD_MIN * 24
*/
  __pyx_v_7cytimes_5utils_DT64_NS_WW_MIN = -15251LL;

  /* "cytimes/utils.py":98
 * DT64_NS_MM_MIN: cython.longlong = -3_508  # >= 1677-10
 * DT64_NS_WW_MIN: cython.longlong = -15_251  # >= 1677-09-30
 * DT64_NS_DD_MIN: cython.longlong = -106_751  # >= 1677-09-22             # <<<<<<<<<<<<<<
 * DT64_NS_HH_MIN: cython.longlong = DT64_NS_DD_MIN * 24
 * DT64_NS_MI_MIN: cython.longlong = DT64_NS_HH_MIN * 60
*/
  __pyx_v_7cytimes_5utils_DT64_NS_DD_MIN = -106751LL;

  /* "cytimes/utils.py":99
 * DT64_NS_WW_MIN: cython.longlong = -15_251  # >= 1677-09-30
 * DT64_NS_DD_MIN: cython.longlong = -106_751  # >= 1677-09-22
 * DT64_NS_HH_MIN: cython.longlong = DT64_NS_DD_MIN * 24             # <<<<<<<<<<<<<<
 * DT64_NS_MI_MIN: cython.longlong = DT64_NS_HH_MIN * 60
 * DT64_NS_SS_MIN: cython.longlong = DT64_NS_MI_MIN * 60
*/
  __pyx_v_7cytimes_5utils_DT64_NS_HH_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_DD_MIN * 24);

  /* "cytimes/utils.py":100
 * DT64_NS_DD_MIN: cython.longlong = -106_751  # >= 1677-09-22
 * DT64_NS_HH_MIN: cython.longlong = DT64_NS_DD_MIN * 24
 * DT64_NS_MI_MIN: cython.longlong = DT64_NS_HH_MIN * 60             # <<<<<<<<<<<<<<
 * DT64_NS_SS_MIN: cython.longlong = DT64_NS_MI_MIN * 60
 * DT64_NS_MS_MIN: cython.longlong = DT64_NS_SS_MIN * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MI_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_HH_MIN * 60);

  /* "cytimes/utils.py":101
 * DT64_NS_HH_MIN: cython.longlong = DT64_NS_DD_MIN * 24
 * DT64_NS_MI_MIN: cython.longlong = DT64_NS_HH_MIN * 60
 * DT64_NS_SS_MIN: cython.longlong = DT64_NS_MI_MIN * 60             # <<<<<<<<<<<<<<
 * DT64_NS_MS_MIN: cython.longlong = DT64_NS_SS_MIN * 1_000
 * DT64_NS_US_MIN: cython.longlong = DT64_NS_MS_MIN * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_SS_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_MI_MIN * 60);

  /* "cytimes/utils.py":102
 * DT64_NS_MI_MIN: cython.longlong = DT64_NS_HH_MIN * 60
 * DT64_NS_SS_MIN: cython.longlong = DT64_NS_MI_MIN * 60
 * DT64_NS_MS_MIN: cython.longlong = DT64_NS_SS_MIN * 1_000             # <<<<<<<<<<<<<<
 * DT64_NS_US_MIN: cython.longlong = DT64_NS_MS_MIN * 1_000
 * DT64_NS_NS_MIN: cython.longlong = DT64_NS_US_MIN * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MS_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_SS_MIN * 0x3E8);

  /* "cytimes/utils.py":103
 * DT64_NS_SS_MIN: cython.longlong = DT64_NS_MI_MIN * 60
 * DT64_NS_MS_MIN: cython.longlong = DT64_NS_SS_MIN * 1_000
 * DT64_NS_US_MIN: cython.longlong = DT64_NS_MS_MIN * 1_000             # <<<<<<<<<<<<<<
 * DT64_NS_NS_MIN: cython.longlong = DT64_NS_US_MIN * 1_000
 * #: Maximum datetime64 in nanoseconds (2262-04-11 23:47:16.854775807)
*/
  __pyx_v_7cytimes_5utils_DT64_NS_US_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_MS_MIN * 0x3E8);

  /* "cytimes/utils.py":104
 * DT64_NS_MS_MIN: cython.longlong = DT64_NS_SS_MIN * 1_000
 * DT64_NS_US_MIN: cython.longlong = DT64_NS_MS_MIN * 1_000
 * DT64_NS_NS_MIN: cython.longlong = DT64_NS_US_MIN * 1_000             # <<<<<<<<<<<<<<
 * #: Maximum datetime64 in nanoseconds (2262-04-11 23:47:16.854775807)
 * DT64_NS_YY_MAX: cython.longlong = 292  # <= 2262
*/
  __pyx_v_7cytimes_5utils_DT64_NS_NS_MIN = (__pyx_v_7cytimes_5utils_DT64_NS_US_MIN * 0x3E8);

  /* "cytimes/utils.py":106
 * DT64_NS_NS_MIN: cython.longlong = DT64_NS_US_MIN * 1_000
 * #: Maximum datetime64 in nanoseconds (2262-04-11 23:47:16.854775807)
 * DT64_NS_YY_MAX: cython.longlong = 292  # <= 2262             # <<<<<<<<<<<<<<
 * DT64_NS_MM_MAX: cython.longlong = 3_507  # <= 2262-03
 * DT64_NS_WW_MAX: cython.longlong = 15_250  # <= 2262-04-03
*/
  __pyx_v_7cytimes_5utils_DT64_NS_YY_MAX = 0x124;

  /* "cytimes/utils.py":107
 * #: Maximum datetime64 in nanoseconds (2262-04-11 23:47:16.854775807)
 * DT64_NS_YY_MAX: cython.longlong = 292  # <= 2262
 * DT64_NS_MM_MAX: cython.longlong = 3_507  # <= 2262-03             # <<<<<<<<<<<<<<
 * DT64_NS_WW_MAX: cython.longlong = 15_250  # <= 2262-04-03
 * DT64_NS_DD_MAX: cython.longlong = 106_750  # <= 2262-04-10
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MM_MAX = 0xDB3;

  /* "cytimes/utils.py":108
 * DT64_NS_YY_MAX: cython.longlong = 292  # <= 2262
 * DT64_NS_MM_MAX: cython.longlong = 3_507  # <= 2262-03
 * DT64_NS_WW_MAX: cython.longlong = 15_250  # <= 2262-04-03             # <<<<<<<<<<<<<<
 * DT64_NS_DD_MAX: cython.longlong = 106_750  # <= 2262-04-10
 * DT64_NS_HH_MAX: cython.longlong = DT64_NS_DD_MAX * 24
*/
  __pyx_v_7cytimes_5utils_DT64_NS_WW_MAX = 0x3B92;

  /* "cytimes/utils.py":109
 * DT64_NS_MM_MAX: cython.longlong = 3_507  # <= 2262-03
 * DT64_NS_WW_MAX: cython.longlong = 15_250  # <= 2262-04-03
 * DT64_NS_DD_MAX: cython.longlong = 106_750  # <= 2262-04-10             # <<<<<<<<<<<<<<
 * DT64_NS_HH_MAX: cython.longlong = DT64_NS_DD_MAX * 24
 * DT64_NS_MI_MAX: cython.longlong = DT64_NS_HH_MAX * 60
*/
  __pyx_v_7cytimes_5utils_DT64_NS_DD_MAX = 0x1A0FE;

  /* "cytimes/utils.py":110
 * DT64_NS_WW_MAX: cython.longlong = 15_250  # <= 2262-04-03
 * DT64_NS_DD_MAX: cython.longlong = 106_750  # <= 2262-04-10
 * DT64_NS_HH_MAX: cython.longlong = DT64_NS_DD_MAX * 24             # <<<<<<<<<<<<<<
 * DT64_NS_MI_MAX: cython.longlong = DT64_NS_HH_MAX * 60
 * DT64_NS_SS_MAX: cython.longlong = DT64_NS_MI_MAX * 60
*/
  __pyx_v_7cytimes_5utils_DT64_NS_HH_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_DD_MAX * 24);

  /* "cytimes/utils.py":111
 * DT64_NS_DD_MAX: cython.longlong = 106_750  # <= 2262-04-10
 * DT64_NS_HH_MAX: cython.longlong = DT64_NS_DD_MAX * 24
 * DT64_NS_MI_MAX: cython.longlong = DT64_NS_HH_MAX * 60             # <<<<<<<<<<<<<<
 * DT64_NS_SS_MAX: cython.longlong = DT64_NS_MI_MAX * 60
 * DT64_NS_MS_MAX: cython.longlong = DT64_NS_SS_MAX * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MI_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_HH_MAX * 60);

  /* "cytimes/utils.py":112
 * DT64_NS_HH_MAX: cython.longlong = DT64_NS_DD_MAX * 24
 * DT64_NS_MI_MAX: cython.longlong = DT64_NS_HH_MAX * 60
 * DT64_NS_SS_MAX: cython.longlong = DT64_NS_MI_MAX * 60             # <<<<<<<<<<<<<<
 * DT64_NS_MS_MAX: cython.longlong = DT64_NS_SS_MAX * 1_000
 * DT64_NS_US_MAX: cython.longlong = DT64_NS_MS_MAX * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_SS_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_MI_MAX * 60);

  /* "cytimes/utils.py":113
 * DT64_NS_MI_MAX: cython.longlong = DT64_NS_HH_MAX * 60
 * DT64_NS_SS_MAX: cython.longlong = DT64_NS_MI_MAX * 60
 * DT64_NS_MS_MAX: cython.longlong = DT64_NS_SS_MAX * 1_000             # <<<<<<<<<<<<<<
 * DT64_NS_US_MAX: cython.longlong = DT64_NS_MS_MAX * 1_000
 * DT64_NS_NS_MAX: cython.longlong = DT64_NS_US_MAX * 1_000
*/
  __pyx_v_7cytimes_5utils_DT64_NS_MS_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_SS_MAX * 0x3E8);

  /* "cytimes/utils.py":114
 * DT64_NS_SS_MAX: cython.longlong = DT64_NS_MI_MAX * 60
 * DT64_NS_MS_MAX: cython.longlong = DT64_NS_SS_MAX * 1_000
 * DT64_NS_US_MAX: cython.longlong = DT64_NS_MS_MAX * 1_000             # <<<<<<<<<<<<<<
 * DT64_NS_NS_MAX: cython.longlong = DT64_NS_US_MAX * 1_000
 * # . datetime64 dtype
*/
  __pyx_v_7cytimes_5utils_DT64_NS_US_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_MS_MAX * 0x3E8);

  /* "cytimes/utils.py":115
 * DT64_NS_MS_MAX: cython.longlong = DT64_NS_SS_MAX * 1_000
 * DT64_NS_US_MAX: cython.longlong = DT64_NS_MS_MAX * 1_000
 * DT64_NS_NS_MAX: cython.longlong = DT64_NS_US_MAX * 1_000             # <<<<<<<<<<<<<<
 * # . datetime64 dtype
 * DT64_DTYPE_YY: np.dtype = np.dtype("datetime64[Y]")
*/
  __pyx_v_7cytimes_5utils_DT64_NS_NS_MAX = (__pyx_v_7cytimes_5utils_DT64_NS_US_MAX * 0x3E8);

  /* "cytimes/utils.py":117
 * DT64_NS_NS_MAX: cython.longlong = DT64_NS_US_MAX * 1_000
 * # . datetime64 dtype
 * DT64_DTYPE_YY: np.dtype = np.dtype("datetime64[Y]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_MM: np.dtype = np.dtype("datetime64[M]")
 * DT64_DTYPE_WW: np.dtype = np.dtype("datetime64[W]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_Y};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_YY, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":118
 * # . datetime64 dtype
 * DT64_DTYPE_YY: np.dtype = np.dtype("datetime64[Y]")
 * DT64_DTYPE_MM: np.dtype = np.dtype("datetime64[M]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_WW: np.dtype = np.dtype("datetime64[W]")
 * DT64_DTYPE_DD: np.dtype = np.dtype("datetime64[D]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_M};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_MM, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":119
 * DT64_DTYPE_YY: np.dtype = np.dtype("datetime64[Y]")
 * DT64_DTYPE_MM: np.dtype = np.dtype("datetime64[M]")
 * DT64_DTYPE_WW: np.dtype = np.dtype("datetime64[W]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_DD: np.dtype = np.dtype("datetime64[D]")
 * DT64_DTYPE_HH: np.dtype = np.dtype("datetime64[h]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_W};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_WW, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":120
 * DT64_DTYPE_MM: np.dtype = np.dtype("datetime64[M]")
 * DT64_DTYPE_WW: np.dtype = np.dtype("datetime64[W]")
 * DT64_DTYPE_DD: np.dtype = np.dtype("datetime64[D]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_HH: np.dtype = np.dtype("datetime64[h]")
 * DT64_DTYPE_MI: np.dtype = np.dtype("datetime64[m]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_D};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_DD, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":121
 * DT64_DTYPE_WW: np.dtype = np.dtype("datetime64[W]")
 * DT64_DTYPE_DD: np.dtype = np.dtype("datetime64[D]")
 * DT64_DTYPE_HH: np.dtype = np.dtype("datetime64[h]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_MI: np.dtype = np.dtype("datetime64[m]")
 * DT64_DTYPE_SS: np.dtype = np.dtype("datetime64[s]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_h};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_HH, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":122
 * DT64_DTYPE_DD: np.dtype = np.dtype("datetime64[D]")
 * DT64_DTYPE_HH: np.dtype = np.dtype("datetime64[h]")
 * DT64_DTYPE_MI: np.dtype = np.dtype("datetime64[m]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_SS: np.dtype = np.dtype("datetime64[s]")
 * DT64_DTYPE_MS: np.dtype = np.dtype("datetime64[ms]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_m};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_MI, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":123
 * DT64_DTYPE_HH: np.dtype = np.dtype("datetime64[h]")
 * DT64_DTYPE_MI: np.dtype = np.dtype("datetime64[m]")
 * DT64_DTYPE_SS: np.dtype = np.dtype("datetime64[s]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_MS: np.dtype = np.dtype("datetime64[ms]")
 * DT64_DTYPE_US: np.dtype = np.dtype("datetime64[us]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_s_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_SS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":124
 * DT64_DTYPE_MI: np.dtype = np.dtype("datetime64[m]")
 * DT64_DTYPE_SS: np.dtype = np.dtype("datetime64[s]")
 * DT64_DTYPE_MS: np.dtype = np.dtype("datetime64[ms]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_US: np.dtype = np.dtype("datetime64[us]")
 * DT64_DTYPE_NS: np.dtype = np.dtype("datetime64[ns]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_ms};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_MS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":125
 * DT64_DTYPE_SS: np.dtype = np.dtype("datetime64[s]")
 * DT64_DTYPE_MS: np.dtype = np.dtype("datetime64[ms]")
 * DT64_DTYPE_US: np.dtype = np.dtype("datetime64[us]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_NS: np.dtype = np.dtype("datetime64[ns]")
 * DT64_DTYPE_PS: np.dtype = np.dtype("datetime64[ps]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_us};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_US);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_US, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":126
 * DT64_DTYPE_MS: np.dtype = np.dtype("datetime64[ms]")
 * DT64_DTYPE_US: np.dtype = np.dtype("datetime64[us]")
 * DT64_DTYPE_NS: np.dtype = np.dtype("datetime64[ns]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_PS: np.dtype = np.dtype("datetime64[ps]")
 * DT64_DTYPE_FS: np.dtype = np.dtype("datetime64[fs]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_ns};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_NS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":127
 * DT64_DTYPE_US: np.dtype = np.dtype("datetime64[us]")
 * DT64_DTYPE_NS: np.dtype = np.dtype("datetime64[ns]")
 * DT64_DTYPE_PS: np.dtype = np.dtype("datetime64[ps]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_FS: np.dtype = np.dtype("datetime64[fs]")
 * DT64_DTYPE_AS: np.dtype = np.dtype("datetime64[as]")
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_ps};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_PS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":128
 * DT64_DTYPE_NS: np.dtype = np.dtype("datetime64[ns]")
 * DT64_DTYPE_PS: np.dtype = np.dtype("datetime64[ps]")
 * DT64_DTYPE_FS: np.dtype = np.dtype("datetime64[fs]")             # <<<<<<<<<<<<<<
 * DT64_DTYPE_AS: np.dtype = np.dtype("datetime64[as]")
 * # . numpy datetime units
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_fs};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 128, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_FS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":129
 * DT64_DTYPE_PS: np.dtype = np.dtype("datetime64[ps]")
 * DT64_DTYPE_FS: np.dtype = np.dtype("datetime64[fs]")
 * DT64_DTYPE_AS: np.dtype = np.dtype("datetime64[as]")             # <<<<<<<<<<<<<<
 * # . numpy datetime units
 * DT_NPY_UNIT_YY: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_Y
*/
  __pyx_t_5 = NULL;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_as};
    __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_5numpy_dtype, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_2);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils_DT64_DTYPE_AS, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cytimes/utils.py":131
 * DT64_DTYPE_AS: np.dtype = np.dtype("datetime64[as]")
 * # . numpy datetime units
 * DT_NPY_UNIT_YY: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_Y             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_MM: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_M
 * DT_NPY_UNIT_WW: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_W
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_YY = NPY_FR_Y;

  /* "cytimes/utils.py":132
 * # . numpy datetime units
 * DT_NPY_UNIT_YY: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_Y
 * DT_NPY_UNIT_MM: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_M             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_WW: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_W
 * DT_NPY_UNIT_DD: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_D
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MM = NPY_FR_M;

  /* "cytimes/utils.py":133
 * DT_NPY_UNIT_YY: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_Y
 * DT_NPY_UNIT_MM: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_M
 * DT_NPY_UNIT_WW: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_W             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_DD: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_D
 * DT_NPY_UNIT_HH: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_h
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_WW = NPY_FR_W;

  /* "cytimes/utils.py":134
 * DT_NPY_UNIT_MM: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_M
 * DT_NPY_UNIT_WW: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_W
 * DT_NPY_UNIT_DD: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_D             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_HH: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_h
 * DT_NPY_UNIT_MI: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_m
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_DD = NPY_FR_D;

  /* "cytimes/utils.py":135
 * DT_NPY_UNIT_WW: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_W
 * DT_NPY_UNIT_DD: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_D
 * DT_NPY_UNIT_HH: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_h             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_MI: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_m
 * DT_NPY_UNIT_SS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_s
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_HH = NPY_FR_h;

  /* "cytimes/utils.py":136
 * DT_NPY_UNIT_DD: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_D
 * DT_NPY_UNIT_HH: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_h
 * DT_NPY_UNIT_MI: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_m             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_SS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_s
 * DT_NPY_UNIT_MS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ms
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MI = NPY_FR_m;

  /* "cytimes/utils.py":137
 * DT_NPY_UNIT_HH: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_h
 * DT_NPY_UNIT_MI: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_m
 * DT_NPY_UNIT_SS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_s             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_MS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ms
 * DT_NPY_UNIT_US: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_us
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_SS = NPY_FR_s;

  /* "cytimes/utils.py":138
 * DT_NPY_UNIT_MI: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_m
 * DT_NPY_UNIT_SS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_s
 * DT_NPY_UNIT_MS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ms             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_US: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_us
 * DT_NPY_UNIT_NS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ns
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_MS = NPY_FR_ms;

  /* "cytimes/utils.py":139
 * DT_NPY_UNIT_SS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_s
 * DT_NPY_UNIT_MS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ms
 * DT_NPY_UNIT_US: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_us             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_NS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ns
 * DT_NPY_UNIT_PS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ps
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_US = NPY_FR_us;

  /* "cytimes/utils.py":140
 * DT_NPY_UNIT_MS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ms
 * DT_NPY_UNIT_US: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_us
 * DT_NPY_UNIT_NS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ns             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_PS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ps
 * DT_NPY_UNIT_FS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_fs
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_NS = NPY_FR_ns;

  /* "cytimes/utils.py":141
 * DT_NPY_UNIT_US: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_us
 * DT_NPY_UNIT_NS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ns
 * DT_NPY_UNIT_PS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ps             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_FS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_fs
 * DT_NPY_UNIT_AS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_as
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_PS = NPY_FR_ps;

  /* "cytimes/utils.py":142
 * DT_NPY_UNIT_NS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ns
 * DT_NPY_UNIT_PS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ps
 * DT_NPY_UNIT_FS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_fs             # <<<<<<<<<<<<<<
 * DT_NPY_UNIT_AS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_as
 * 
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_FS = NPY_FR_fs;

  /* "cytimes/utils.py":143
 * DT_NPY_UNIT_PS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_ps
 * DT_NPY_UNIT_FS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_fs
 * DT_NPY_UNIT_AS: cython.int = np.NPY_DATETIMEUNIT.NPY_FR_as             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_v_7cytimes_5utils_DT_NPY_UNIT_AS = NPY_FR_as;

  /* "cytimes/utils.py":147
 * 
 * # datetime.tzinfo --------------------------------------------------------------------------------------
 * def _get_local_timezone() -> object:             # <<<<<<<<<<<<<<
 *     """(internal) Get the process-local timezone `<'datetime.tzinfo'>`.
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __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_object) < (0)) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_5_get_local_timezone, 0, __pyx_mstate_global->__pyx_n_u_get_local_timezone, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_local_timezone, __pyx_t_5) < (0)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":171
 * 
 * 
 * _LOCAL_TIMEZONE: object = _get_local_timezone()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_t_2 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_get_local_timezone); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils__LOCAL_TIMEZONE, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":174
 * 
 * 
 * @_lru_cache(maxsize=128)             # <<<<<<<<<<<<<<
 * def _get_zoneinfo(name: str) -> zoneinfo.ZoneInfo | datetime.timezone:
 *     """(internal) Get `zoneinfo.ZoneInfo` object by name with caching."""
*/
  __pyx_t_13 = NULL;
  __pyx_t_14 = NULL;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_lru_cache_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, NULL};
    __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maxsize, __pyx_mstate_global->__pyx_int_128, __pyx_t_16, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 174, __pyx_L1_error)
    __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_15 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 174, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_zoneinfo_ZoneInfo_datetime_timez) < (0)) __PYX_ERR(0, 174, __pyx_L1_error)
  __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_7_get_zoneinfo, 0, __pyx_mstate_global->__pyx_n_u_get_zoneinfo, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_16);
  #endif
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_16, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_12 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_16};
    __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
  }
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_zoneinfo, __pyx_t_5) < (0)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":189
 * 
 * _UTC_ALIASES: set = {
 *     "z",             # <<<<<<<<<<<<<<
 *     "utc",
 *     "gmt",
*/
  __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_z) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_utc) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_gmt) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_gmt0) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_gmt_0) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_gmt_0_2) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_zulu) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_universal) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_greenwich) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_utc) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_gmt) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_gmt0) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_gmt_0) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_gmt_0_2) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_zulu) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  if (PySet_Add(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_etc_universal) < (0)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_XGOTREF(__pyx_v_7cytimes_5utils__UTC_ALIASES);
  __Pyx_DECREF_SET(__pyx_v_7cytimes_5utils__UTC_ALIASES, ((PyObject*)__pyx_t_5));
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cytimes/utils.py":276
 * ########## The REST utility functions are in the utils.pxd file ##########
 * ########## The following functions are for testing purpose only ##########
 * def _test_utils() -> None:             # <<<<<<<<<<<<<<
 *     # Parser
 *     _test_parser()
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __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_None) < (0)) __PYX_ERR(0, 276, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_9_test_utils, 0, __pyx_mstate_global->__pyx_n_u_test_utils, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_utils, __pyx_t_2) < (0)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":345
 * 
 * # Parser
 * def _test_parser() -> None:             # <<<<<<<<<<<<<<
 *     # boolean
 *     for i in range(128):
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __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_None) < (0)) __PYX_ERR(0, 345, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_11_test_parser, 0, __pyx_mstate_global->__pyx_n_u_test_parser, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_parser, __pyx_t_5) < (0)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":552
 * 
 * # Time
 * def _test_localtime_n_gmtime() -> None:             # <<<<<<<<<<<<<<
 *     import time, numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __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_None) < (0)) __PYX_ERR(0, 552, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_13_test_localtime_n_gmtime, 0, __pyx_mstate_global->__pyx_n_u_test_localtime_n_gmtime, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_localtime_n_gmtime, __pyx_t_2) < (0)) __PYX_ERR(0, 552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":600
 * 
 * # Calendar
 * def _test_is_leap_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _is_leap  # type: ignore
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __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_None) < (0)) __PYX_ERR(0, 600, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_15_test_is_leap_year, 0, __pyx_mstate_global->__pyx_n_u_test_is_leap_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_is_leap_year, __pyx_t_5) < (0)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":616
 * 
 * 
 * def _test_days_bf_year() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_year  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 616, __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_None) < (0)) __PYX_ERR(0, 616, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_17_test_days_bf_year, 0, __pyx_mstate_global->__pyx_n_u_test_days_bf_year, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_days_bf_year, __pyx_t_2) < (0)) __PYX_ERR(0, 616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":629
 * 
 * 
 * def _test_doy() -> None:             # <<<<<<<<<<<<<<
 * 
 *     for y in range(-10000, 10001):
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __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_None) < (0)) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_19_test_doy, 0, __pyx_mstate_global->__pyx_n_u_test_doy, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_doy, __pyx_t_5) < (0)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":645
 * 
 * 
 * def _test_quarter_of_month() -> None:             # <<<<<<<<<<<<<<
 *     count: cython.int = 0
 *     value: cython.int = 1
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 645, __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_None) < (0)) __PYX_ERR(0, 645, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_21_test_quarter_of_month, 0, __pyx_mstate_global->__pyx_n_u_test_quarter_of_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_quarter_of_month, __pyx_t_2) < (0)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":659
 * 
 * 
 * def _test_days_in_quarter() -> None:             # <<<<<<<<<<<<<<
 *     # non-leap
 *     year: cython.int = 2021
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __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_None) < (0)) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_23_test_days_in_quarter, 0, __pyx_mstate_global->__pyx_n_u_test_days_in_quarter, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_days_in_quarter, __pyx_t_5) < (0)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":680
 * 
 * 
 * def _test_days_in_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_in_month  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __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_None) < (0)) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_25_test_days_in_month, 0, __pyx_mstate_global->__pyx_n_u_test_days_in_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); 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
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_days_in_month, __pyx_t_2) < (0)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":694
 * 
 * 
 * def _test_days_bf_month() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _days_before_month  # type: ignore
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __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_None) < (0)) __PYX_ERR(0, 694, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_27_test_days_bf_month, 0, __pyx_mstate_global->__pyx_n_u_test_days_bf_month, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_days_bf_month, __pyx_t_5) < (0)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":708
 * 
 * 
 * def _test_weekday() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __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_None) < (0)) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_29_test_weekday, 0, __pyx_mstate_global->__pyx_n_u_test_weekday, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_weekday, __pyx_t_2) < (0)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":727
 * 
 * 
 * def _test_isocalendar() -> None:             # <<<<<<<<<<<<<<
 *     from datetime import date
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __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_None) < (0)) __PYX_ERR(0, 727, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_31_test_isocalendar, 0, __pyx_mstate_global->__pyx_n_u_test_isocalendar, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_isocalendar, __pyx_t_5) < (0)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":768
 * 
 * 
 * def _test_iso_week1_mon_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek1monday  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __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_None) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_33_test_iso_week1_mon_ord, 0, __pyx_mstate_global->__pyx_n_u_test_iso_week1_mon_ord, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_iso_week1_mon_ord, __pyx_t_2) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":780
 * 
 * 
 * def _test_ymd_to_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ymd2ord  # type: ignore
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __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_None) < (0)) __PYX_ERR(0, 780, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_35_test_ymd_to_ord, 0, __pyx_mstate_global->__pyx_n_u_test_ymd_to_ord, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 780, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ymd_to_ord, __pyx_t_5) < (0)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":799
 * 
 * 
 * def _test_ymd_fr_ord() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _ord2ymd, _MAXORDINAL  # type: ignore
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __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_None) < (0)) __PYX_ERR(0, 799, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_37_test_ymd_fr_ord, 0, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_ord, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_ord, __pyx_t_2) < (0)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":814
 * 
 * 
 * def _test_ymd_fr_iso() -> None:             # <<<<<<<<<<<<<<
 *     from _pydatetime import _isoweek_to_gregorian  # type: ignore
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __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_None) < (0)) __PYX_ERR(0, 814, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_39_test_ymd_fr_iso, 0, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_iso, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ymd_fr_iso, __pyx_t_5) < (0)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":840
 * 
 * # datetime.date
 * def _test_date_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __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_None) < (0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_41_test_date_generate, 0, __pyx_mstate_global->__pyx_n_u_test_date_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_date_generate, __pyx_t_2) < (0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":867
 * 
 * 
 * def _test_date_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __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_None) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_43_test_date_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_date_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 867, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_date_type_check, __pyx_t_5) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":886
 * 
 * 
 * def _test_date_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Date
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 886, __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_None) < (0)) __PYX_ERR(0, 886, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_45_test_date_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_date_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_date_conversion, __pyx_t_2) < (0)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":946
 * 
 * # datetime.datetime
 * def _test_dt_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __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_None) < (0)) __PYX_ERR(0, 946, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_47_test_dt_generate, 0, __pyx_mstate_global->__pyx_n_u_test_dt_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 946, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_generate, __pyx_t_5) < (0)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":992
 * 
 * 
 * def _test_dt_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 992, __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_None) < (0)) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_49_test_dt_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_dt_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1011
 * 
 * 
 * def _test_dt_tzinfo() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __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_None) < (0)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_51_test_dt_tzinfo, 0, __pyx_mstate_global->__pyx_n_u_test_dt_tzinfo, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1011, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_tzinfo, __pyx_t_5) < (0)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1029
 * 
 * 
 * def _test_dt_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pandas import Timestamp
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __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_None) < (0)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_53_test_dt_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_dt_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_conversion, __pyx_t_2) < (0)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1149
 * 
 * 
 * def _test_dt_mainipulate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); 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_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_55_test_dt_mainipulate, 0, __pyx_mstate_global->__pyx_n_u_test_dt_mainipulate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); 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_SetAnnotationsDict(__pyx_t_5, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_mainipulate, __pyx_t_5) < (0)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1167
 * 
 * 
 * def _test_dt_arithmetic() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1167, __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_None) < (0)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_57_test_dt_arithmetic, 0, __pyx_mstate_global->__pyx_n_u_test_dt_arithmetic, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_arithmetic, __pyx_t_2) < (0)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1200
 * 
 * 
 * def _test_dt_normalize_tz() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, pendulum
 *     from zoneinfo import ZoneInfo
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __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_None) < (0)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_59_test_dt_normalize_tz, 0, __pyx_mstate_global->__pyx_n_u_test_dt_normalize_tz, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_dt_normalize_tz, __pyx_t_5) < (0)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1297
 * 
 * # datetime.time
 * def _test_time_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __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_None) < (0)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_61_test_time_generate, 0, __pyx_mstate_global->__pyx_n_u_test_time_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_time_generate, __pyx_t_2) < (0)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1339
 * 
 * 
 * def _test_time_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __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_None) < (0)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_63_test_time_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_time_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_time_type_check, __pyx_t_5) < (0)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1358
 * 
 * 
 * def _test_time_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 *     from pendulum import Time
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1358, __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_None) < (0)) __PYX_ERR(0, 1358, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_65_test_time_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_time_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_time_conversion, __pyx_t_2) < (0)) __PYX_ERR(0, 1358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1410
 * 
 * # datetime.timedelta
 * def _test_timedelta_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1410, __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_None) < (0)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_67_test_timedelta_generate, 0, __pyx_mstate_global->__pyx_n_u_test_timedelta_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_timedelta_generate, __pyx_t_5) < (0)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1437
 * 
 * 
 * def _test_timedelta_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1437, __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_None) < (0)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_69_test_timedelta_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_timedelta_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_timedelta_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1456
 * 
 * 
 * def _test_timedelta_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __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_None) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_71_test_timedelta_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_timedelta_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1456, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_timedelta_conversion, __pyx_t_5) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1512
 * 
 * # datetime.tzinfo
 * def _test_tzinfo_generate() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, time
 *     from babel.dates import LOCALTZ
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __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_None) < (0)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_73_test_tzinfo_generate, 0, __pyx_mstate_global->__pyx_n_u_test_tzinfo_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_tzinfo_generate, __pyx_t_2) < (0)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1531
 * 
 * 
 * def _test_tzinfo_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __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_None) < (0)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_75_test_tzinfo_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_tzinfo_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_tzinfo_type_check, __pyx_t_5) < (0)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1543
 * 
 * 
 * def _test_tzinfo_access() -> None:             # <<<<<<<<<<<<<<
 *     import datetime
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __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_None) < (0)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_77_test_tzinfo_access, 0, __pyx_mstate_global->__pyx_n_u_test_tzinfo_access, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1543, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_tzinfo_access, __pyx_t_2) < (0)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1580
 * 
 * # . numpy.share
 * def _test_numpy_share() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __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_None) < (0)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_79_test_numpy_share, 0, __pyx_mstate_global->__pyx_n_u_test_numpy_share, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1580, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_numpy_share, __pyx_t_5) < (0)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1604
 * 
 * # . numpy.datetime64
 * def _test_datetime64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1604, __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_None) < (0)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_81_test_datetime64_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_datetime64_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_datetime64_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1625
 * 
 * 
 * def _test_datetime64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __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_None) < (0)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_83_test_datetime64_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_datetime64_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1625, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_datetime64_conversion, __pyx_t_5) < (0)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1642
 * 
 * # . numpy.timedelta64
 * def _test_timedelta64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1642, __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_None) < (0)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_85_test_timedelta64_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_timedelta64_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1642, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_timedelta64_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1663
 * 
 * 
 * def _test_timedelta64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import datetime, numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __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_None) < (0)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_87_test_timedelta64_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_timedelta64_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1663, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_timedelta64_conversion, __pyx_t_5) < (0)) __PYX_ERR(0, 1663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1680
 * 
 * # . numpy.ndarray
 * def _test_ndarray_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1680, __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_None) < (0)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_89_test_ndarray_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1680, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1693
 * 
 * # . numpy.ndarray - generate
 * def _test_ndarray_generate() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __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_None) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_91_test_ndarray_generate, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_generate, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_generate, __pyx_t_5) < (0)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1710
 * 
 * # . numpy.ndarray[datetime64]
 * def _test_ndarray_dt64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __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_None) < (0)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_93_test_ndarray_dt64_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1723
 * 
 * 
 * def _test_ndarray_dt64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __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_None) < (0)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_95_test_ndarray_dt64_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1723, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_dt64_conversion, __pyx_t_5) < (0)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1760
 * 
 * # . numpy.ndarray[timedelta64]
 * def _test_ndarray_td64_type_check() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1760, __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_None) < (0)) __PYX_ERR(0, 1760, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_97_test_ndarray_td64_type_check, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_type_check, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_type_check, __pyx_t_2) < (0)) __PYX_ERR(0, 1760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":1773
 * 
 * 
 * def _test_ndarray_td64_conversion() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1773, __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_None) < (0)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_99_test_ndarray_td64_conversion, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_conversion, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_td64_conversion, __pyx_t_5) < (0)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1790
 * 
 * # . math
 * def _test_math() -> None:             # <<<<<<<<<<<<<<
 *     import math
 *     from decimal import (
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __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_None) < (0)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_101_test_math, 0, __pyx_mstate_global->__pyx_n_u_test_math, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_math, __pyx_t_2) < (0)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":2014
 * 
 * 
 * def _test_ndarray_math() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 *     from decimal import (
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2014, __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_None) < (0)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_103_test_ndarray_math, 0, __pyx_mstate_global->__pyx_n_u_test_ndarray_math, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2014, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_ndarray_math, __pyx_t_5) < (0)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":2273
 * 
 * 
 * def _test_sec_to_us() -> None:             # <<<<<<<<<<<<<<
 * 
 *     pairs = [
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2273, __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_None) < (0)) __PYX_ERR(0, 2273, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_105_test_sec_to_us, 0, __pyx_mstate_global->__pyx_n_u_test_sec_to_us, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_sec_to_us, __pyx_t_2) < (0)) __PYX_ERR(0, 2273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":2347
 * 
 * 
 * def _cross_test_with_ndarray() -> None:             # <<<<<<<<<<<<<<
 *     import numpy as np
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __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_None) < (0)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_107_cross_test_with_ndarray, 0, __pyx_mstate_global->__pyx_n_u_cross_test_with_ndarray, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2347, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cross_test_with_ndarray, __pyx_t_5) < (0)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":2466
 * 
 * 
 * def _test_slice_to_uint() -> None:             # <<<<<<<<<<<<<<
 *     non_digits = " +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 *     i_str = "0123456789"
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2466, __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_None) < (0)) __PYX_ERR(0, 2466, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_109_test_slice_to_uint, 0, __pyx_mstate_global->__pyx_n_u_test_slice_to_uint, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2466, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_slice_to_uint, __pyx_t_2) < (0)) __PYX_ERR(0, 2466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cytimes/utils.py":2497
 * 
 * 
 * def _test_slice_to_ufloat() -> None:             # <<<<<<<<<<<<<<
 * 
 *     assert slice_to_ufloat("1", 0, 1) == 1.0  # type: ignore
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __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_None) < (0)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7cytimes_5utils_111_test_slice_to_ufloat, 0, __pyx_mstate_global->__pyx_n_u_test_slice_to_ufloat, NULL, __pyx_mstate_global->__pyx_n_u_cytimes_utils, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2497, __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 (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_slice_to_ufloat, __pyx_t_5) < (0)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cytimes/utils.py":1
 * # cython: language_level=3             # <<<<<<<<<<<<<<
 * # cython: wraparound=False
 * # cython: boundscheck=False
*/
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init cytimes.utils", __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.utils");
  }
  __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_print = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_print); if (!__pyx_builtin_print) __PYX_ERR(0, 548, __pyx_L1_error)

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__lower.type = (PyObject*)(&PyUnicode_Type);
  __pyx_mstate->__pyx_umethod_PyUnicode_Type__lower.method_name = &__pyx_mstate->__pyx_n_u_lower;
  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/utils.py":424
 *             assert not is_str_ascii_ctl_or_space(s)  # type: ignore
 * 
 *     for k in (None, ""):             # <<<<<<<<<<<<<<
 *         assert not is_str_iso_sep(k)  # type: ignore
 *         assert not is_str_date_sep(k)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_kp_u__5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "cytimes/utils.py":522
 *     # . parse_second_and_fraction
 *     for t, ss, us in (
 *         ("1", 1, -1),             # <<<<<<<<<<<<<<
 *         ("1.", 1, -1),
 *         ("1.0", 1, 0),
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "cytimes/utils.py":523
 *     for t, ss, us in (
 *         ("1", 1, -1),
 *         ("1.", 1, -1),             # <<<<<<<<<<<<<<
 *         ("1.0", 1, 0),
 *         ("1.12", 1, 120_000),
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "cytimes/utils.py":524
 *         ("1", 1, -1),
 *         ("1.", 1, -1),
 *         ("1.0", 1, 0),             # <<<<<<<<<<<<<<
 *         ("1.12", 1, 120_000),
 *         ("1.123456", 1, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_0, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

  /* "cytimes/utils.py":525
 *         ("1.", 1, -1),
 *         ("1.0", 1, 0),
 *         ("1.12", 1, 120_000),             # <<<<<<<<<<<<<<
 *         ("1.123456", 1, 123_456),
 *         ("1.1234567", 1, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_12, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_120000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

  /* "cytimes/utils.py":526
 *         ("1.0", 1, 0),
 *         ("1.12", 1, 120_000),
 *         ("1.123456", 1, 123_456),             # <<<<<<<<<<<<<<
 *         ("1.1234567", 1, 123_456),
 *         ("0.1", 0, 100_000),
*/
  __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_123456, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]);

  /* "cytimes/utils.py":527
 *         ("1.12", 1, 120_000),
 *         ("1.123456", 1, 123_456),
 *         ("1.1234567", 1, 123_456),             # <<<<<<<<<<<<<<
 *         ("0.1", 0, 100_000),
 *         ("0.12", 0, 120_000),
*/
  __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_1234567, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]);

  /* "cytimes/utils.py":528
 *         ("1.123456", 1, 123_456),
 *         ("1.1234567", 1, 123_456),
 *         ("0.1", 0, 100_000),             # <<<<<<<<<<<<<<
 *         ("0.12", 0, 120_000),
 *         ("0.123456", 0, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_0_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_100000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]);

  /* "cytimes/utils.py":529
 *         ("1.1234567", 1, 123_456),
 *         ("0.1", 0, 100_000),
 *         ("0.12", 0, 120_000),             # <<<<<<<<<<<<<<
 *         ("0.123456", 0, 123_456),
 *         ("0.1234567", 0, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_0_12, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_120000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]);

  /* "cytimes/utils.py":530
 *         ("0.1", 0, 100_000),
 *         ("0.12", 0, 120_000),
 *         ("0.123456", 0, 123_456),             # <<<<<<<<<<<<<<
 *         ("0.1234567", 0, 123_456),
 *         (".1", 0, 100_000),
*/
  __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_0_123456, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]);

  /* "cytimes/utils.py":531
 *         ("0.12", 0, 120_000),
 *         ("0.123456", 0, 123_456),
 *         ("0.1234567", 0, 123_456),             # <<<<<<<<<<<<<<
 *         (".1", 0, 100_000),
 *         (".12", 0, 120_000),
*/
  __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_0_1234567, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]);

  /* "cytimes/utils.py":532
 *         ("0.123456", 0, 123_456),
 *         ("0.1234567", 0, 123_456),
 *         (".1", 0, 100_000),             # <<<<<<<<<<<<<<
 *         (".12", 0, 120_000),
 *         (".123456", 0, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1_3, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_100000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]);

  /* "cytimes/utils.py":533
 *         ("0.1234567", 0, 123_456),
 *         (".1", 0, 100_000),
 *         (".12", 0, 120_000),             # <<<<<<<<<<<<<<
 *         (".123456", 0, 123_456),
 *         (".1234567", 0, 123_456),
*/
  __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_12, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_120000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]);

  /* "cytimes/utils.py":534
 *         (".1", 0, 100_000),
 *         (".12", 0, 120_000),
 *         (".123456", 0, 123_456),             # <<<<<<<<<<<<<<
 *         (".1234567", 0, 123_456),
 *     ):
*/
  __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_123456, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]);

  /* "cytimes/utils.py":535
 *         (".12", 0, 120_000),
 *         (".123456", 0, 123_456),
 *         (".1234567", 0, 123_456),             # <<<<<<<<<<<<<<
 *     ):
 *         out = parse_second_and_fraction(t, 0)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_kp_u_1234567, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]);

  /* "cytimes/utils.py":522
 *     # . parse_second_and_fraction
 *     for t, ss, us in (
 *         ("1", 1, -1),             # <<<<<<<<<<<<<<
 *         ("1.", 1, -1),
 *         ("1.0", 1, 0),
*/
  __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(14, __pyx_mstate_global->__pyx_tuple[1], __pyx_mstate_global->__pyx_tuple[2], __pyx_mstate_global->__pyx_tuple[3], __pyx_mstate_global->__pyx_tuple[4], __pyx_mstate_global->__pyx_tuple[5], __pyx_mstate_global->__pyx_tuple[6], __pyx_mstate_global->__pyx_tuple[7], __pyx_mstate_global->__pyx_tuple[8], __pyx_mstate_global->__pyx_tuple[9], __pyx_mstate_global->__pyx_tuple[10], __pyx_mstate_global->__pyx_tuple[11], __pyx_mstate_global->__pyx_tuple[12], __pyx_mstate_global->__pyx_tuple[13], __pyx_mstate_global->__pyx_tuple[14]); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]);

  /* "cytimes/utils.py":847
 * 
 *     # New
 *     assert datetime.date(1, 1, 1) == date_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.date(1, 1, 1) == date_new(1)  # type: ignore
 *     assert datetime.date(1, 1, 1) == date_new(1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]);

  /* "cytimes/utils.py":890
 *     from pendulum import Date
 * 
 *     date = datetime.date(2021, 1, 2)             # <<<<<<<<<<<<<<
 *     pdate = Date(2021, 1, 2)
 *     dt = datetime.datetime(2021, 1, 2)
*/
  __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]);

  /* "cytimes/utils.py":954
 * 
 *     # New
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(7, __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); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]);

  /* "cytimes/utils.py":958
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[19] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_1, __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); if (unlikely(!__pyx_mstate_global->__pyx_tuple[19])) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[19]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[19]);

  /* "cytimes/utils.py":959
 *     assert datetime.datetime(1, 1, 1, 0, 0, 0, 0) == dt_new(1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[20] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __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); if (unlikely(!__pyx_mstate_global->__pyx_tuple[20])) __PYX_ERR(0, 959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[20]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[20]);

  /* "cytimes/utils.py":960
 *     assert datetime.datetime(1, 1, 1, 1, 0, 0, 0) == dt_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[21] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[21])) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[21]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[21]);

  /* "cytimes/utils.py":961
 *     assert datetime.datetime(1, 1, 1, 1, 1, 0, 0) == dt_new(1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 0) == dt_new(1, 1, 1, 1, 1, 1)  # type: ignore
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1) == dt_new(1, 1, 1, 1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(1, 1, 1, 1, 1, 1, 1, tz) == dt_new(1, 1, 1, 1, 1, 1, 1, tz)  # type: ignore
 *     assert type(dt_new(1, 1, 1, 1, 1, 1, 1, tz, 0)) is datetime.datetime  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[22] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[22])) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[22]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[22]);

  /* "cytimes/utils.py":1014
 *     import datetime
 * 
 *     dt = datetime.datetime(2021, 1, 2, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     tz = datetime.timezone(datetime.timedelta(hours=1, minutes=1))
 *     dt_tz1 = datetime.datetime(2021, 1, 2, 3, 4, 5, 6, tz)
*/
  __pyx_mstate_global->__pyx_tuple[23] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[23])) __PYX_ERR(0, 1014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[23]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[23]);

  /* "cytimes/utils.py":1099
 * 
 *     date = datetime.date(2021, 1, 2)
 *     time1 = datetime.time(3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     time2 = datetime.time(3, 4, 5, 6, tz1)
 *     assert dt == dt_combine(date, time1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[24] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[24])) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[24]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[24]);

  /* "cytimes/utils.py":1126
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt.toordinal())  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz2, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[25] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[25])) __PYX_ERR(0, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[25]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[25]);

  /* "cytimes/utils.py":1128
 *     assert datetime.datetime(2021, 1, 1) == dt_fr_ord(dt_to_ord(dt_tz2, True))  # type: ignore
 *     assert datetime.datetime(2021, 1, 2) == dt_fr_ord(dt_to_ord(dt_tz3, False))  # type: ignore
 *     assert datetime.datetime(2021, 1, 3) == dt_fr_ord(dt_to_ord(dt_tz3, True))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert dt == dt_fr_sec(dt_to_sec(dt))  # type: ignore
 *     assert dt_tz1 == dt_fr_sec(dt_to_sec(dt_tz1, False), tz1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[26] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_2021, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[26])) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[26]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[26]);

  /* "cytimes/utils.py":1174
 *     assert dt_add(dt, 1, 1, 1) == dt + td1  # type: ignore
 * 
 *     td2 = datetime.timedelta(1, 86400, 1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 86400, 1) == dt + td2  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[27] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_86400, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[27])) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[27]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[27]);

  /* "cytimes/utils.py":1177
 *     assert dt_add(dt, 1, 86400, 1) == dt + td2  # type: ignore
 * 
 *     td3 = datetime.timedelta(1, 86399, 1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 86399, 1) == dt + td3  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[28] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_86399, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[28])) __PYX_ERR(0, 1177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[28]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[28]);

  /* "cytimes/utils.py":1180
 *     assert dt_add(dt, 1, 86399, 1) == dt + td3  # type: ignore
 * 
 *     td4 = datetime.timedelta(-1, -1, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -1, -1) == dt + td4  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[29] = 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[29])) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[29]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[29]);

  /* "cytimes/utils.py":1183
 *     assert dt_add(dt, -1, -1, -1) == dt + td4  # type: ignore
 * 
 *     td5 = datetime.timedelta(-1, -86400, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -86400, -1) == dt + td5  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[30] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_86400, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[30])) __PYX_ERR(0, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[30]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[30]);

  /* "cytimes/utils.py":1186
 *     assert dt_add(dt, -1, -86400, -1) == dt + td5  # type: ignore
 * 
 *     td6 = datetime.timedelta(-1, -86399, -1)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -86399, -1) == dt + td6  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[31] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_86399, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[31])) __PYX_ERR(0, 1186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[31]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[31]);

  /* "cytimes/utils.py":1189
 *     assert dt_add(dt, -1, -86399, -1) == dt + td6  # type: ignore
 * 
 *     td7 = datetime.timedelta(1, 60, 100000)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, 1, 60, 100000) == dt + td7  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[32] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_60, __pyx_mstate_global->__pyx_int_100000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[32])) __PYX_ERR(0, 1189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[32]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[32]);

  /* "cytimes/utils.py":1192
 *     assert dt_add(dt, 1, 60, 100000) == dt + td7  # type: ignore
 * 
 *     td8 = datetime.timedelta(-1, -60, -100000)             # <<<<<<<<<<<<<<
 *     assert dt_add(dt, -1, -60, -100000) == dt + td8  # type: ignore
 * 
*/
  __pyx_mstate_global->__pyx_tuple[33] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_60, __pyx_mstate_global->__pyx_int_neg_100000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[33])) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[33]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[33]);

  /* "cytimes/utils.py":1206
 *     test_pairs = [
 *         # New York fall-back (1:30 happens twice)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 11, 2, 1, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[34] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2025, __pyx_mstate_global->__pyx_int_11, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[34])) __PYX_ERR(0, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[34]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[34]);

  /* "cytimes/utils.py":1213
 *         ),
 *         # Berlin fall-back (CET/CEST)
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),
 *         # New York spring-forward (2:30 never exists)
*/
  __pyx_mstate_global->__pyx_tuple[35] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2025, __pyx_mstate_global->__pyx_int_10, __pyx_mstate_global->__pyx_int_26, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[35])) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[35]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[35]);

  /* "cytimes/utils.py":1216
 *         datetime.datetime(2025, 10, 26, 2, 30, tzinfo=ZoneInfo("CET"), fold=1),
 *         # New York spring-forward (2:30 never exists)
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 3, 9, 2, 30, tzinfo=ZoneInfo("America/New_York"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[36] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2025, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_9, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[36])) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[36]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[36]);

  /* "cytimes/utils.py":1223
 *         ),
 *         # Paris spring-forward gap
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),
 *         # Lord Howe (30-minute DST change) ambiguous
*/
  __pyx_mstate_global->__pyx_tuple[37] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2025, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_30, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[37])) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[37]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[37]);

  /* "cytimes/utils.py":1226
 *         datetime.datetime(2025, 3, 30, 2, 30, tzinfo=ZoneInfo("Europe/Paris"), fold=1),
 *         # Lord Howe (30-minute DST change) ambiguous
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 4, 7, 1, 45, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[38] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2024, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_45); if (unlikely(!__pyx_mstate_global->__pyx_tuple[38])) __PYX_ERR(0, 1226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[38]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[38]);

  /* "cytimes/utils.py":1233
 *         ),
 *         # Lord Howe (30-minute DST change) non-existent
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2024, 10, 6, 2, 15, tzinfo=ZoneInfo("Australia/Lord_Howe"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[39] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_2024, __pyx_mstate_global->__pyx_int_10, __pyx_mstate_global->__pyx_int_6, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_15); if (unlikely(!__pyx_mstate_global->__pyx_tuple[39])) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[39]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[39]);

  /* "cytimes/utils.py":1240
 *         ),
 *         # Odd offsets & negative DST
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             2025, 1, 15, 12, 34, 56, tzinfo=ZoneInfo("Asia/Kathmandu"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[40] = PyTuple_Pack(6, __pyx_mstate_global->__pyx_int_2025, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_15, __pyx_mstate_global->__pyx_int_12, __pyx_mstate_global->__pyx_int_34, __pyx_mstate_global->__pyx_int_56); if (unlikely(!__pyx_mstate_global->__pyx_tuple[40])) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[40]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[40]);

  /* "cytimes/utils.py":1247
 *         ),
 *         # Dublins historical negative DST periods
 *         datetime.datetime(             # <<<<<<<<<<<<<<
 *             1971, 10, 31, 1, 30, tzinfo=ZoneInfo("Europe/Dublin"), fold=0
 *         ),
*/
  __pyx_mstate_global->__pyx_tuple[41] = PyTuple_Pack(5, __pyx_mstate_global->__pyx_int_1971, __pyx_mstate_global->__pyx_int_10, __pyx_mstate_global->__pyx_int_31, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[41])) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[41]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[41]);

  /* "cytimes/utils.py":1254
 *         ),
 *         # Samoa skipping a day (dateline move)
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
*/
  __pyx_mstate_global->__pyx_tuple[42] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_2011, __pyx_mstate_global->__pyx_int_12, __pyx_mstate_global->__pyx_int_29); if (unlikely(!__pyx_mstate_global->__pyx_tuple[42])) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[42]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[42]);

  /* "cytimes/utils.py":1256
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),
 *         datetime.datetime(2011, 12, 29, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=0),             # <<<<<<<<<<<<<<
 *         datetime.datetime(2011, 12, 30, tzinfo=ZoneInfo("Pacific/Apia"), fold=1),
 *         # Aware with tzinfo refusing utcoffset at wall time
*/
  __pyx_mstate_global->__pyx_tuple[43] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_2011, __pyx_mstate_global->__pyx_int_12, __pyx_mstate_global->__pyx_int_30); if (unlikely(!__pyx_mstate_global->__pyx_tuple[43])) __PYX_ERR(0, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[43]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[43]);

  /* "cytimes/utils.py":1304
 * 
 *     # New
 *     assert datetime.time(0, 0, 0, 0) == time_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(0, 0, 0, 0) == time_new(0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[44] = PyTuple_Pack(4, __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[44])) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[44]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[44]);

  /* "cytimes/utils.py":1309
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0)  # type: ignore
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[45] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_1, __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[45])) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[45]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[45]);

  /* "cytimes/utils.py":1310
 *     assert datetime.time(0, 0, 0, 0) == time_new(0, 0, 0, 0)  # type: ignore
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[46] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[46])) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[46]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[46]);

  /* "cytimes/utils.py":1311
 *     assert datetime.time(1, 0, 0, 0) == time_new(1)  # type: ignore
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[47] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[47])) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[47]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[47]);

  /* "cytimes/utils.py":1312
 *     assert datetime.time(1, 1, 0, 0) == time_new(1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 0) == time_new(1, 1, 1)  # type: ignore
 *     assert datetime.time(1, 1, 1, 1) == time_new(1, 1, 1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.time(1, 1, 1, 1, tz) == time_new(1, 1, 1, 1, tz)  # type: ignore
 *     assert type(time_new(1, 1, 1, 1, tz, 0)) is datetime.time  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[48] = PyTuple_Pack(4, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[48])) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[48]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[48]);

  /* "cytimes/utils.py":1367
 *     pt = Time(3, 4, 5, 6)
 *     pt_tz1 = Time(3, 4, 5, 6, tz1)
 *     dt = datetime.datetime(1970, 1, 1, 3, 4, 5, 6)             # <<<<<<<<<<<<<<
 *     dt_tz1 = datetime.datetime(1970, 1, 1, 3, 4, 5, 6, tz1)
 * 
*/
  __pyx_mstate_global->__pyx_tuple[49] = PyTuple_Pack(7, __pyx_mstate_global->__pyx_int_1970, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[49])) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[49]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[49]);

  /* "cytimes/utils.py":1417
 * 
 *     # New
 *     assert datetime.timedelta(0, 0, 0) == td_new()  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(0, 0, 0) == td_new(0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[50] = PyTuple_Pack(3, __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[50])) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[50]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[50]);

  /* "cytimes/utils.py":1421
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0)  # type: ignore
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[51] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[51])) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[51]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[51]);

  /* "cytimes/utils.py":1422
 *     assert datetime.timedelta(0, 0, 0) == td_new(0, 0, 0)  # type: ignore
 *     assert datetime.timedelta(1, 0, 0) == td_new(1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[52] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[52])) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[52]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[52]);

  /* "cytimes/utils.py":1424
 *     assert datetime.timedelta(1, 1, 0) == td_new(1, 1)  # type: ignore
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[53] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[53])) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[53]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[53]);

  /* "cytimes/utils.py":1425
 *     assert datetime.timedelta(1, 1, 1) == td_new(1, 1, 1)  # type: ignore
 *     assert datetime.timedelta(-1, 0, 0) == td_new(-1)  # type: ignore
 *     assert datetime.timedelta(-1, -1, 0) == td_new(-1, -1)  # type: ignore             # <<<<<<<<<<<<<<
 *     assert datetime.timedelta(-1, -1, -1) == td_new(-1, -1, -1)  # type: ignore
 *     assert type(td_new(-1, -1, -1)) is datetime.timedelta  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[54] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[54])) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[54]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[54]);

  /* "cytimes/utils.py":1459
 *     import datetime
 * 
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[55] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[55])) __PYX_ERR(0, 1459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[55]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[55]);

  /* "cytimes/utils.py":1461
 *     assert "00:00:01" == td_isoformat(datetime.timedelta(0, 1))  # type: ignore
 *     assert "00:01:01" == td_isoformat(datetime.timedelta(0, 1, minutes=1))  # type: ignore
 *     assert "24:01:01" == td_isoformat(datetime.timedelta(1, 1, minutes=1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "24:01:01.001000" == td_isoformat(datetime.timedelta(1, 1, 0, minutes=1, milliseconds=1))  # type: ignore
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[56] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[56])) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[56]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[56]);

  /* "cytimes/utils.py":1465
 *     assert "24:01:01.000001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1))  # type: ignore
 *     assert "24:01:01.001001" == td_isoformat(datetime.timedelta(1, 1, 1, minutes=1, milliseconds=1))  # type: ignore
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[57] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[57])) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[57]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[57]);

  /* "cytimes/utils.py":1467
 *     assert "-00:00:01" == td_isoformat(datetime.timedelta(0, -1))  # type: ignore
 *     assert "-00:01:01" == td_isoformat(datetime.timedelta(0, -1, minutes=-1))  # type: ignore
 *     assert "-24:01:01" == td_isoformat(datetime.timedelta(-1, -1, minutes=-1))  # type: ignore             # <<<<<<<<<<<<<<
 *     assert "-24:01:01.001000" == td_isoformat(datetime.timedelta(-1, -1, 0, minutes=-1, milliseconds=-1))  # type: ignore
 *     assert "-24:01:01.000001" == td_isoformat(datetime.timedelta(-1, -1, -1, minutes=-1))  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[58] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[58])) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[58]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[58]);

  /* "cytimes/utils.py":1583
 *     import numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as")             # <<<<<<<<<<<<<<
 * 
 *     for unit in units:
*/
  __pyx_mstate_global->__pyx_tuple[59] = PyTuple_Pack(13, __pyx_mstate_global->__pyx_n_u_Y, __pyx_mstate_global->__pyx_n_u_M, __pyx_mstate_global->__pyx_n_u_W, __pyx_mstate_global->__pyx_n_u_D, __pyx_mstate_global->__pyx_n_u_h, __pyx_mstate_global->__pyx_n_u_m, __pyx_mstate_global->__pyx_n_u_s, __pyx_mstate_global->__pyx_n_u_ms, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_n_u_ns, __pyx_mstate_global->__pyx_n_u_ps, __pyx_mstate_global->__pyx_n_u_fs, __pyx_mstate_global->__pyx_n_u_as); if (unlikely(!__pyx_mstate_global->__pyx_tuple[59])) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[59]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[59]);

  /* "cytimes/utils.py":1628
 *     import datetime, numpy as np
 * 
 *     units = ("Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns")             # <<<<<<<<<<<<<<
 *     for unit in units:
 *         for i in range(-500, 501):
*/
  __pyx_mstate_global->__pyx_tuple[60] = PyTuple_Pack(10, __pyx_mstate_global->__pyx_n_u_Y, __pyx_mstate_global->__pyx_n_u_M, __pyx_mstate_global->__pyx_n_u_W, __pyx_mstate_global->__pyx_n_u_D, __pyx_mstate_global->__pyx_n_u_h, __pyx_mstate_global->__pyx_n_u_m, __pyx_mstate_global->__pyx_n_u_s, __pyx_mstate_global->__pyx_n_u_ms, __pyx_mstate_global->__pyx_n_u_us, __pyx_mstate_global->__pyx_n_u_ns); if (unlikely(!__pyx_mstate_global->__pyx_tuple[60])) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[60]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[60]);

  /* "cytimes/utils.py":1645
 *     import numpy as np
 * 
 *     td = np.timedelta64(1, "D")             # <<<<<<<<<<<<<<
 *     assert is_td64(td)  # type: ignore
 *     assure_td64(td)  # type: ignore
*/
  __pyx_mstate_global->__pyx_tuple[61] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_n_u_D); if (unlikely(!__pyx_mstate_global->__pyx_tuple[61])) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[61]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[61]);

  /* "cytimes/utils.py":1803
 *     # Modulo
 *     test_cases = [
 *         (4, 2),             # <<<<<<<<<<<<<<
 *         (-9, 3),
 *         (9, -3),
*/
  __pyx_mstate_global->__pyx_tuple[62] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_4, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[62])) __PYX_ERR(0, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[62]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[62]);

  /* "cytimes/utils.py":1804
 *     test_cases = [
 *         (4, 2),
 *         (-9, 3),             # <<<<<<<<<<<<<<
 *         (9, -3),
 *         (-12, -4),
*/
  __pyx_mstate_global->__pyx_tuple[63] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_9, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[63])) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[63]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[63]);

  /* "cytimes/utils.py":1805
 *         (4, 2),
 *         (-9, 3),
 *         (9, -3),             # <<<<<<<<<<<<<<
 *         (-12, -4),
 *         (5, 2),  # normal positive remainder
*/
  __pyx_mstate_global->__pyx_tuple[64] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_9, __pyx_mstate_global->__pyx_int_neg_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[64])) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[64]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[64]);

  /* "cytimes/utils.py":1806
 *         (-9, 3),
 *         (9, -3),
 *         (-12, -4),             # <<<<<<<<<<<<<<
 *         (5, 2),  # normal positive remainder
 *         (-5, 2),  # negative numerator -> adjust
*/
  __pyx_mstate_global->__pyx_tuple[65] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_12, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[65])) __PYX_ERR(0, 1806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[65]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[65]);

  /* "cytimes/utils.py":1807
 *         (9, -3),
 *         (-12, -4),
 *         (5, 2),  # normal positive remainder             # <<<<<<<<<<<<<<
 *         (-5, 2),  # negative numerator -> adjust
 *         (7, 4),  # remainder 3 < 4
*/
  __pyx_mstate_global->__pyx_tuple[66] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[66])) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[66]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[66]);

  /* "cytimes/utils.py":1808
 *         (-12, -4),
 *         (5, 2),  # normal positive remainder
 *         (-5, 2),  # negative numerator -> adjust             # <<<<<<<<<<<<<<
 *         (7, 4),  # remainder 3 < 4
 *         (-7, 4),  # remainder -3 -> adjust to 1
*/
  __pyx_mstate_global->__pyx_tuple[67] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_5, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[67])) __PYX_ERR(0, 1808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[67]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[67]);

  /* "cytimes/utils.py":1809
 *         (5, 2),  # normal positive remainder
 *         (-5, 2),  # negative numerator -> adjust
 *         (7, 4),  # remainder 3 < 4             # <<<<<<<<<<<<<<
 *         (-7, 4),  # remainder -3 -> adjust to 1
 *         (5, -2),  # remainder 1 -> adjust to -1
*/
  __pyx_mstate_global->__pyx_tuple[68] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[68])) __PYX_ERR(0, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[68]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[68]);

  /* "cytimes/utils.py":1810
 *         (-5, 2),  # negative numerator -> adjust
 *         (7, 4),  # remainder 3 < 4
 *         (-7, 4),  # remainder -3 -> adjust to 1             # <<<<<<<<<<<<<<
 *         (5, -2),  # remainder 1 -> adjust to -1
 *         (-5, -2),  # remainder -1 -> already same sign
*/
  __pyx_mstate_global->__pyx_tuple[69] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_7, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[69])) __PYX_ERR(0, 1810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[69]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[69]);

  /* "cytimes/utils.py":1811
 *         (7, 4),  # remainder 3 < 4
 *         (-7, 4),  # remainder -3 -> adjust to 1
 *         (5, -2),  # remainder 1 -> adjust to -1             # <<<<<<<<<<<<<<
 *         (-5, -2),  # remainder -1 -> already same sign
 *         (7, -4),  # remainder 3 -> adjust to -1
*/
  __pyx_mstate_global->__pyx_tuple[70] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[70])) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[70]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[70]);

  /* "cytimes/utils.py":1812
 *         (-7, 4),  # remainder -3 -> adjust to 1
 *         (5, -2),  # remainder 1 -> adjust to -1
 *         (-5, -2),  # remainder -1 -> already same sign             # <<<<<<<<<<<<<<
 *         (7, -4),  # remainder 3 -> adjust to -1
 *         (-7, -4),  # remainder -3 -> already correct
*/
  __pyx_mstate_global->__pyx_tuple[71] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_5, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[71])) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[71]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[71]);

  /* "cytimes/utils.py":1813
 *         (5, -2),  # remainder 1 -> adjust to -1
 *         (-5, -2),  # remainder -1 -> already same sign
 *         (7, -4),  # remainder 3 -> adjust to -1             # <<<<<<<<<<<<<<
 *         (-7, -4),  # remainder -3 -> already correct
 *         (5, 1),
*/
  __pyx_mstate_global->__pyx_tuple[72] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[72])) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[72]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[72]);

  /* "cytimes/utils.py":1814
 *         (-5, -2),  # remainder -1 -> already same sign
 *         (7, -4),  # remainder 3 -> adjust to -1
 *         (-7, -4),  # remainder -3 -> already correct             # <<<<<<<<<<<<<<
 *         (5, 1),
 *         (-5, 1),
*/
  __pyx_mstate_global->__pyx_tuple[73] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_7, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[73])) __PYX_ERR(0, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[73]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[73]);

  /* "cytimes/utils.py":1815
 *         (7, -4),  # remainder 3 -> adjust to -1
 *         (-7, -4),  # remainder -3 -> already correct
 *         (5, 1),             # <<<<<<<<<<<<<<
 *         (-5, 1),
 *         (5, -1),
*/
  __pyx_mstate_global->__pyx_tuple[74] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[74])) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[74]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[74]);

  /* "cytimes/utils.py":1816
 *         (-7, -4),  # remainder -3 -> already correct
 *         (5, 1),
 *         (-5, 1),             # <<<<<<<<<<<<<<
 *         (5, -1),
 *         (-5, -1),
*/
  __pyx_mstate_global->__pyx_tuple[75] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_5, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[75])) __PYX_ERR(0, 1816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[75]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[75]);

  /* "cytimes/utils.py":1817
 *         (5, 1),
 *         (-5, 1),
 *         (5, -1),             # <<<<<<<<<<<<<<
 *         (-5, -1),
 *         (0, 3),
*/
  __pyx_mstate_global->__pyx_tuple[76] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_5, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[76])) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[76]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[76]);

  /* "cytimes/utils.py":1818
 *         (-5, 1),
 *         (5, -1),
 *         (-5, -1),             # <<<<<<<<<<<<<<
 *         (0, 3),
 *         (0, -3),
*/
  __pyx_mstate_global->__pyx_tuple[77] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_5, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[77])) __PYX_ERR(0, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[77]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[77]);

  /* "cytimes/utils.py":1819
 *         (5, -1),
 *         (-5, -1),
 *         (0, 3),             # <<<<<<<<<<<<<<
 *         (0, -3),
 *         (0, 1),
*/
  __pyx_mstate_global->__pyx_tuple[78] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[78])) __PYX_ERR(0, 1819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[78]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[78]);

  /* "cytimes/utils.py":1820
 *         (-5, -1),
 *         (0, 3),
 *         (0, -3),             # <<<<<<<<<<<<<<
 *         (0, 1),
 *         (0, -1),
*/
  __pyx_mstate_global->__pyx_tuple[79] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_neg_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[79])) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[79]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[79]);

  /* "cytimes/utils.py":1825
 *         (7, 4),  # baseline 7 % 4 == 3
 *         (-7, 4),  # baseline -7 % 4 == 1
 *         (2**62, 3),  # positive large             # <<<<<<<<<<<<<<
 *         (-(2**62), 3),  # negative large
 *         (2**63 - 1, 7),  # max int64
*/
  __pyx_mstate_global->__pyx_tuple[80] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[80])) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[80]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[80]);

  /* "cytimes/utils.py":1826
 *         (-7, 4),  # baseline -7 % 4 == 1
 *         (2**62, 3),  # positive large
 *         (-(2**62), 3),  # negative large             # <<<<<<<<<<<<<<
 *         (2**63 - 1, 7),  # max int64
 *         (-(2**63) + 1, 7),  # near min int64
*/
  __pyx_mstate_global->__pyx_tuple[81] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387904, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[81])) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[81]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[81]);

  /* "cytimes/utils.py":1827
 *         (2**62, 3),  # positive large
 *         (-(2**62), 3),  # negative large
 *         (2**63 - 1, 7),  # max int64             # <<<<<<<<<<<<<<
 *         (-(2**63) + 1, 7),  # near min int64
 *         (2**62, -3),
*/
  __pyx_mstate_global->__pyx_tuple[82] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, __pyx_mstate_global->__pyx_int_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[82])) __PYX_ERR(0, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[82]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[82]);

  /* "cytimes/utils.py":1828
 *         (-(2**62), 3),  # negative large
 *         (2**63 - 1, 7),  # max int64
 *         (-(2**63) + 1, 7),  # near min int64             # <<<<<<<<<<<<<<
 *         (2**62, -3),
 *         (-(2**62), -3),
*/
  __pyx_mstate_global->__pyx_tuple[83] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_9223372036854775807, __pyx_mstate_global->__pyx_int_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[83])) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[83]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[83]);

  /* "cytimes/utils.py":1829
 *         (2**63 - 1, 7),  # max int64
 *         (-(2**63) + 1, 7),  # near min int64
 *         (2**62, -3),             # <<<<<<<<<<<<<<
 *         (-(2**62), -3),
 *     ]
*/
  __pyx_mstate_global->__pyx_tuple[84] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_neg_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[84])) __PYX_ERR(0, 1829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[84]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[84]);

  /* "cytimes/utils.py":1830
 *         (-(2**63) + 1, 7),  # near min int64
 *         (2**62, -3),
 *         (-(2**62), -3),             # <<<<<<<<<<<<<<
 *     ]
 *     for num, factor in test_cases:
*/
  __pyx_mstate_global->__pyx_tuple[85] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387904, __pyx_mstate_global->__pyx_int_neg_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[85])) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[85]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[85]);

  /* "cytimes/utils.py":1843
 *         (-9, 3),
 *         (7, 4),
 *         (9, 5),             # <<<<<<<<<<<<<<
 *         (17, -10),
 *         (11, 4),
*/
  __pyx_mstate_global->__pyx_tuple[86] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_9, __pyx_mstate_global->__pyx_int_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[86])) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[86]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[86]);

  /* "cytimes/utils.py":1844
 *         (7, 4),
 *         (9, 5),
 *         (17, -10),             # <<<<<<<<<<<<<<
 *         (11, 4),
 *         (-11, 4),
*/
  __pyx_mstate_global->__pyx_tuple[87] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_17, __pyx_mstate_global->__pyx_int_neg_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[87])) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[87]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[87]);

  /* "cytimes/utils.py":1845
 *         (9, 5),
 *         (17, -10),
 *         (11, 4),             # <<<<<<<<<<<<<<
 *         (-11, 4),
 *         (23, -7),
*/
  __pyx_mstate_global->__pyx_tuple[88] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_11, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[88])) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[88]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[88]);

  /* "cytimes/utils.py":1846
 *         (17, -10),
 *         (11, 4),
 *         (-11, 4),             # <<<<<<<<<<<<<<
 *         (23, -7),
 *         (5, 2),
*/
  __pyx_mstate_global->__pyx_tuple[89] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_11, __pyx_mstate_global->__pyx_int_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[89])) __PYX_ERR(0, 1846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[89]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[89]);

  /* "cytimes/utils.py":1847
 *         (11, 4),
 *         (-11, 4),
 *         (23, -7),             # <<<<<<<<<<<<<<
 *         (5, 2),
 *         (15, 6),
*/
  __pyx_mstate_global->__pyx_tuple[90] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_23, __pyx_mstate_global->__pyx_int_neg_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[90])) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[90]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[90]);

  /* "cytimes/utils.py":1849
 *         (23, -7),
 *         (5, 2),
 *         (15, 6),             # <<<<<<<<<<<<<<
 *         (25, 10),
 *         (35, 10),
*/
  __pyx_mstate_global->__pyx_tuple[91] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_15, __pyx_mstate_global->__pyx_int_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[91])) __PYX_ERR(0, 1849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[91]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[91]);

  /* "cytimes/utils.py":1850
 *         (5, 2),
 *         (15, 6),
 *         (25, 10),             # <<<<<<<<<<<<<<
 *         (35, 10),
 *         (-5, 2),
*/
  __pyx_mstate_global->__pyx_tuple[92] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_25, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[92])) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[92]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[92]);

  /* "cytimes/utils.py":1851
 *         (15, 6),
 *         (25, 10),
 *         (35, 10),             # <<<<<<<<<<<<<<
 *         (-5, 2),
 *         (-15, 6),
*/
  __pyx_mstate_global->__pyx_tuple[93] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_35, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[93])) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[93]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[93]);

  /* "cytimes/utils.py":1853
 *         (35, 10),
 *         (-5, 2),
 *         (-15, 6),             # <<<<<<<<<<<<<<
 *         (-35, 10),
 *         (5, -2),
*/
  __pyx_mstate_global->__pyx_tuple[94] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_15, __pyx_mstate_global->__pyx_int_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[94])) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[94]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[94]);

  /* "cytimes/utils.py":1854
 *         (-5, 2),
 *         (-15, 6),
 *         (-35, 10),             # <<<<<<<<<<<<<<
 *         (5, -2),
 *         (-5, -2),
*/
  __pyx_mstate_global->__pyx_tuple[95] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_35, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[95])) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[95]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[95]);

  /* "cytimes/utils.py":1857
 *         (5, -2),
 *         (-5, -2),
 *         (35, -10),             # <<<<<<<<<<<<<<
 *         (1, 3),
 *         (2, 3),
*/
  __pyx_mstate_global->__pyx_tuple[96] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_35, __pyx_mstate_global->__pyx_int_neg_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[96])) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[96]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[96]);

  /* "cytimes/utils.py":1858
 *         (-5, -2),
 *         (35, -10),
 *         (1, 3),             # <<<<<<<<<<<<<<
 *         (2, 3),
 *         (-2, 3),
*/
  __pyx_mstate_global->__pyx_tuple[97] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[97])) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[97]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[97]);

  /* "cytimes/utils.py":1859
 *         (35, -10),
 *         (1, 3),
 *         (2, 3),             # <<<<<<<<<<<<<<
 *         (-2, 3),
 *         (3, 2),
*/
  __pyx_mstate_global->__pyx_tuple[98] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_2, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[98])) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[98]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[98]);

  /* "cytimes/utils.py":1860
 *         (1, 3),
 *         (2, 3),
 *         (-2, 3),             # <<<<<<<<<<<<<<
 *         (3, 2),
 *         (-3, 2),
*/
  __pyx_mstate_global->__pyx_tuple[99] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_2, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[99])) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[99]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[99]);

  /* "cytimes/utils.py":1861
 *         (2, 3),
 *         (-2, 3),
 *         (3, 2),             # <<<<<<<<<<<<<<
 *         (-3, 2),
 *         (3, -2),
*/
  __pyx_mstate_global->__pyx_tuple[100] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[100])) __PYX_ERR(0, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[100]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[100]);

  /* "cytimes/utils.py":1862
 *         (-2, 3),
 *         (3, 2),
 *         (-3, 2),             # <<<<<<<<<<<<<<
 *         (3, -2),
 *         (-3, -2),
*/
  __pyx_mstate_global->__pyx_tuple[101] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_3, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[101])) __PYX_ERR(0, 1862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[101]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[101]);

  /* "cytimes/utils.py":1863
 *         (3, 2),
 *         (-3, 2),
 *         (3, -2),             # <<<<<<<<<<<<<<
 *         (-3, -2),
 *         (-8, -4),
*/
  __pyx_mstate_global->__pyx_tuple[102] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[102])) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[102]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[102]);

  /* "cytimes/utils.py":1864
 *         (-3, 2),
 *         (3, -2),
 *         (-3, -2),             # <<<<<<<<<<<<<<
 *         (-8, -4),
 *         (0, 3),
*/
  __pyx_mstate_global->__pyx_tuple[103] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_3, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[103])) __PYX_ERR(0, 1864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[103]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[103]);

  /* "cytimes/utils.py":1865
 *         (3, -2),
 *         (-3, -2),
 *         (-8, -4),             # <<<<<<<<<<<<<<
 *         (0, 3),
 *         (0, -7),
*/
  __pyx_mstate_global->__pyx_tuple[104] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_8, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[104])) __PYX_ERR(0, 1865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[104]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[104]);

  /* "cytimes/utils.py":1867
 *         (-8, -4),
 *         (0, 3),
 *         (0, -7),             # <<<<<<<<<<<<<<
 *         (7, 1),
 *         (-7, 1),
*/
  __pyx_mstate_global->__pyx_tuple[105] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_neg_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[105])) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[105]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[105]);

  /* "cytimes/utils.py":1868
 *         (0, 3),
 *         (0, -7),
 *         (7, 1),             # <<<<<<<<<<<<<<
 *         (-7, 1),
 *         (7, -1),
*/
  __pyx_mstate_global->__pyx_tuple[106] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[106])) __PYX_ERR(0, 1868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[106]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[106]);

  /* "cytimes/utils.py":1869
 *         (0, -7),
 *         (7, 1),
 *         (-7, 1),             # <<<<<<<<<<<<<<
 *         (7, -1),
 *         (-7, -1),
*/
  __pyx_mstate_global->__pyx_tuple[107] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_7, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[107])) __PYX_ERR(0, 1869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[107]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[107]);

  /* "cytimes/utils.py":1870
 *         (7, 1),
 *         (-7, 1),
 *         (7, -1),             # <<<<<<<<<<<<<<
 *         (-7, -1),
 *         (14, 10),
*/
  __pyx_mstate_global->__pyx_tuple[108] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_7, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[108])) __PYX_ERR(0, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[108]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[108]);

  /* "cytimes/utils.py":1871
 *         (-7, 1),
 *         (7, -1),
 *         (-7, -1),             # <<<<<<<<<<<<<<
 *         (14, 10),
 *         (16, 10),
*/
  __pyx_mstate_global->__pyx_tuple[109] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_7, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[109])) __PYX_ERR(0, 1871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[109]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[109]);

  /* "cytimes/utils.py":1872
 *         (7, -1),
 *         (-7, -1),
 *         (14, 10),             # <<<<<<<<<<<<<<
 *         (16, 10),
 *         (-14, 10),
*/
  __pyx_mstate_global->__pyx_tuple[110] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_14, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[110])) __PYX_ERR(0, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[110]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[110]);

  /* "cytimes/utils.py":1873
 *         (-7, -1),
 *         (14, 10),
 *         (16, 10),             # <<<<<<<<<<<<<<
 *         (-14, 10),
 *         (-16, 10),
*/
  __pyx_mstate_global->__pyx_tuple[111] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_16, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[111])) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[111]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[111]);

  /* "cytimes/utils.py":1874
 *         (14, 10),
 *         (16, 10),
 *         (-14, 10),             # <<<<<<<<<<<<<<
 *         (-16, 10),
 *         (11, 8),
*/
  __pyx_mstate_global->__pyx_tuple[112] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_14, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[112])) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[112]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[112]);

  /* "cytimes/utils.py":1875
 *         (16, 10),
 *         (-14, 10),
 *         (-16, 10),             # <<<<<<<<<<<<<<
 *         (11, 8),
 *         (13, 8),
*/
  __pyx_mstate_global->__pyx_tuple[113] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_16, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[113])) __PYX_ERR(0, 1875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[113]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[113]);

  /* "cytimes/utils.py":1876
 *         (-14, 10),
 *         (-16, 10),
 *         (11, 8),             # <<<<<<<<<<<<<<
 *         (13, 8),
 *         (-11, 8),
*/
  __pyx_mstate_global->__pyx_tuple[114] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_11, __pyx_mstate_global->__pyx_int_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[114])) __PYX_ERR(0, 1876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[114]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[114]);

  /* "cytimes/utils.py":1877
 *         (-16, 10),
 *         (11, 8),
 *         (13, 8),             # <<<<<<<<<<<<<<
 *         (-11, 8),
 *         (-13, 8),
*/
  __pyx_mstate_global->__pyx_tuple[115] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_13, __pyx_mstate_global->__pyx_int_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[115])) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[115]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[115]);

  /* "cytimes/utils.py":1878
 *         (11, 8),
 *         (13, 8),
 *         (-11, 8),             # <<<<<<<<<<<<<<
 *         (-13, 8),
 *         # . Large magnitudes
*/
  __pyx_mstate_global->__pyx_tuple[116] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_11, __pyx_mstate_global->__pyx_int_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[116])) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[116]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[116]);

  /* "cytimes/utils.py":1879
 *         (13, 8),
 *         (-11, 8),
 *         (-13, 8),             # <<<<<<<<<<<<<<
 *         # . Large magnitudes
 *         (2**62, 3),
*/
  __pyx_mstate_global->__pyx_tuple[117] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_13, __pyx_mstate_global->__pyx_int_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[117])) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[117]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[117]);

  /* "cytimes/utils.py":1887
 *         (2**62, -3),
 *         (-(2**62), -3),
 *         (2**63 - 1, -7),             # <<<<<<<<<<<<<<
 *         (-(2**63) + 1, -7),
 *         (2**63 - 1, 2),
*/
  __pyx_mstate_global->__pyx_tuple[118] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, __pyx_mstate_global->__pyx_int_neg_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[118])) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[118]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[118]);

  /* "cytimes/utils.py":1888
 *         (-(2**62), -3),
 *         (2**63 - 1, -7),
 *         (-(2**63) + 1, -7),             # <<<<<<<<<<<<<<
 *         (2**63 - 1, 2),
 *         (2**63 - 1, -2),
*/
  __pyx_mstate_global->__pyx_tuple[119] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_9223372036854775807, __pyx_mstate_global->__pyx_int_neg_7); if (unlikely(!__pyx_mstate_global->__pyx_tuple[119])) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[119]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[119]);

  /* "cytimes/utils.py":1889
 *         (2**63 - 1, -7),
 *         (-(2**63) + 1, -7),
 *         (2**63 - 1, 2),             # <<<<<<<<<<<<<<
 *         (2**63 - 1, -2),
 *         (-(2**63) + 1, 2),
*/
  __pyx_mstate_global->__pyx_tuple[120] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[120])) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[120]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[120]);

  /* "cytimes/utils.py":1890
 *         (-(2**63) + 1, -7),
 *         (2**63 - 1, 2),
 *         (2**63 - 1, -2),             # <<<<<<<<<<<<<<
 *         (-(2**63) + 1, 2),
 *         (-(2**63) + 1, -2),
*/
  __pyx_mstate_global->__pyx_tuple[121] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[121])) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[121]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[121]);

  /* "cytimes/utils.py":1891
 *         (2**63 - 1, 2),
 *         (2**63 - 1, -2),
 *         (-(2**63) + 1, 2),             # <<<<<<<<<<<<<<
 *         (-(2**63) + 1, -2),
 *         (2**62, 10),
*/
  __pyx_mstate_global->__pyx_tuple[122] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_9223372036854775807, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[122])) __PYX_ERR(0, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[122]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[122]);

  /* "cytimes/utils.py":1892
 *         (2**63 - 1, -2),
 *         (-(2**63) + 1, 2),
 *         (-(2**63) + 1, -2),             # <<<<<<<<<<<<<<
 *         (2**62, 10),
 *         (2**62 + 2, 10),
*/
  __pyx_mstate_global->__pyx_tuple[123] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_9223372036854775807, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[123])) __PYX_ERR(0, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[123]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[123]);

  /* "cytimes/utils.py":1893
 *         (-(2**63) + 1, 2),
 *         (-(2**63) + 1, -2),
 *         (2**62, 10),             # <<<<<<<<<<<<<<
 *         (2**62 + 2, 10),
 *         (-(2**62), 10),
*/
  __pyx_mstate_global->__pyx_tuple[124] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[124])) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[124]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[124]);

  /* "cytimes/utils.py":1894
 *         (-(2**63) + 1, -2),
 *         (2**62, 10),
 *         (2**62 + 2, 10),             # <<<<<<<<<<<<<<
 *         (-(2**62), 10),
 *         (-(2**62) - 2, 10),
*/
  __pyx_mstate_global->__pyx_tuple[125] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000002, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[125])) __PYX_ERR(0, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[125]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[125]);

  /* "cytimes/utils.py":1895
 *         (2**62, 10),
 *         (2**62 + 2, 10),
 *         (-(2**62), 10),             # <<<<<<<<<<<<<<
 *         (-(2**62) - 2, 10),
 *         (2**62, -10),
*/
  __pyx_mstate_global->__pyx_tuple[126] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387904, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[126])) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[126]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[126]);

  /* "cytimes/utils.py":1896
 *         (2**62 + 2, 10),
 *         (-(2**62), 10),
 *         (-(2**62) - 2, 10),             # <<<<<<<<<<<<<<
 *         (2**62, -10),
 *         (2**62 + 2, -10),
*/
  __pyx_mstate_global->__pyx_tuple[127] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387906, __pyx_mstate_global->__pyx_int_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[127])) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[127]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[127]);

  /* "cytimes/utils.py":1897
 *         (-(2**62), 10),
 *         (-(2**62) - 2, 10),
 *         (2**62, -10),             # <<<<<<<<<<<<<<
 *         (2**62 + 2, -10),
 *     ]
*/
  __pyx_mstate_global->__pyx_tuple[128] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_neg_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[128])) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[128]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[128]);

  /* "cytimes/utils.py":1898
 *         (-(2**62) - 2, 10),
 *         (2**62, -10),
 *         (2**62 + 2, -10),             # <<<<<<<<<<<<<<
 *     ]
 *     for num, factor in test_cases:
*/
  __pyx_mstate_global->__pyx_tuple[129] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000002, __pyx_mstate_global->__pyx_int_neg_10); if (unlikely(!__pyx_mstate_global->__pyx_tuple[129])) __PYX_ERR(0, 1898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[129]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[129]);

  /* "cytimes/utils.py":1938
 *         # 3) Negative divisor (mixed numerators)
 *         (7, -4),  # -1.75
 *         (11, -4),  # -2.75             # <<<<<<<<<<<<<<
 *         (-7, -4),  # 1.75
 *         (-11, -4),  # 2.75
*/
  __pyx_mstate_global->__pyx_tuple[130] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_11, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[130])) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[130]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[130]);

  /* "cytimes/utils.py":1940
 *         (11, -4),  # -2.75
 *         (-7, -4),  # 1.75
 *         (-11, -4),  # 2.75             # <<<<<<<<<<<<<<
 *         # 4) Fractions with |num| < |factor| (results in (-1, 0, 1) bands)
 *         (3, 5),
*/
  __pyx_mstate_global->__pyx_tuple[131] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_11, __pyx_mstate_global->__pyx_int_neg_4); if (unlikely(!__pyx_mstate_global->__pyx_tuple[131])) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[131]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[131]);

  /* "cytimes/utils.py":1942
 *         (-11, -4),  # 2.75
 *         # 4) Fractions with |num| < |factor| (results in (-1, 0, 1) bands)
 *         (3, 5),             # <<<<<<<<<<<<<<
 *         (-3, 5),
 *         (3, -5),
*/
  __pyx_mstate_global->__pyx_tuple[132] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[132])) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[132]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[132]);

  /* "cytimes/utils.py":1943
 *         # 4) Fractions with |num| < |factor| (results in (-1, 0, 1) bands)
 *         (3, 5),
 *         (-3, 5),             # <<<<<<<<<<<<<<
 *         (3, -5),
 *         (-3, -5),
*/
  __pyx_mstate_global->__pyx_tuple[133] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_3, __pyx_mstate_global->__pyx_int_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[133])) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[133]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[133]);

  /* "cytimes/utils.py":1944
 *         (3, 5),
 *         (-3, 5),
 *         (3, -5),             # <<<<<<<<<<<<<<
 *         (-3, -5),
 *         (1, 3),
*/
  __pyx_mstate_global->__pyx_tuple[134] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_3, __pyx_mstate_global->__pyx_int_neg_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[134])) __PYX_ERR(0, 1944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[134]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[134]);

  /* "cytimes/utils.py":1945
 *         (-3, 5),
 *         (3, -5),
 *         (-3, -5),             # <<<<<<<<<<<<<<
 *         (1, 3),
 *         (2, 3),
*/
  __pyx_mstate_global->__pyx_tuple[135] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_3, __pyx_mstate_global->__pyx_int_neg_5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[135])) __PYX_ERR(0, 1945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[135]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[135]);

  /* "cytimes/utils.py":1948
 *         (1, 3),
 *         (2, 3),
 *         (-1, 3),             # <<<<<<<<<<<<<<
 *         (-2, 3),
 *         # 5) Denominator 1 (fast paths)
*/
  __pyx_mstate_global->__pyx_tuple[136] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_3); if (unlikely(!__pyx_mstate_global->__pyx_tuple[136])) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[136]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[136]);

  /* "cytimes/utils.py":1970
 *         (-13, 8),  # 1.375 / 1.625 / ...
 *         # 8) Sign-edge microcases around zero
 *         (1, -2),  # -0.5  -> floor=-1, ceil=0             # <<<<<<<<<<<<<<
 *         (-1, -2),  # 0.5   -> floor=0,  ceil=1
 *         (1, 2),  # 0.5   -> floor=0,  ceil=1
*/
  __pyx_mstate_global->__pyx_tuple[137] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[137])) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[137]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[137]);

  /* "cytimes/utils.py":1971
 *         # 8) Sign-edge microcases around zero
 *         (1, -2),  # -0.5  -> floor=-1, ceil=0
 *         (-1, -2),  # 0.5   -> floor=0,  ceil=1             # <<<<<<<<<<<<<<
 *         (1, 2),  # 0.5   -> floor=0,  ceil=1
 *         (-1, 2),  # -0.5  -> floor=-1, ceil=0
*/
  __pyx_mstate_global->__pyx_tuple[138] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_neg_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[138])) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[138]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[138]);

  /* "cytimes/utils.py":1972
 *         (1, -2),  # -0.5  -> floor=-1, ceil=0
 *         (-1, -2),  # 0.5   -> floor=0,  ceil=1
 *         (1, 2),  # 0.5   -> floor=0,  ceil=1             # <<<<<<<<<<<<<<
 *         (-1, 2),  # -0.5  -> floor=-1, ceil=0
 *         # 9) Large magnitudes within int64 (exercise remainder & sign at scale)
*/
  __pyx_mstate_global->__pyx_tuple[139] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[139])) __PYX_ERR(0, 1972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[139]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[139]);

  /* "cytimes/utils.py":1973
 *         (-1, -2),  # 0.5   -> floor=0,  ceil=1
 *         (1, 2),  # 0.5   -> floor=0,  ceil=1
 *         (-1, 2),  # -0.5  -> floor=-1, ceil=0             # <<<<<<<<<<<<<<
 *         # 9) Large magnitudes within int64 (exercise remainder & sign at scale)
 *         (2**62, 3),
*/
  __pyx_mstate_global->__pyx_tuple[140] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_1, __pyx_mstate_global->__pyx_int_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[140])) __PYX_ERR(0, 1973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[140]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[140]);

  /* "cytimes/utils.py":1984
 *         (-(2**63) + 1, -7),
 *         # 10) Large cases where |num| < |factor| but huge num
 *         (2**62, 2**63 - 1),             # <<<<<<<<<<<<<<
 *         (-(2**62), 2**63 - 1),
 *         (2**62, -(2**63 - 1)),
*/
  __pyx_mstate_global->__pyx_tuple[141] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff); if (unlikely(!__pyx_mstate_global->__pyx_tuple[141])) __PYX_ERR(0, 1984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[141]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[141]);

  /* "cytimes/utils.py":1985
 *         # 10) Large cases where |num| < |factor| but huge num
 *         (2**62, 2**63 - 1),
 *         (-(2**62), 2**63 - 1),             # <<<<<<<<<<<<<<
 *         (2**62, -(2**63 - 1)),
 *         (-(2**62), -(2**63 - 1)),
*/
  __pyx_mstate_global->__pyx_tuple[142] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387904, __pyx_mstate_global->__pyx_int_0x7fffffffffffffff); if (unlikely(!__pyx_mstate_global->__pyx_tuple[142])) __PYX_ERR(0, 1985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[142]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[142]);

  /* "cytimes/utils.py":1986
 *         (2**62, 2**63 - 1),
 *         (-(2**62), 2**63 - 1),
 *         (2**62, -(2**63 - 1)),             # <<<<<<<<<<<<<<
 *         (-(2**62), -(2**63 - 1)),
 *     ]
*/
  __pyx_mstate_global->__pyx_tuple[143] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0x4000000000000000, __pyx_mstate_global->__pyx_int_neg_9223372036854775807); if (unlikely(!__pyx_mstate_global->__pyx_tuple[143])) __PYX_ERR(0, 1986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[143]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[143]);

  /* "cytimes/utils.py":1987
 *         (-(2**62), 2**63 - 1),
 *         (2**62, -(2**63 - 1)),
 *         (-(2**62), -(2**63 - 1)),             # <<<<<<<<<<<<<<
 *     ]
 *     for num, factor in test_cases:
*/
  __pyx_mstate_global->__pyx_tuple[144] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_neg_4611686018427387904, __pyx_mstate_global->__pyx_int_neg_9223372036854775807); if (unlikely(!__pyx_mstate_global->__pyx_tuple[144])) __PYX_ERR(0, 1987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[144]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[144]);

  /* "cytimes/utils.py":2276
 * 
 *     pairs = [
 *         (0.0, 0),             # <<<<<<<<<<<<<<
 *         (1.0, 1_000_000),
 *         (1.000001, 1_000_001),
*/
  __pyx_mstate_global->__pyx_tuple[145] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_0_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[145])) __PYX_ERR(0, 2276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[145]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[145]);

  /* "cytimes/utils.py":2277
 *     pairs = [
 *         (0.0, 0),
 *         (1.0, 1_000_000),             # <<<<<<<<<<<<<<
 *         (1.000001, 1_000_001),
 *         (0.999999, 999_999),
*/
  __pyx_mstate_global->__pyx_tuple[146] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1_0, __pyx_mstate_global->__pyx_int_1000000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[146])) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[146]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[146]);

  /* "cytimes/utils.py":2278
 *         (0.0, 0),
 *         (1.0, 1_000_000),
 *         (1.000001, 1_000_001),             # <<<<<<<<<<<<<<
 *         (0.999999, 999_999),
 *         (59.9999996, 59_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[147] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1_000001, __pyx_mstate_global->__pyx_int_1000001); if (unlikely(!__pyx_mstate_global->__pyx_tuple[147])) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[147]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[147]);

  /* "cytimes/utils.py":2279
 *         (1.0, 1_000_000),
 *         (1.000001, 1_000_001),
 *         (0.999999, 999_999),             # <<<<<<<<<<<<<<
 *         (59.9999996, 59_999_999),
 *         (60.0, 60_000_000),
*/
  __pyx_mstate_global->__pyx_tuple[148] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_0_999999, __pyx_mstate_global->__pyx_int_999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[148])) __PYX_ERR(0, 2279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[148]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[148]);

  /* "cytimes/utils.py":2280
 *         (1.000001, 1_000_001),
 *         (0.999999, 999_999),
 *         (59.9999996, 59_999_999),             # <<<<<<<<<<<<<<
 *         (60.0, 60_000_000),
 *         (12345.678901, 12_345_678_901),
*/
  __pyx_mstate_global->__pyx_tuple[149] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_59_9999996, __pyx_mstate_global->__pyx_int_59999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[149])) __PYX_ERR(0, 2280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[149]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[149]);

  /* "cytimes/utils.py":2281
 *         (0.999999, 999_999),
 *         (59.9999996, 59_999_999),
 *         (60.0, 60_000_000),             # <<<<<<<<<<<<<<
 *         (12345.678901, 12_345_678_901),
 *         (-0.000001, -1),
*/
  __pyx_mstate_global->__pyx_tuple[150] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_60_0, __pyx_mstate_global->__pyx_int_60000000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[150])) __PYX_ERR(0, 2281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[150]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[150]);

  /* "cytimes/utils.py":2282
 *         (59.9999996, 59_999_999),
 *         (60.0, 60_000_000),
 *         (12345.678901, 12_345_678_901),             # <<<<<<<<<<<<<<
 *         (-0.000001, -1),
 *         (-0.999999, -999_999),
*/
  __pyx_mstate_global->__pyx_tuple[151] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_12345_678901, __pyx_mstate_global->__pyx_int_12345678901); if (unlikely(!__pyx_mstate_global->__pyx_tuple[151])) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[151]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[151]);

  /* "cytimes/utils.py":2283
 *         (60.0, 60_000_000),
 *         (12345.678901, 12_345_678_901),
 *         (-0.000001, -1),             # <<<<<<<<<<<<<<
 *         (-0.999999, -999_999),
 *         (-1.000001, -1_000_001),
*/
  __pyx_mstate_global->__pyx_tuple[152] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_0_000001, __pyx_mstate_global->__pyx_int_neg_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[152])) __PYX_ERR(0, 2283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[152]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[152]);

  /* "cytimes/utils.py":2284
 *         (12345.678901, 12_345_678_901),
 *         (-0.000001, -1),
 *         (-0.999999, -999_999),             # <<<<<<<<<<<<<<
 *         (-1.000001, -1_000_001),
 *         (-59.9999996, -59_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[153] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_0_999999, __pyx_mstate_global->__pyx_int_neg_999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[153])) __PYX_ERR(0, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[153]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[153]);

  /* "cytimes/utils.py":2285
 *         (-0.000001, -1),
 *         (-0.999999, -999_999),
 *         (-1.000001, -1_000_001),             # <<<<<<<<<<<<<<
 *         (-59.9999996, -59_999_999),
 *         (-60.0, -60_000_000),
*/
  __pyx_mstate_global->__pyx_tuple[154] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_1_000001, __pyx_mstate_global->__pyx_int_neg_1000001); if (unlikely(!__pyx_mstate_global->__pyx_tuple[154])) __PYX_ERR(0, 2285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[154]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[154]);

  /* "cytimes/utils.py":2286
 *         (-0.999999, -999_999),
 *         (-1.000001, -1_000_001),
 *         (-59.9999996, -59_999_999),             # <<<<<<<<<<<<<<
 *         (-60.0, -60_000_000),
 *         (-86399.9999996, -86_399_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[155] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_59_9999996, __pyx_mstate_global->__pyx_int_neg_59999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[155])) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[155]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[155]);

  /* "cytimes/utils.py":2287
 *         (-1.000001, -1_000_001),
 *         (-59.9999996, -59_999_999),
 *         (-60.0, -60_000_000),             # <<<<<<<<<<<<<<
 *         (-86399.9999996, -86_399_999_999),
 *         (86399.9999996, 86_399_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[156] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_60_0, __pyx_mstate_global->__pyx_int_neg_60000000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[156])) __PYX_ERR(0, 2287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[156]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[156]);

  /* "cytimes/utils.py":2288
 *         (-59.9999996, -59_999_999),
 *         (-60.0, -60_000_000),
 *         (-86399.9999996, -86_399_999_999),             # <<<<<<<<<<<<<<
 *         (86399.9999996, 86_399_999_999),
 *         (31556926.123456, 31_556_926_123_456),
*/
  __pyx_mstate_global->__pyx_tuple[157] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_86399_9999996, __pyx_mstate_global->__pyx_int_neg_86399999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[157])) __PYX_ERR(0, 2288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[157]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[157]);

  /* "cytimes/utils.py":2289
 *         (-60.0, -60_000_000),
 *         (-86399.9999996, -86_399_999_999),
 *         (86399.9999996, 86_399_999_999),             # <<<<<<<<<<<<<<
 *         (31556926.123456, 31_556_926_123_456),
 *         (-31556926.123456, -31_556_926_123_456),
*/
  __pyx_mstate_global->__pyx_tuple[158] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_86399_9999996, __pyx_mstate_global->__pyx_int_86399999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[158])) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[158]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[158]);

  /* "cytimes/utils.py":2290
 *         (-86399.9999996, -86_399_999_999),
 *         (86399.9999996, 86_399_999_999),
 *         (31556926.123456, 31_556_926_123_456),             # <<<<<<<<<<<<<<
 *         (-31556926.123456, -31_556_926_123_456),
 *         (1e-06, 1),
*/
  __pyx_mstate_global->__pyx_tuple[159] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_31556926_123456, __pyx_mstate_global->__pyx_int_0x1cb36b5f2dc0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[159])) __PYX_ERR(0, 2290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[159]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[159]);

  /* "cytimes/utils.py":2291
 *         (86399.9999996, 86_399_999_999),
 *         (31556926.123456, 31_556_926_123_456),
 *         (-31556926.123456, -31_556_926_123_456),             # <<<<<<<<<<<<<<
 *         (1e-06, 1),
 *         (-1e-06, -1),
*/
  __pyx_mstate_global->__pyx_tuple[160] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_31556926_123456, __pyx_mstate_global->__pyx_int_neg_31556926123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[160])) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[160]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[160]);

  /* "cytimes/utils.py":2292
 *         (31556926.123456, 31_556_926_123_456),
 *         (-31556926.123456, -31_556_926_123_456),
 *         (1e-06, 1),             # <<<<<<<<<<<<<<
 *         (-1e-06, -1),
 *         (0.0000004, 0),
*/
  __pyx_mstate_global->__pyx_tuple[161] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1eneg_06, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[161])) __PYX_ERR(0, 2292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[161]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[161]);

  /* "cytimes/utils.py":2294
 *         (1e-06, 1),
 *         (-1e-06, -1),
 *         (0.0000004, 0),             # <<<<<<<<<<<<<<
 *         (0.0000005, 0),
 *         (999999.9999995, 999_999_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[162] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_0_0000004, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[162])) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[162]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[162]);

  /* "cytimes/utils.py":2295
 *         (-1e-06, -1),
 *         (0.0000004, 0),
 *         (0.0000005, 0),             # <<<<<<<<<<<<<<
 *         (999999.9999995, 999_999_999_999),
 *         (-999999.9999995, -999_999_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[163] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_0_0000005, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[163])) __PYX_ERR(0, 2295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[163]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[163]);

  /* "cytimes/utils.py":2296
 *         (0.0000004, 0),
 *         (0.0000005, 0),
 *         (999999.9999995, 999_999_999_999),             # <<<<<<<<<<<<<<
 *         (-999999.9999995, -999_999_999_999),
 *         (1234567890.123456, 1_234_567_890_123_456),
*/
  __pyx_mstate_global->__pyx_tuple[164] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_999999_9999995, __pyx_mstate_global->__pyx_int_999999999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[164])) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[164]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[164]);

  /* "cytimes/utils.py":2297
 *         (0.0000005, 0),
 *         (999999.9999995, 999_999_999_999),
 *         (-999999.9999995, -999_999_999_999),             # <<<<<<<<<<<<<<
 *         (1234567890.123456, 1_234_567_890_123_456),
 *         (-1234567890.123456, -1_234_567_890_123_456),
*/
  __pyx_mstate_global->__pyx_tuple[165] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_999999_9999995, __pyx_mstate_global->__pyx_int_neg_999999999999); if (unlikely(!__pyx_mstate_global->__pyx_tuple[165])) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[165]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[165]);

  /* "cytimes/utils.py":2298
 *         (999999.9999995, 999_999_999_999),
 *         (-999999.9999995, -999_999_999_999),
 *         (1234567890.123456, 1_234_567_890_123_456),             # <<<<<<<<<<<<<<
 *         (-1234567890.123456, -1_234_567_890_123_456),
 *         (1672531199.9999996, 1_672_531_199_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[166] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1234567890_123456, __pyx_mstate_global->__pyx_int_0x462d53c8abac0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[166])) __PYX_ERR(0, 2298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[166]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[166]);

  /* "cytimes/utils.py":2299
 *         (-999999.9999995, -999_999_999_999),
 *         (1234567890.123456, 1_234_567_890_123_456),
 *         (-1234567890.123456, -1_234_567_890_123_456),             # <<<<<<<<<<<<<<
 *         (1672531199.9999996, 1_672_531_199_999_999),
 *         (-2208988800.0, -2_208_988_800_000_000),
*/
  __pyx_mstate_global->__pyx_tuple[167] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_1234567890_123456, __pyx_mstate_global->__pyx_int_neg_1234567890123456); if (unlikely(!__pyx_mstate_global->__pyx_tuple[167])) __PYX_ERR(0, 2299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[167]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[167]);

  /* "cytimes/utils.py":2300
 *         (1234567890.123456, 1_234_567_890_123_456),
 *         (-1234567890.123456, -1_234_567_890_123_456),
 *         (1672531199.9999996, 1_672_531_199_999_999),             # <<<<<<<<<<<<<<
 *         (-2208988800.0, -2_208_988_800_000_000),
 *         (946684800.0, 946_684_800_000_000),
*/
  __pyx_mstate_global->__pyx_tuple[168] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1672531199_9999996, __pyx_mstate_global->__pyx_int_0x5f128840d3fff); if (unlikely(!__pyx_mstate_global->__pyx_tuple[168])) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[168]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[168]);

  /* "cytimes/utils.py":2301
 *         (-1234567890.123456, -1_234_567_890_123_456),
 *         (1672531199.9999996, 1_672_531_199_999_999),
 *         (-2208988800.0, -2_208_988_800_000_000),             # <<<<<<<<<<<<<<
 *         (946684800.0, 946_684_800_000_000),
 *         (-31536000.0, -31_536_000_000_000),
*/
  __pyx_mstate_global->__pyx_tuple[169] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_2208988800_0, __pyx_mstate_global->__pyx_int_neg_2208988800000000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[169])) __PYX_ERR(0, 2301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[169]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[169]);

  /* "cytimes/utils.py":2302
 *         (1672531199.9999996, 1_672_531_199_999_999),
 *         (-2208988800.0, -2_208_988_800_000_000),
 *         (946684800.0, 946_684_800_000_000),             # <<<<<<<<<<<<<<
 *         (-31536000.0, -31_536_000_000_000),
 *         (2_147_483_647.999999, 2_147_483_647_999_999),
*/
  __pyx_mstate_global->__pyx_tuple[170] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_946684800_0, __pyx_mstate_global->__pyx_int_0x35d013b37e000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[170])) __PYX_ERR(0, 2302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[170]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[170]);

  /* "cytimes/utils.py":2303
 *         (-2208988800.0, -2_208_988_800_000_000),
 *         (946684800.0, 946_684_800_000_000),
 *         (-31536000.0, -31_536_000_000_000),             # <<<<<<<<<<<<<<
 *         (2_147_483_647.999999, 2_147_483_647_999_999),
 *         (-2_147_483_648.000001, -2_147_483_648_000_001),
*/
  __pyx_mstate_global->__pyx_tuple[171] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_31536000_0, __pyx_mstate_global->__pyx_int_neg_31536000000000); if (unlikely(!__pyx_mstate_global->__pyx_tuple[171])) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[171]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[171]);

  /* "cytimes/utils.py":2304
 *         (946684800.0, 946_684_800_000_000),
 *         (-31536000.0, -31_536_000_000_000),
 *         (2_147_483_647.999999, 2_147_483_647_999_999),             # <<<<<<<<<<<<<<
 *         (-2_147_483_648.000001, -2_147_483_648_000_001),
 *     ]
*/
  __pyx_mstate_global->__pyx_tuple[172] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_2147483647_999999, __pyx_mstate_global->__pyx_int_0x7a11fffffffff); if (unlikely(!__pyx_mstate_global->__pyx_tuple[172])) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[172]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[172]);

  /* "cytimes/utils.py":2305
 *         (-31536000.0, -31_536_000_000_000),
 *         (2_147_483_647.999999, 2_147_483_647_999_999),
 *         (-2_147_483_648.000001, -2_147_483_648_000_001),             # <<<<<<<<<<<<<<
 *     ]
 *     for ss, us in pairs:
*/
  __pyx_mstate_global->__pyx_tuple[173] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_neg_2147483648_000001, __pyx_mstate_global->__pyx_int_neg_2147483648000001); if (unlikely(!__pyx_mstate_global->__pyx_tuple[173])) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[173]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[173]);

  /* "cytimes/utils.py":2506
 * 
 *     for i in (
 *         "1.1.1",             # <<<<<<<<<<<<<<
 *         "1..1",
 *         "..1",
*/
  __pyx_mstate_global->__pyx_tuple[174] = PyTuple_Pack(11, __pyx_mstate_global->__pyx_kp_u_1_1_1, __pyx_mstate_global->__pyx_kp_u_1_1_2, __pyx_mstate_global->__pyx_kp_u_1_5, __pyx_mstate_global->__pyx_kp_u_1_6, __pyx_mstate_global->__pyx_kp_u__2, __pyx_mstate_global->__pyx_kp_u_a1_1, __pyx_mstate_global->__pyx_kp_u_1_1a, __pyx_mstate_global->__pyx_kp_u_1_1_3, __pyx_mstate_global->__pyx_kp_u_1_1_4, __pyx_mstate_global->__pyx_kp_u_1_1_5, __pyx_mstate_global->__pyx_kp_u_1_1_6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[174])) __PYX_ERR(0, 2506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[174]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[174]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<175; ++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},{8},{9},{8},{9},{3},{5},{5},{10},{10},{26},{35},{31},{3},{9},{15},{20},{19},{14},{9},{8},{15},{20},{13},{3},{4},{3},{3},{4},{8},{9},{1},{3},{7},{8},{3},{3},{4},{8},{9},{5},{4},{4},{4},{4},{4},{4},{2},{2},{6},{3},{3},{2},{7},{8},{10},{19},{26},{26},{31},{24},{8},{8},{10},{5},{5},{8},{15},{16},{15},{16},{15},{16},{9},{2},{4},{55},{12},{62},{16},{14},{13},{19},{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},{61},{8},{8},{13},{12},{54},{55},{53},{81},{54},{79},{88},{52},{54},{21},{25},{21},{25},{21},{25},{22},{26},{19},{23},{20},{29},{24},{20},{22},{22},{22},{23},{20},{17},{29},{18},{30},{26},{8},{4},{179},{77},{12},{31},{23},{23},{21},{23},{29},{29},{21},{20},{21},{23},{21},{19},{21},{23},{21},{17},{25},{19},{26},{12},{31},{31},{24},{20},{31},{31},{26},{19},{14},{24},{17},{23},{21},{23},{21},{23},{30},{30},{28},{26},{28},{21},{23},{25},{15},{18},{18},{18},{18},{38},{25},{51},{16},{49},{55},{79},{53},{22},{22},{8},{8},{1},{5},{1},{2},{4},{1},{4},{6},{1},{1},{2},{1},{0},{1},{1},{1},{2},{4},{8},{18},{31},{35},{31},{35},{31},{35},{32},{36},{32},{36},{29},{33},{26},{14},{12},{17},{11},{13},{13},{13},{13},{14},{14},{13},{13},{14},{14},{14},{14},{13},{14},{35},{34},{7},{8},{9},{9},{13},{7},{8},{11},{34},{7},{8},{5},{5},{8},{12},{8},{8},{20},{22},{22},{32},{51},{32},{51},{32},{51},{33},{52},{33},{52},{30},{49},{27},{51},{10},{109},{9},{7},{39},{34},{68},{69},{38},{36},{21},{30},{8},{10},{15},{21},{6},{37},{51},{53},{39},{35},{49},{51},{37},{21},{20},{82},{26},{77},{12},{15},{15},{15},{50},{39},{34},{5},{16},{40},{12},{13},{42},{53},{51},{11},{17},{9},{37},{26},{52},{3},{3},{3},{3},{10},{14},{8},{10},{1},{4},{8},{3},{7},{5},{3},{3},{20},{3},{3},{3},{7},{1},{11},{3},{3},{3},{3},{4},{3},{3},{20},{13},{11},{15},{15},{13},{8},{3},{3},{3},{1},{3},{4},{9},{4},{3},{3},{1},{1},{3},{1},{8},{1},{26},{3},{3},{4},{4},{5},{5},{5},{5},{5},{5},{5},{7},{5},{6},{8},{5},{2},{6},{18},{11},{4},{18},{3},{5},{24},{3},{7},{13},{1},{2},{2},{4},{8},{10},{3},{4},{18},{17},{14},{2},{7},{7},{3},{3},{2},{3},{4},{3},{4},{4},{6},{6},{6},{6},{6},{4},{5},{5},{3},{6},{3},{6},{7},{5},{4},{13},{7},{2},{8},{9},{19},{13},{3},{4},{6},{9},{1},{2},{2},{2},{5},{4},{5},{1},{5},{5},{3},{5},{13},{8},{8},{8},{11},{8},{11},{15},{21},{5},{1},{3},{5},{9},{5},{9},{10},{1},{4},{8},{4},{7},{13},{2},{11},{12},{12},{3},{6},{7},{2},{10},{5},{15},{2},{7},{11},{4},{8},{10},{10},{3},{2},{2},{3},{5},{6},{6},{8},{5},{3},{4},{5},{6},{14},{12},{2},{5},{8},{4},{3},{11},{5},{2},{2},{6},{11},{12},{3},{12},{7},{3},{4},{6},{5},{8},{1},{6},{7},{4},{12},{10},{4},{2},{4},{3},{1},{2},{2},{3},{3},{5},{2},{3},{3},{3},{3},{3},{3},{4},{3},{3},{8},{10},{21},{19},{21},{41},{27},{27},{19},{18},{19},{21},{9},{19},{19},{17},{20},{21},{19},{43},{15},{18},{23},{17},{24},{10},{29},{29},{22},{18},{29},{29},{24},{17},{10},{12},{22},{15},{21},{19},{21},{19},{21},{41},{28},{28},{26},{44},{24},{42},{26},{44},{19},{21},{23},{11},{13},{16},{16},{16},{4},{5},{5},{9},{11},{9},{9},{6},{8},{3},{7},{8},{7},{6},{6},{6},{7},{7},{7},{3},{4},{4},{4},{17},{7},{5},{5},{9},{13},{2},{2},{3},{3},{3},{3},{6},{6},{6},{4},{5},{9},{2},{4},{3},{9},{12},{3},{5},{6},{1},{4},{7},{3},{5},{1},{4},{4},{8},{2},{1},{4},{8},{4},{1511},{31},{394},{204},{248},{780},{336},{124},{45},{186},{69},{375},{97},{1322},{1819},{110},{80},{191},{80},{147},{510},{824},{1516},{129},{347},{633},{337},{97},{100},{260},{154},{65},{129},{398},{94},{87},{1727},{644},{97},{192},{137},{1868},{89},{85},{720},{198},{669},{210},{906},{116},{151},{394},{121},{97},{93},{176},{485}};
    #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (10315 bytes) */
const char* const cstring = "BZh91AY&SYS\352\211S\000\017\346\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\301@P@@@@@@@@@P\000@\000`1<\336\360\270]jAM}x\216\024\266\351B\373\336y\234\276\300\276\353\332\363\343\336=k\337;\334\370{}\3664\223\324\355\351\351\366o]\365\276\373\276\223\315c\276/s\333}\035\316\363*\357U\257wN\236\353\326\3350Ss|y\356\276\276\016o;\005y^\031\336\000u\363\335\234\212\257m\340\216\354\224\245n\347(\253RPj\253\345\334\352U\0228=\003\252\000\r\341$\204ML\000\004\362\223\304i\033S4\232f\206\211\2416\206\230\246jd\314\202OP\302d\323\321\241\250\323\312\006\203M4\000\004\220\200\206\204D\023\000\223dj0&\206!\344FA\247\251\221\210\006\215\000\000\001\240\000\000\320\001\"\002QJ5\036\247\251\352\017MOS\324\000\033S\322\032\017\325\017SG\246\240\362\207\251\351\224\363AO\302A\262\246\237\245\031\251\247\251\352h\321\240h4\001&\224D$\215=Q\244\362e=\252~%\036\247\242z\207\244\321\246\324\364@zf\325OG\244~\2516\"=\2013!\221)\230\325=M\r=LM\032\r?T\021(\211\202dh\223&\206\214\232\247\352zS\322\236j\217\0325M\232Q\34523Q\265\014\232h\000\000\r\006\010\304\000\321\352\r\001\"!\001F\230\231\032S\311\252xH\375I\240\3652i\211\352\0004z@4\3234\312z\232z\237\251\r4\001\220\000\000\000>/K\203\004\352\361<\302i\364\3547\374\212)A\236zC\014\212#\002&\332?\370HG\336\351\236\357\331\373\3757?s\357b\036\366\355\336\342\252\252\252\253\324\323s{\336\021{y\236sz\227\313W#7\2114\236\032\034\210\365y\244\242y\322JL\024\207\213i[?N\237gS\340\332\207\372\177\252\375\364@\377p\017\370W\344\024\377\224\377\240\177\355/IkCj\3146\214\253j\007x\366M\327\223\230\324e\306\255daw{u%\014\340\331\014\206D'FM\205(\025\224\320B\224\245\334C\245\014\300\233\014\265\225,\224\227\374\314\364\334\035A[\302W\010\247F\263B\214\207N\301X\261%\210(\300\316\232\0025 \\\212\\\200\\\205\355\343y\370\017\300\222\004\001\204\t\021\202AX\310D`*\222)\001\2021F\0101\030+ #\026A\204Da\005\210\300\220U\202\251$\021$P\202\304E\212B1\005\220\213 \262\003\006\002\202\212\203\025\212\242\010\241 H\221""\204\204\213\216 b\006\"\342bc\242\243p*\240T*\225k\\\363\017\t/\374\000\031\006BF@\262E\322\272\261\346\014\022\340\270\270\014\206\363\0203\0014\222$$\201\030\000\220d\200\260Qb\213\020Q\200\244\204\213 \251\022$^\270)\210b\000\231\243\222\016Y\006J\031\006p9\241\267x\t\017\030\020\210\300DD\210\210\200\211\021\221@\021$\210\221\023\310\211\006\014 \301\004\010\212\310\031\201\022\t\002\231\200Z\242\366DHD\314Sh\355\312\322\324\010\202\356O y\177W\363y\267\026\277>\005\264\223G\023\031\037h\004h#\016Qw\213\277\271\274\276\343\212\211\230,$\031\006\017\033\013\034\200$b\nH\252H\252\031E\002\204\007'#.#`\001\212\t\310\022\014\000a\024!\031\030\010(\251\030\204\203\0207\022cq\002;\255\nE\214a\010\270\030\000`\030\031\275\314\003\316\240d\206f\225r\315\025\314\240\306\001\014V\236\332\354K\260\271\266\352\t\261h\001 \310\241\014\215\r7\204h\"\250\241TI(t\000\3432wp\001\336\212\245\004\210\300)A\n\315.\272\340\007y\t\035\270\r\370)\t\243\311F$\001\014 \001\371h\324\200U\002\305b\306\232]A\251d\240\346/x\004\334\203\301\035\342\357\003\212w\302\302\266\333-+1E\311z\267\304\332\330\305\306N\226B\344\347\023\210\025\256\016%\245\024#\222H5\254\261\214q\311\024\267Cd\251&a\300\225\0055\223\331\006\230\235\3643wn+\002\006\332\226\2141\246\030]\360\245+-&\303P\3059\007nj\020HA\202e\261n\027\0256\206\327`q\\\200r7\034\rL\304\356B\247\003\000#\004m`\273\225\334\200\356\0207\"\033\2257\017\016\r\340\032\202\353\256i\231\260\267\253\220\333\243t\033\244n\220n\033\357\270m\256\231\035\264\237\224\324\324\034\332$\211&sa\033\013dm\216!\334@U^\353'8\222`Fa\232Y\206|C\217\036A.&Z0\016\264O\2425l,\013\t\030\014i\310\220\266\3235\244\036^`ff\214\32237\016<W\274\3173@\302\200\342\310iP\206\2554\025\3204t\3175\342\342\336b`\016\030\t\203\221~\336D\345l\3633sY2\323L\315\372\324\025\3541q\330N\313$\327\272\325d\216\"52,\230Y+\262P@r\256\346\224\243\315pH\337\025'Z\200\347\245\373[\253\345/\324\352\353\364\217\231\273\266\373'\371\320\377+\025\2242\205l\363\303e\226\\\024c\204l\177\307""\354\363~\275\330\307\202\\\363z\344\215V46\2320a\002\336V|?\266M\237Vo\243\231_\202ML\376\266\032\031\271\027\254Kx+>\267\352\025\353\310s\267\r<zo\363B\t'9\325Ie\312\030qLR\305me$\357\322\332\336\026\341\320,u\005\227\027\324FI\026\376\237\306t\256yU\001\375\211\023\306\340\217?+\245;\205\315\0048\342\324`\217\334\023p\233\373\033\225\341E6\0069\346\326\376\001U \322\240\215\004\311_\361\t\235\256\375v\250\260\206\332\033X\352\304b\315O<\027\364\347Q6,\"\3452\025\323\264\201IQ\250\302\230L\320\352\007V\341-\353L\231)=\200n\033\006\270\302\363\262\3234\245\232\376\260\242\254\337\276\025V\022\304\345AJ\341\327\214\220c\316\2512\325\000\214\272\260\272 \3231E\232h\351\203A\233\234f-\230\313\315\215\254\t\204\322\231\311\007\002\330\227)4\241\261L.\235u\245\214\223\270\342\271\"Ec\200\335\"$\210\253\003KT\312\r\030&`N\256K\210\325U\206\234^0\206\025\252\202'I\330\327\307\215\275\347l\344q!\250c[\211\006D\204\262P\241\"l\216|\363p\004\364\nz\017I\351}\3433\335\201\030\020\223`\\h\027J\022\267JX\254\233\327\003\313\0312\251\254\224L\222\020)\201\310B\342Q\003s\302\234\224\210\231\226\306\33132\3110\327o\210\026\264\0079RS+2\241i\315\211\024f\226\345\305`W\371f\211\231l\206\250\203%\231\246\014\204\006B\014\220\205\357O)\226@\356v\364\321!\032\000h\221\240nM\346\375\005M\024\321\023n\233\367\350h\256\211\241\241\242T\370O\037\237\370:k\031\002VOt\245\026\217\360\207\307\340\371d\250E\257\301\367\253j\247\367-\274\343\232$f\210\277)-\322\352-\027nS\232\210\212)QB\240O(PJ\200*\005\007\231\306 \245k\245\322\3559\313$\306\261\003^MY]BV@\361\222f\031\373,\201>\007\342\373>\307\322i\324\3756\313[\255b\225`\026[\354\374&\215\270O\222caBL\237\376d\303.(V)X\025\005 \247\302\300\337L9aX\0070\207a\003\t\204\302w[g\236\263\302|\361\233\240oV\274\343\0033u[C\356\035\002\020\314\314<l\212\342EpEtV^\rB\262Z\206\240l\232\224\251R\350\350\336\355\273O\263\021\354\260\220\026/\365\353U\016\235?q\203\006\210J\250$\250\037\031FT\301\237\231\305\364\372\275L\335\373\204P\250\024\312t\3124""\257\226Ce!\031x\372y!\262\335\352\267\262nw\203\2378[\224\261\035\016s\242Wn\227\026;\251\275E\314\304\260&\264\274\352\320\006\352\317X\010\341\365\265\266\017\263WH\340\201<T\266\227<+\206CW\034\301Vk\357f\035\264;\t\315H\360/k\331\025p\2701( \247\357\317B\305\313Y_2\334\2674\350S\376\017\237\272\236\204\223\346\363\367\365\256\247\0213,\231z\205^\207\202|<\264\267\014\r\013\265\332\276Rp\036U\210\225\034\357\326\366\377\243\322\365;\263\325=p\347\017\000u{\373\271\307\316\322T\rI\252n\371\236%0F\267\263\317\331F\352\210cA\034\341rg\233*\002\203\266\352\374\242\321yj\024\240\252BR\221\356\3749\204\374\026\253\242\211@\207b\016\350O\002P\354\273*\254\215\ni\244\355\372\246\263`d\205\320\334\305\307\022\351E\347\030v\356\302S\332\256\033&;!W\332P0\231(\373.A&\351mf\232_\227H\224^\324\211\333\222w\240N\3549(\330C\304\303$\305\006\311\201\311\025\226\251\3019V\264\375\350\255B\031\232\216\3360\244o\002G`B:\240)\215\316\222\003\244\001\213\200\235:{\263\" D\320\037\006\217\251\272c\202\310\236r\243\n\r\013q\234v6\334\360\010\224\326A#0i\332\331\300\006\230\207*\270\340\221\262N]\3312\256\2529\021\264c\236^\321jFYM\317\216x\337#\361|\252\007\370\312\243\313\253\362\372\225\232\335d*1\245\326\353Cn_\263{\245gX@rx\\\234\323\355\251\027\363Zx\322\016\342\234\240r\217u_\257\340{\373\216\352\034J\t\303<\364\246\200:\000\350\212\350(h.\232&\235\360\360|\257\003\366\343\253\026\260<\253\307\220\013P\261\0245\212R<a^\010\201\301\023\200\217\005\016\006\246\272\233\004f\221\346\266~\n[\235\223\277\337a\n\342\026\3106\003dz\347}\303r\223;Gr=\207\nRx_/\212d3\276\025\244!\005\220\222z\310\374)\001\"&\332\35333\023\016&fffI\235\270\246\373y\205v\t\033\020i\022\330\274\027\215Nv\370z\330`&\010lp\034>\3371\337\356\230\236\257\323\016\200\3171UI\005!\024\220RE\033\366%i\302Jq;\317\036*\006\256\273\364\372\3564\257\016{\220]\237\273?{\027\013\0033,V\302\177)\252\270~\253\351\246L\347:\001\250\300\023(\332)n\272\230\327]!'>s\000X\363\210\247\237\001A\271-\200\215\233\0228\203mR\250T""\256\344x9:9\221\316(\300\003\005\202/qz\267GL\267\215\346\016\347H\357!\372=\246\325%\250ac\206\235\274\217O\316\320Pv\n\tPE\203(~+k\304\213e9\367I\351\023\305>@MgO\3118<\213\356\364o31\362\377\"\007\356\364\305\272x\2012G\300X\347l\357\3679\262}\362\222\244f\240A\320H]\001\007\224\036Py\247\250y\301\274\030`\360\330)\304G,\273\210%RrU@\345;,\351\003\242Y)\330CC\210\272\203?q;H\324\201h\262\240\024\016\206l)ct\342\210F\216J\236J\261\206\027\2068\246\356N\016\252\311\251<\237i|\203\202\244\226p\342\371~z\325\341\037\225\036\266!:0\016\200k?o\321\347p^~\034b\307\014%P\350k\256E\235\026,\325d,\202J\312@Y@YH.\240-\205\262\354\201D\302\200\305\3014\324N\352\0378)@\343\337~\261R\324\002#\021\346\3052/m\374\371\210\303\316 \217\205=\033\226\223p#rA\270\r\310\335pqwx\003K}\351@WV\340\1778y\356!H<\215\306\251q\210\320\260\\&\336\317\312\327\306iR\224D\240\022\212YT\272gE\032ZJ\314\254\177\017\265T\253\276\231\204k\260\272\ro\206\357\337p. \270\027\004\\V\315\033\025\323\022\022\nq8.\374=\003\001\224n\362\315K\326\231\032)[\t\002\233Sh\232\211\232f\016a\253\361\364\223\260\360\300\315\361Q5\006\021\321\034\370\240\212\203\221i$\362n\254\305\374\266\225\253E\224q\007;in\364t$$&H\314&&\373V\na$yB\225\3042:\337\315B\244\253\237\235\005%\032*\211Z\2652\264\307\224<\035\216\340x\204D3b~!\010yo<Q-\267\275\355bj\352\353\275\337\2408\032z\310\034\351\033\t%\025\321\356\037\204\\\217\325\356\320\302\004\220f`\031\200\221=\371\211K\233\035`\347\260h\226\013\027\365\257f\233\010Sc@2ym6%\353\261kuA\231\221\215\030\360/\357\223\274g\\\335Br\025\005\302Lh:\231\331d.\276W\261\342~\307\341y\177\243\017\325\374\306\346\217B\375\337W/w&fI\252\363\2753/!\270\273\210P33.yo[k\332\257\347\253\240\341\2151\032`\226\270\220m\t-\204\222\330\004\274\300^b\273\265G]\302\243\007q\214w\264\260\214\314\254y\\\260\261\311\224\307\002\214\332@\221\"(-\241\263b\014F9\242\311\251H\201\216T4M\336Yx\\\313R\245\303,Gc\257\343\260\360\317r\035?\007\207H\222?\350\254\204\361\227\266a\232\305\244\252\202\256\254""\205\273tn5-\234\225\342\340\273\034q\307\034q\331\365f\337;\312\365)m\265\255m\333\236fNx\217\235\346\3177\351\033\373\373\373\3640\343\0313\010A\303=\317{\336\367\270\006{\220m\341\316\326\336\362w\002\370\213\342E\364\002\276\000\257\202\276\225\376xN\264\027\346\313x\362\247 \013\212&.\347\010\343\007\2430\300\347n<%<\376\306/\210v\2436tM\313b1\3222\323\331\364\373\006\263\321\032M\315\013\357\270\027\213\311%xAz\360\257\023i\204\275\024g\027D\234\206-\214\314\313S\313V\023\221m]Ajs\032.\262\204Y\002\312\262YXT\373\0265\036\234\305\235=\025\2720\214\001\201,\002\301\317\021\327\326\341\345\234C\217w\241\316\016\350o\357l\270pF\250\352\352\027\276@np\013\324\275oB\361\274\016\001\341u\014_^H\376\030q\016:\367Q\264(\207\300\365\352\234\236\003)\006#\262\311\307\210\034K\006\321n\235$\352\324`\263\212\024T\013\355I\005%D-\253Wc7Q\345W\030\030\"\005\016\006\330\014k\003\rk\017\213\274\024\242\317\255\\\227o\331\371\2471\347\243\341\r\351{8wx/T\206\276\355\272P;=7\001aX\257\367\320W\010=c\275\177\031\304\025\252'=VjQ\316\334\372\210^\337\332\313+Y\323\275\2130{6<\177/\036M\353\344\355`\350V4\322\264\224\346fc\225\313\240\346\\\213\234\373\231cg\351|\274\314\303\356\272\364\244+}\003\006\001\334\224\275\217\013=-\243\031\347{\310m\371\2154.e'C\226\"\013\304m&\031\215\375xV\344\343\300\317\353\325\206\203\260\275\307Y\216\375\027A\273\371\232<d\037\020\267\310s\240r%\030\205\332o\235\224\256-\302W\036\241\273@\037\"\317\035\371\227\n1Q\212\214XF\020\222\020\351\305im}\300\343T2\343\272\365\276\205\027\324M\337>N\215\247\tg\207\213\274\244\362\226\361\274i\276\357DRe\333\033\304\253R\023gj\261\2276\205\215\350/\276\034\340\307\235\\\375\003\203\0278D\267u\r[\250a\020F\352_l\336P\2230l\305F\263\360w\036\017B\246\254\251&z\004i\211\033\022P\314oy\004\316\027\3646\035\366\321\232\274'B\227}\253\273E\353X\210\203)\311\365':\016;\366\235\225\231\205\2368\336\013\202\345s(0[\313\036 \333}a\355\033\226e1\224E\031I\212\326\352XLh\220V\035\311h\206\307L\365\320\2262\223\266\367""\2668S\234\2476\366\337\366S\262\335b2YKL\350A$\3757 \235\220\267\341\320(\025-R;Q\317\211\026\255\202\251U\234\302\275\246D\231$\\$\005t\314\230\245\020\242t\031\0327\337\322\025\027^\230\253\245\230\313*\212\354\351d\214X\031/N\021\001\203L\005\036\\\224@d\222\352W{`:ns3\014\322\006\245\001\314\327a)L)\265\336\356\225\030/\021\266\333m\266\323m\366ys\327N\037\313\253\220\347\266%\032b\027CDp\244\215\301\324\r\235\253\267_v(\343\020&g\177\006~\037\002i\014`v^V\014\267q\014\311\204\nR\210r\302A\2724 \274\005\364^\253\337\236#\036-\353\030\257<\306 H2\004\"D\017x?!T\367\320\017}_\313\004|\240^\220\227\240\227\243B\354\233\033\006\306\323\247\025#t\311\311\211\2716\262xtz\323\243\034\261U\020\027\204\327\026\027 \n\025Kp\211JBx\325N\302\227;-\316\335\027\027Z\006\204\341\027+\307\362\037\312]'\004\016\322\276:\265\017\242?E\356\334\332\251\240:\243\252\031\206\375\331\232\032\363\016\202^\032\224\265\201\3417\002F\243\003\262\007\001\307\217A\\\361\324\354\211\202\247\276\242[9\325\031\231\236aK\010N\367A`\320(\225\341\\9\310\352\346v\255\221\200\206\013$\003\001\257\027\242C1\322\241<\223\342Sx+\204L\214T{\200\220\"\255\340+L \230\0050\220L!\023!\023\"\362\027Y\021\201l\226\340\3536\370|\001?yA\301\335\302\214/\021z\207r\307Z@\354\271ZB\324x\354\361\272#\256\322/@\261\030\002\274\n,\346,\207\317\204\030\2364+\000<\331\347p\226\213\275\317\350f}D\277\317\177\204R\206P1\261\036\377Y\316\214\336\327b\215\273D\r\350\367\224\327l\270M\335w\343\355\216-\340\235\027t*\032D.XH\323\342\362_L*\222\010\004L@\265\375\351\021\272\270\264u\001\236#\332\365\360^\034\255f\367Dr8\326\310\277\226%\352\352a\363+^L\313\244\341\307\225\234\245z\020bB\304\000bX\221\213\021\026\nt\256\244\231\260\323\330!\215\"(\235\274\235;Y\212\331\205\n&i\312L\307E\035\267^\006eAer\302\313\262\305\251R\030\271)\022\301\243\320\305/\003v\007I+\313\265Y\014\320\325p\205\rV@\366\030\256\356M\232n!\032\254Wdy\272\\\202\"\231\334\033\3411\225]\323Z\203\203\326\270\330\236\233\360=\310\355\324+(\203W\321\027""\344p\302\265\252\315\303\230I\177\220\240h\371h\321\033\306@$X0I\026@~\207\t0\205;m\312\205\214K\317\300s\310\021\222\n6W\002K\261<\304V\325d\205c\213L~\364:\0042\341\016:5:\010N\"\371\205;\354\027\344\346\323}_WeCt\037\231\r\020\230F^\217\013B\375\356\356C\276\t\303N\"\267\366\013B\367Tlx\263\326$\3571;`\201$\244\210K\251Cv\032^\211NG\333\013\260\270\271$U\267\n\226[\301\251e\274\253\267\346\363}B\030W\237\005\331\326\207\221C\022\014\262B\342=\366K\223e\\\214\261\0233\022\325U\343\230V\246\006\221Aw'\305%v,i\307\201\223\252Cc \017#\262^%[5\221\010\315\224\242\007r\007#F\206\345\352\252=Q1\256\256%*JRQk\240\213\226\240\255X\020\340\236\205\010\031\031\256>0=\367\023\354>\303\335\307\215nH2\240\223n\231\010\337\326\265\211WE~\n\325\005U\024t\362\300E\334\327$\020d\030\230\014q\006\002\274\021\277\000Z\027z+{`zK\251\206\236\257]\266\206\\\240\362\362\275 \363\0172PM:\250hgMo\033B*\265b\256\342\017B\326z\3246bQ\013Y\330\202V\002\210#9U<\360\022\023{\230\036\216\322_5\201\006#\022*\200\033\231*\003m\225\314\352\232\374xJ\264\307X\260\232\032=\326\373\001\267\300\215\227oc\262 \026\324\017\213\367\347\313\n\2739\r\360*\205/\206\224j\034\233\315\001!#\030\300\033vz\315\375\362\343\013\004\352\332\010\235.\317\306\273\312\244P7\362\016\0010\344Ke\216\r\014\016\310\254s'\204\004\r\3031\262H4\352H/*P\021\031D\235\022+\254!\241\201\031\341L*\347\250\305\204A\205F\245\010\325\227!\020\366@3\224[\247G\222\254\247# \321\227\020\267\316f\301\334\340L\230p5\313\257\024\252W~\036\250\3636\025\020\236\010\345A\020b<\243H)\025K\347\244\202\354qM\316\022+\237O\325\024E\211\201\210\2579\362 \\\034s\202TQ\224kJF\0143)jN\203gG0\363\007-\300m\223\031\017Y!\277\266\t\210\360\272\246\001p8\013%\340@\350\313(n\317q\354\356\356\356\354\316\356\3672\354\371\3600\347w\316H\021\024Aa\003\354$4\324\241\224\016\373\247<\235\371\271\363\275k\020R]\025\275\205\3430\212\013Cd\334\303\243X\314i\300\253\317[\371\2709\333\340;T\317\033\024\343\206d[m\327\240z;\177\030\330p\303B\250\231\223!b\221&3&""\n\036\212\2644#p\252\231\323\311\322\003\210\321YV\206\350H\300o}\304o\333k9pF(\345\204\240\032\305\027\333Q\345c\242\334#r\252\252\252!\263\307v\325\201\234m1 x\343\344I\262\372\322\311CHM)\206\372\242A`l\203\241\006\273\210\332\t\363\253T\022\341\352\361\273^\224K\006(IN\366\361\345\273\000j\267i\320g\247m\310\037\2421\250Al\233n\006\202D+JK!\035\270c\317K\367\\\274\014\001p\350\017)\360\270\364\301\344`\255\0162\003\214Zn\204\245\205H2\260\240\005\006\235\002\236\016\312\0261M\316\311`\352\016\244\263\256\3549B\301\241\302\304\333a!\030&\302\206j\235p\301\211\271\207\002\005\346\224\203\260\207GQE?\242S\246R\213\030\353\366\265X\027\tJ(\355\342\262k\241\265\332j\352Y\030C\200}.J5\236\366\203\231y\236\317\225\351\261\315\211\260\333\240\260\210C`\266\252\227\303\215\335\3359\252\205\3462\032BN\030\276|\355\306\303\024\263k.P\3628N\247T\270R\241Lm\327C\303\335\030\362\252[\210\007jqITjm,\316rB\310\006\245\231<T\317\305\223\323\0077k\205\357\320Hf\204\024\005\232\317R]\376\245\215\360\260K\204\331\202\314\332&\2440\207\024@\365\304\016\305O\\NU}\200|\302\371*\025\013\213\210\210\2355Id\355\353**j\244\201\340K\214\252\033Yy\027\2170\200'\"(\204\331u\"\222(\204\215\032\306\020\345Rb\330\240\t\014\262\225\272\032\3070bI\333\313\233\332\233e\315m\334\026l\323-\014\r\023x<\225\030\036YB\316t\226\304c\315rang\314\315$?]\211i\223C&\"g\010\323\0064A\337\350\332\024\260\223\001\033\013\304U\227&\003\031\325\013\366\263\014\003.\034\262\212\242\261q\353\310\261\332\035\357\312\262\313\023+\272cm\261It\004\347\325jh\032\207O=\346X\244\010\307\316O\016\030($Y\322A\024\377\n\000\241V4\206\021=\317*\025\016\263\202\340J\202d\023#;:i\300X\252\344\341\213\000\252\n\216k\021^\272(\036\361 \273\334\353\0300\344$a3\024(:A\024\\\315?\000<\205\246\201na\010\205\014c\245)\213l\265\302:=\347OlO\261h\207\235\263\352r\213F\303\"\260OX\255\030\203\257-h\251Z\0003\216\0249F\351\272\273\323\214\344\314 \\\332\216e\255\350\354\3238\256Y\035\222\202\016Jn\031`\021\000\211j\202e07\177\247\221""\270\322\303\301\306R\202'\266x\002L\014\2061\303\235+6\362C\263nv' B\2656\340\202\311\000f\216\007\226^\001M%\2725g$\264\336\347\256\307%\246\003S\013-\352\004:\225:\224^\240\037\">4\362!\326\037\031\2378\370y\316\005I\006\235-wo\262\343e\275\340\242\306A\202\274Z\240V\025\202\324\n$\027\273\350[\230\204\302\340f\315\276]\025\026n\205Q\024\221MF\371\327\232i\315Vi\373\230\t\206D\346Y|kF\262P\326\341&\r\2330\023\023\236\341\014\n\006\233\344# [HJO$\267)\324t\373c\273\360z\201\350\374\230\356\345\307L\363\333^)\231r0\200\220[\025\354\t\326!\352\264T:\302q`\254=\"\0036\220\270\350\010\035\341\017\260\214I\032i\004\220@\372\350\033\t\221\236\322\241\307\201e\210L\312m4p4\205\2061L\233\265\"] \354\277\233\342\255\2216c\320\341\215\266xXc\241d\354S\217\213\227e\3264e\344\345\254\330\323\321\204\303\245\tM\266\333cc\242\336\333\317\301\260\235t\265K\205\247N\336\0348-\224\352B\n\007Q\244\270Yc\034\320\246\275\001)d\334\234\2749fq\227\213\2173$\024e\001\220\270qC\214+\266g\026u\210ZB\023W\010Q\275\242Q\304\366=\217c\370\334\221\310\357m\215\357^\245K\3541\244\203\030\0060F\246\241\250jF\004\373\226\333b\231\316\0252>\027F\242\331r\276X\026\303\234-$\217\026\002\205:\tDh\340 P\201\204\316g\260\247\361\325X\331\250\244u\021\240a\342G?\313\323[|\353%qP\304c\031Y\362\310^\331++\337\270'8xU+\245\276c\016\300\211\242\226\210V\222uM[\212\"\225\331\t\350br\317H{Q;S\324\354\017l\2735C1\344{\372gKE\"\302\320]\224\004\363>SDttC\334\017T\r\346Gf\233a\r\324=\331\363y\033Mv%\247\251\354\322\320<_\023\301\036\034\001\341\301\014\r^\216S\215N\265\225\254\247\027 \313'!\014\224\356/\230y\314\230g\352\202J\260\237A\221\207\030\tR\0045\3256\301G\266\2548Y:\243\210m\266{\276;\351\310$\256@v:\341\010\337\266\355\376\322\337\334\033\215\333\216>2\332\022\033\007\210\034\000\211\021\360\036\304\247dx\222;<\373\367\253qn\267\335.\230n\251EB\213YJU\025E\n(\313\261\003\257\232\035\277\210?,<D(\023\302#\022\010\301A@EA\214Y\001\234)$\005\212\037\236J$ \237u\220\204P\221\237$@\362\204\220'\347B\001""\335A@PQVE\222)\026\023,\213Y \262(\214\017\t|\010\000'\371>\270\340\001O\227\361\376K\004\353\265\207\351\021\022\021\020DA\021\" $\210 \236\237\324\022U\031\222\037XC\020\304-\220\325)1\201=\223\363\030\024\370\202\010\202 \211\006\002\002\007+\027 \027\362\342X\252\237\221\254\311\255\243\227)+!\201\243\004\3764\236\324\005\000\021\000g\322\030\000\203\002\364\254\204\207\325\022h\311\226\006\nc\022\025>Q\214j\307\364\007\343\361\217\304}\202\350\005\023\363\212\315\224\001\242V\243R#Z.\222?\323\003\020D(\261\010T=\014*\300X\252\3203\204\023P\001^\271\366~t \354\374\224q~A\351\201\013\324d\203\261\231\363Y\t\203\003\177}u\353\t\235\n\275\266\251\204\342J\007\000\301\266\3411\216\340\203\272x=!4\036g\214\220\373z\030\313Tt#\273\221\013\375]%\302`\022\220#\005\211jaQ\277\357\310\027#C\000n\261,\000\232a\230@]\225D\317\350\022/\200\203\342 \372\221\376\214T5\372\212\005\331\354\220\233b\"\027\030q\201\210\261Z\016\005\"A\211\020\200\316afK#\030d\313(|9\232@\024+.l\224il\022\212\271\004\030\317t\370\317\344\207\327>\261\365\314\037\206\354\023\253\223h\214\007C4\210\017\243'K.\363\346Pp\340Z*FQ\3034\265w*\010\013\220s$}N\317\330\0178\031\373R}\177z\022\303\317!6_\315\210\023L`y\363\275\026]5\235)\024\306-g\205l\370\272rE84\314\026oI\201\271=`:\247\375\274\275\303\330\034\232Sx,\227R\t\3771\340\376\336*\373\004#\222\255\317\245]\001\226\005\234\202\255\021\020\272\205\224YF\3439\273n\322\311`9 T\311\200\307\311\361\277\t\331\236\373\323\232\177\323%?\330\354\022J\306U\270=8\0028\206Bg\250\0041\323\352z\226k\255\351\025\364\224\\\316h\2748\253\362'R\326W ,\354\326\031\313\331I\n\021\006]<a\306)\017\021\017\014\377\023\361\032\366\314pxOq\214\017pQ\006X\305M\022J\201\374\350\r\3667\326w\004\014\365\366\027\037\375hi\275F\\\366,\211O\030\356H\242\031\003K\004@\256\304\312\326\030\230\302\312\005l?u\347\243\370\317J\025\027\242\332~\201\353\232\211\364\300\266\010\364\273\252\300\310\356\250\033R\207\004)\260\225 %\0200)\236H\205@m\002\276rJ\201\233\275\367\213\210a,\014""\032\031$CFNC\274~s\274z\353\271\337]\360\375\341Z\n\252`\312\006&w\306@\216\367\364^\230\230\3756\244\272\204\313a\214^6`at\r\016$O\343\231)v\021&\232OD\034&\016\344\301\n$xa\302\242\204SG\007&\026\277\327\260w=\271\230\355\301\333\373Iw\017\204,WZ\"#\374\315\3572NA\365\234\017YK\347\331\223J\273\n\305\364:\352X\026D\020\240\030r\004:/\234\n\301#\352\031\260J\322F\t@`\211\315f\030\342\324#\021\022\016\247\217\014\227\364\007\343\367\373T\375S\261&\3205\366\373\342\306{\323`9R(\200\226\303\244\235\361\316\311\364h\372P{\304\235\211\20558R\206\233\010\013\021\337\2430\271R\274E\n\022\004f\006`\332\205\316\302\335\302P6\002\0240\2230w\014\206mi\305~B\201\327\207\351\2050P\263\024\367\316\355;}\331\243\207\274w\013)Y\337~\002\203\257S,\343\nL\266\327\034\0262\0204Q\021\222\227\274\311\2400\014on7\214\006D\204\243\005\202R\326\333\0363\267\307\362\276.\313N(i\250\234\262=\346\355\272=\313K\255\335\313\223\223\006\263J\211iH\321)a\003\0316@+V\210E0Q\364\311$\203$)\234\306a\232\250\201\241\004\325\266\272\351\305\372\216\325\370;\274Gp\317\030r~\201\327^\376\303U\345\272<\307\225\260\300\233\003\005\231\326\016\216);\342\250\353\210\220\252\331\022\343\025,\203&\005\325\256\203\rc\265 \310m2$,\271\037\363\357\376nG\274qx;\274\206\335{\346\336M\r\272\235\374\233f9{\360\3312\252\351*\022J\305\t\337\026\010J\271\025 JE01\022\275\006\373\315@\311\227\315\302\302C!\251rT\2502o\201@\3037\333\375\277{\3565\376#\372\177\233\276\321\2068\333\237\004\275\322T\236\370xg\236\025\026\331\341r%\244\036\370\210J\177\242FWO\215\215\363`l}lYE\022\211\013\222\272\301\320frQ7\230N\317\027,\360\rO\000q\311\355\362\212\305\356\301\211\267brbX|\034\246\036\376\311\243\232\271\014S\004\030\030\022\335O\006w\212R\022\320h\350\334\332\024SD\260lq\016\tS1'B\027\275\350\370Pw\373x\307\024\225\203\021\223\277\313|\315c\335\224lc)j\230\241\260\3144\264\345\022L\346\005.\261\345\270\230J\006\261\n\314-\321n\t\203\t\250\030\224\322v\016\311\311\336\375`\237o\216,pw8\370\3363;\310\347\032\017B\014\350""\365\227(\230\230\322O\004\364}mChL\311Q\200Q2K\n\303y\205f\205\007\272C\030\346u\274G\226\343\256v\t\307\332\357JB\376\206\014\341\364\250\202i\247\340\222\0306w\330i\323\236\004\251\006\335O\307\013\305\202R)$%\334\322\201\322d\200*'\352}s\267\352\247\352\234\336\257\260\275B{\354\357\367\316\024B\276\304\030\245\234\205\340\031C\001e\321,\235\225\340E\222\250\234\264+\"\356\223\330\355\243\326\365:UN\247I=0\\\246\226\247\252\212ZTz\214\264\tB`Z\265!\315\340\302\336\261E.&\344\250.\237\257\323\263\342.\237\255\336u]\310\356\235\334\207\0213\336\235\260\344\331,sj)\235z\300K\207\261YIh\371k\250\316OL\014AcJIE\334\322]\337c\275\351{~\333;\271+\277[\210\237\246\240\357\203L\202/\237\\T\017\005r\360u\252KA\340b\275S\030\224\265EL\260\226;Q\330*\350\311\354ho{\367\217\265\375]\271\367\023_?\311\367K\r\260\212\3562;h\202a\361\276\344\357`\275;\305\213\274\340\236\305\321P\272J]&H\336\271j\363\333\366\237\271\350\302\356\212\217\253V\202lh\355\246\346#\010\203\274\"\024\223\360M\260\"\240\356\242\321\t\214f\264HI=\243\367C\352\304v\273\277\001\3341{\226l\007\362\265\"L\006\216\364\021\035\010T3\273\356\354\352j.i\263\334\360\007\273N\271\017\301\326\001\353\313:\232F\032\235F\354\264\347\031\3162&\371\320\245T\325\227\333\245K\325\365\376\037\177\334I\304\007t\366p\014\366\246 \366\343\266IS\254\331\031\016\252Nbl\216Y\266^\251\367\306{\307S\340\016\256\201\324C\373\236v\373wh&\311A\374\355\027\3342p\031\233\020\024.\337\270{'\374A\003\021?\007\367\316\306& \314\313\3246[\330t\006u\216\273)K[N\274\023\016&d\347u/k\363\317[\264\273^\315\220S ;q6\252$\030\301\2461\346\363\300\222$F\317\214G'7\200\017\0177\205\343n\305\030\021\371\037\0349y\223\223\327\316\0364x\307\016\346=~\020\361\374\014l\363yg\310zd\363z}\351\322\001\t\376.c\322\345\314\314\031\350=fY_\311$gjt\206\202\357\331$\344\006\022\332\244\337\232|B\355\007\323\356}\317IW\321\272\352\207r\345\320\357\364(\030\367,J\236\342U\034\014\2719\364~w\240\376\227\323\363\353\211\247\273\253}\262\262\037AP\331\311]%\240""\255\330\232L\006\310\236\330}>\231x_k\342\314,\341\264\341A=\270\343\r\246\317\354\303\367\251\256\204\327\001\366\276\357\303\035\311\340;\341\356\306\345\356\362\273\023HAH\314\236\343\304\343\320r\256E\356\035\363\224\367\342\371a\0069\266\273X\274>\327j\312t{0\356p\230L\352\r\016\227I\341\"\007O\203\354\372z\341\307{\273\006\325\356q\214p.\036\036>7DA\n(\340}M\021\020\316n\317\020\216\337ln7\034\036\3068z|'\024\034zQ\304||<\004\023..\343\321\302\341\031\360tf\377\314^;_\n\370\203\202du}yI\341\247\263\246p!\354\322\202j3\340\367\370\247\007\210\234\020C\245\354\017M\305\336N\023\331\027\216\316w\325\306v\337\362w!\001\016\356H?\206\n(\235\006\027\213\213\207\203\3625:]\236\327\365\231X\374x\233t\323Oc\260t\233\301\322}\000B\347\005\365\317\367}n\200p\360o\254\343\177\255\327s\336\020}\362\037_\264\336\323\035S\347\366\234\311\216\272\335\333\r\274\254\216O\243\315\r\3422\">\241\324[{\214\262\371\016\010\030\001\274\336M\326=\033\271K\303&7\031\275\360e\346\365\344\333\352z\030[nd\335B%\371L\271r\355\216\3309Co\231\215\240\33295\272i\315\245\324\377\006u6d\235\306\375\212\267\324\245\212ym\303KT,\376$\276e\271OK`\037\324\300O'\222E\202\200(q\372\260\364\275\340\347y\222*\252\305D\367\262\253@\311z\0146\353\233\032\247\234\320\315\327%\224!\005\326<\202/\212y\266\032\327\312c\302B\211\333\372vT>\215\217o_\227\272\347g\374\336\245\260x\027\263\244-\346\370\217\316\315\364\373\200\341y\325p\365z\227.\003W\344\274\214\t\272\006\220\363J\030\\\305\366g\266\321=\363\234\346\235#\236\3678\217\002\031\034\236\034\245\305\314\0322\307rs%\342\355\304\247\303\2233{\006\347&\263\n\331\362|z\253q\235:Tt$\262\246\037L\310\227Y\006\220]Y\245\226\356\352#a\351\257CGWOh\215\327\232\262Cq\326Q\025\024IS\267D\2249\230s\231\267\263.\013(\233\333\275y\231\267\260\025\027\036?^\275zsd\352t\236\266M\306A\231\227\325\333pF}>V\025d(L\357d\321!\353KI\331\236\262\244\251&\224\225\272\225\236\330\313+_='\032N\361\326j\240\236U\253\232\252\212\2302e\220I\034/\n\271\272\310v\366\025\267\232""\343'n6\315kk?T\027\314*\021c\005\267\252.\025\222Z\276p\350\201\347\t\031\252LtI\220I\021D\"\236P\352\242yn\213\240\3332\350\275\207zC\235\322Y\265\206\032\026T\224\014(\213\262\224e\303\267t\320\355\267cJ\210eNUF\304\\n\023w\003f\007\213\261\316>I\006Us\251\233\207\220\341:4\363\203\242\331\274Hna\203Na\211\274\t\010\222j$D\021\020A\021\214\030\315\031f\0300\351\245\214\222\r\030a\002\200bfLR\211\014\010\010$\240%%\nP\261\270\333\264\332\030@\303K!\325\324\016*\213,\221a\203\n\024\233r`m\301F\351DV\025;\254\234\314w\271z2uI\204\\82\263`\331\251,p\342T\267$\341mV\344\320N5l\333\027\306Kq%\250eV\275\275\306\306\235\"\344\346aW\252\355\362\362\246\257\231E\201$\300\234\262\262(\226;\3417zE\356]\023\245\342yr8\314\311y\014mC(\262\215Y\307!\312\251\270P\263\216&GP\3565\036vi#j\271K\262\216\245l\000S\303\246\362\346&]AKO\311\224\227^1\034\230:$\244\343\021-\t\361\204p\363*\323\353\021\021\\\205\202O\\(\270\257\266\345\365\336q\315[\210\344\324\360\251*\362\010\227S\017\n\361U6\333\265\204V\336\231\311\263\223\234\323^mEDmr\311\210\035\334;*\312Q\014\210q0^LW.\345\3460\337\023bk\242\234\227s5\344GS\311\231\347\013\347S\306\233\236\221\233J\250\322\312,\242\010(\2261\227CP\035O\024\252\223\227\267\262\254\302\177\207\341>/\255\362j]\177\177\214\337`f\261w\315\2477\317f\357\255\003l\355\265nI\2322\247[\222D\225\251a\353\016\331\316)G\023\231\235\233\330`M\364\035\363w\377\027rE8P\220S\352\211S";
    PyObject *data = __Pyx_DecompressString(cstring, 10315, 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 (10996 bytes) */
const char* const cstring = "x\332\355|I[\033\311\262(4`3y\220\301\355\241}\372\225\014\030< #\006\333M\333\356'#0\270\001\033$\214\261\333G\247\220J\240\266\346*a\340\364\271\347\254\356\247e}o\245\245\226Z\326RK-Yj\311\222\357\375\202\376\t7\"2kT\211\301\355\276\367~\357\335n\\\312\214\214\214\314\214\314\214)\263\352\356\330\3304\376\371G\365\004=t\000&|c\376\373\000\006\200\037\377\037\237\230\234z\364\370\311\017c\376\207c\343\017\307\307\306\375fJ\030\303\377\036\371\306\246F\307&G\307&\232\227\254\205g\356\023\365\346(\324\350\330xlt\010\036Czb\332x8\262\276\241\261G\261\023A\367ubc\023\323c\223\323cS\372\257\217\265\356\310\262>p\030\313L\306\220*\376\371\374\3607\216\377\220%\372\357c?$x\332\004\001\033\375X\340\347 \277\005\033K|\376Q\370\275\017\377\004\206\211?\"\302\005\3573a\024\023\370O| \214\337\025\236\t\310/\230\2401\366\013\177\343f*\254\367\327\005\304\207\345^\362hl\354\261Y\"\270\261\302\245\330\204O<\232\342\277\214\314\372\324\370\350\243\373\343\023S?\214\342c|\222\255'\375\227\321\365\217:\362\226,\254\305\261QG\336\236\365\2176\313\303,\373\036\307\205\373\243\201\0273\301\331\271\227\363\013\257~^\\Z~\375fe5\024^{\273\376n\343\275\270\031\215I\361\255\355\304\257\237\222\251t&\233\313\313Ja\347\363\356\336\376\260\257;\020\215JYE\236\026,\311\341\215\341\007\302\360\022>\326\361\021\304\3076>R\370\220)E\317\002=\323\362p %\345\023Q\361\341\262\3649\262\221\311\177\n\310\t\361\341\317\242\262\235\022\323\261\002\345B\333bzk[L\004\n\262\222\027\223\000Y\314\344c\221\371\314giFL\2473\212 \306bBLJ*\242\240d\204tL\314\347\305\275\017C\362G_w\250\220\315f\362\212\024\023\362\222\234I\026\224D&\215\035M[z\301z$\033\335\334f]\367q\342\321L*+\346%!-&v$\001z%\210\2371\037\023\025II\244$y\272[\020F\215\254\037\250;k\262\036\311\302\347\204\262-\304\022\361\270\224\227\322\212\220\224\322[\312\266\354\243\372\200\342\347\220i\301 \220\336\221\362\212\205 \313;\262D]\210\3473)\243\027\217&?8\220t\2668I\017\311\303\304\265Lz4-m\211\n\0162\236\314\210\3124\342(b\"-\013\251\014\214B""\201i\0202i\030\270\024M\244\304\244\220\315$\322\212\357\014\364\322\031\030\374VB\221\205x\246\220\216\031U\363\022\364\232\272.\024\344DzK\210\302L\303`\206c\321\244(\003\275FD\034\243\023Yq\305v\301l\216\310\026\221\003\333\321\013\230RY2\246\204\347\370\250\277\200qg!`0TNl\245OI \261\013\213?\233\221\023\212\276|\277\204\212\255\033\006\265\023\t\330\232b\263.\210qE\312\363\205\360\245\225O\315\310&K\316\025\3276\254\263v\366\230\312'w\026\n\244-)\377G\346\335\205\304\027\315\374I]9\305\334\033$\276l\366\315\352\247\231;\003\373\324\263'\345\343\231|\nuF\002\265\001\214\352\313\005\264N,UH*\211l\022\024\331W#)\0276A\333E\277\234\036h\277\031\022\3122\222H&R\310I\340X!\215\211MI\371,I\351iw\255\354\373\277\377\376\177H{w\317\346\363\031\340\356l!\237\311J\017\203\205\315d\"\3153o\304|B\236\335\315JQ\240\347\037\r\352}|\000\223\"+\222\030\023\266`<C\261\321\030H\3264\366\002v\001a\370\364Z\260\250\020WLG%!\023\007\031\316E\273O\331O\244\343\231a;\251\341f\325\322Y\237\251\370\316PI\327\211\026\255y\357\343G'\001\013\"\330\024\303\276c\010\032:\244y7\232\365\301R\365,\235\030n2\006!\2237\313N\242m!<'&\222\270Jt}N\026\216\"\246\262\306\216\003\317D\210\212\260\312\240\026\025\373N\256\223\314@\r\227ZRl\032WD$\226\330\211D\245Dr\304\r\030\201\335\325P\020\313|N\273\002]\261\245\035)\355\nt\305\006\221\236\311\273C]\361\013Y\027\220\025\263\033''\022\317Gd)j\240\232\023\026Q\366\262R$\272-E?\031\205J$\rR\000\254\335})\242\354\033\204\266Sr\334I(\005\326r#\007\r\250\215S\006\324\306\021\003j\037\271\001\266\014\220`\251L\314\000<u[\201z!t3\242d\"\005\331@\267,E\313\260\027\322;0\324\030\225\356\223\306\023SL\306\243 B\207b\031\240\313\031\2054\021\030\300{\3126\010\265\204\214f\177bS\312C\323\311=\001\374\203D\024E>\251\2537\263oF'\237L\222\346\313K\277\322v\001\251J\326\234$\343\376\333,$@n\247\005\354\210\354\023\026\342\302^\246\000j\013\364&,\332,\340Y+(\333R\032F\244`B\030&iM\342\036\307\001\006\3430H\345<4\202:\010j\317\211IY\362\275Nc\267\230\023\"\013V\021""\316\30404\376\301\325\031\371\350\330\243\300\n\337\0331\232\210'\242\017\003\331\204\370\006\373\004\374\214\3463\262\034Q`\277E\220l\204O\206^L\013\017\3444\370S07Q\0338jh\007\033xKJ\023?m@s\252\254`\276|\335\t5\254m\263pO\216l\306a\025\245\225m'pO\022\3636X\"\355\202\010\300\\A\004\277\316\304U\334\272\2414\216F\211\200g\231\310\026\222v\240u\267Y\300.\275\007 )'\035\220\2203\021P\245\237\374\330\317\010x\246\226\002]\342\351 \222\203\344\221\334\021\266R\230\320Kp_\351i>\207\221\230\342\312\\[qc\007\365b\347\310u\270[KJ\354\330\226\250\270yK.%\205Tv/\"o\203\367\253\203\310l3\030\301g/\222q,\003C`\030\0000\252$\002\221\241\335\010\006\003P\007\"?]FA`'7\010\330\330q\253xr\247\324(\274\032J\217\253\351\332\021VbP4\270\301\026ZD\214F%Yv\000\033\3500pc\267pm\306L\211\260\227\212\241\002\211e\234\020X\256\016\210e-#\004\270\r\220\220\004\243\213\311\002\010\354\202\004\206\257\254\200-)\304\023 \316\244\007\206\254\nmg\nI\020\273b\002l\365\325B\032GI\246dx\033-\364}2\177D\020\265\237y\364B'$\232\206<7\355}a])d\342q\024\277ki\331\210\352\230\234&\201\nm\307\206\301\370\317[\247\312w\326\n\334H\265V3b\016f\030\211\311d\301\010~m<\020\226\036\010\353\017\204\340\003a\373\201\220z \310\360\204\177\005\370\227\226m\344h\177\360\320\004\366bd\371\315F$\030\010\317\206\027\226f\327\226\027\302\202\004(w\205ak%\023\335\t%\356\220\252\304\260\033\376b \356\003Xz\317\205\207\323\002FH?bT\364n\267\360\354\271\360\223\357\2010:\004\226\277 b\0145\026\003\341\247H\272\0031n8\020V\033\014\344^b'Al\333\334\023\366\245|\306\3474\321\216AA\023\344\204\342\023(\240\271rB\361\t\024\310\2649\251\374\004\032J\276\220\216\236T~\002\215B\366\330\302cj\203\325\345R\002\263\250\360=\003P\303\322\004\223\313\026\226\034\2376\275+0\320,\311\340GKf\311\232Y\267f6\254\031Q\266\346\342\266\334\2665\223\262elxi[.k\313\r\331r\266L\001r\n\n+\364\2221\3622,K\331a\360-\310{\006\t\202\226\242\017P\300\0304P\342)\305\211\")\321\207\240\202\371\317\030\377\275\257'F)\001\273\r\245\005hq\314(Q\374\331/$""\013\017\004\211\374/\330\177\361\014\3109]zI`h\201\3719\206\336\227\377\001\367\177Ydv\370#\377\245V\250\005\334\250\030l6\254z\2304\204a\024z(\365p(\366phC\377\025\206\342\276\241\320\350\320\322\350\320\274+\354\275+t\337\346\034\270,\037G9\210\267BR\021b\031\260w\221Yq\2206`\243bL\005\306\372hrt3\241\330<\213\343H\262\3623\221l\262\317\035\345g\"\331l\343;\021\316D\264\231$p\"\234\211\250\253h\260\225\236\232\234\273\254H\201\226N\025R\\w\233\373a\213\"\340\334mJ\211\273&\022\250\n\250T\000\377\342Y*!S\\\334\251\006Qy>\265\204\020\236\373\2047II\224\204l>\263\223\210I\344.\375\r\005\030V\372[S]\007\006\001b2\335K\333@\346\312\014\374#R\230>0\254\362\222\217\202m\374\314\203\274J\212\003\246P\037Z\321\n\310\210\006\014h\247\240`[y1\275%\371\204%\276s\231\353\010\316\032\017\214\t\037F\237<\232\034\033\363\371\350\347\2430\"\355F\223\005\031\344\301\335\257A\303G\3660\332T<\200<\254d>Ii\247\2242\260\300\030j\206s\027\365{\026\374\014\020L)}\211\014[\247(\301V\213a4\020{\221\273\017\320\340Fs\356\231\236`Bj\304\221\005k.\2178`\270=sX\344\3236f\010#\262\002\226}#\3220\326\0356\004\345sa\314\031&t\251\202\244,u\236\235\246\222+\213l\356\302I=f\254>C\177y\205\263\364\366\230\351\224\363\321\207\321=\212\241\201\312I$e_v7\346\002\334\033\206\255\030\375$\273\037r~\321a\254\013E\nS\240\255\330\264\344\354\315X\303\221\3264X\004\326\354\220=\013\212_IY\265:\250`1\035\203\236\300tfaFasI\022,\331\315\002\006\307Y\304\333^\303\024\006b\022]qE\342\310v47s\001+\201\n\207\247\305\026q=+K\360XV\024\274_\221\242Q\303\372I\005\270\026\303\037?Z2\326#\014\2370s\022\211c\017i\233U*\244\271z8U;\002\255\311\010\370\000\317\206\231\263a\366\026\245\006M\"\372\033\350m\372\336Cb\001\022\302o\202\031\272\347\016I\363{\005_r\343 \220\315\007\n[3\263\341\231Px\206Nf\203\320\240\231B'\221\345\302A\376\013\220 \026\351\305A)\032dgq\024\233\233\2236\347\362\t\036y\324}L\362Q_\211\351W\205\344\253Bz\361\365L`1\374~)\262\024x\367z5\270\260\034X\\\022\363K\342\336R&\275,\206YLr\347uT\211D\336""\354\355\302\277 \310\377\310\262\264\253\254J\361\325\327k\313\301\310\314\354\302\342\302\362K\226\231[|\375z\225%\347\003\213s\221\340\353\365eKv\366\355\2545\273\366&4\273\034^X\236]\014\211JH\312\206\n\351px\273\200]\r\353\021\366p\276 \205\013\322Zx\346\355\372\272\024\333\320'Dl\316IX\372\250<\363y?z{\250\227\203\370X\302\307\006>\342\370\330\306G\202\334\016|\200\343\217?2>\n\364\374\374)\266GJX\224E\031\243\016\242\274\227\216&2>P\276\260!\023 \3106\305M)I'32Z\227\321$\0001t\207\347Z\322\246\030\375\024Me\243\231BZ\2114\211bF\225\030\027z\374\307G\262/\026\363\307\306\221\254\276\346\314-\031\023\367(@\310\302\211\022\354h\211\005\230l\020\0142Fl\321\305X\214\037\323F\300j\215\342c/&+1\370\177\034\303l\340N`\200\021\343\204\314\263\240(\240\237\236\343\364\234\240\347$\240\245b\310\r)W\000\257!\237\227pA\311 \252\342\260\3012y\332\264\217&\311\344D\317\001\325\253q\\\202\031p2\342r$\022GG\222\236J&\223\224#[\222\022\241\340aD\337^\004\3227\"\270\023\350\304\260\220\"XsR\372s\"\272\275\275\355\337\036\337\336\216\240{\201\032\234\264x\"\201\233;\201\203\200\232\264\263\301\233\212\030\263\206\0310\337\262\030\326\204\366\362zxS\377\005\266a\022Yh\tp\242CFAP\340&`\350Y\324u\320\235\255L>!b\200(%\177\372$\355\321@\214Ph\0220\363\311|\001Z\213nK\021#\225J!\317a\371\301\034Q\320\022\014ST\312\220\221\024\221\202\362\220\004!\217\213\207\254\025KRN%\222\311\204\221N3#\226\233\262@\031\r\344B\022i\321\342\210\244\362\231\210\224\006\226HHTN\355EP\366\361\0374\276\360@\"\022\261<\251\333 \220#\354x9\r\276N6-\203\001J6hf\023\317\033X\300\n7\317\370^*\206\227\226\022\250\253`\\Y1\221\227Q}\211\262\335\020\264\032|\331X\026W\266n\332e\343\211\335l&\033\211d\363h\027J\230@,9\253di9F\262{\372N\2002\020HQ\230\306H$\247\344#\030.O\262\336C\345$\354?0\025\340o</)\205|:\217\307\345\364\000\013_\346lcO\370\001\226\3400XuH\201`\021\301\306\224\241?2\374\027\211\303ZR\024\2772\016[\004\320\250/\270w\3401\256\304&\224\330\244\022\233Rb\2170\214\254\304\036+\261'\021\266\327""\3313*\312\022\337\374\216s\t\013P\017wZ@f\250\323\025\350{JKL~\3563\265\204\211\330pt\321P\324H\336rla\007\221<1!\272P\261\203\364\2207\003f\366xB\261\034\317\030\240\206n)N\006(\2641\3709\206\001\263\236b\030\300\206\201('p)L\261q\035\225\307\2251\313E\203e\274\r\207\037\006\330\220\014\0040v{$\035aR\212\301\311Y\245T\223C\017\227B\347x\234\007\036vhc\013\216\303\016\227\302f-4\300\315c\016\312\323\256\216\360$\036w\260\264\363\260\203A\215\243\016\236\265{2N`\"\315A\216C\016\013\320>~\307\001\207+\3209\371\346\304\273\237\2034\226\2715\340<\003i^\322\320~\320\211\3338&;\374d\n\315{x\014\037t*\326\363\027\033\310\321/\347\331\013\003\223\261\302\255\032\2469Y\306<p\261\345\215\335c\036\266`g\351R)\205p\215\256[f\3000\036\010\265\220M\022\276\262o\230\tJ\n\234\033\324\374\360\223\220\301\250\201\337\024t\005\177`Q\245hI\246p5\302\3633+\330\343?\260\315\025\240\234\312\372\341\3378\374\233`\212\tL\014\260D(@\204k\023T\244\222\301*\350:\200\275\222\007-\002\273=\243\000\022\327\"\212\014]\002\255\260?\016\246\022\330I \236Pi\020\337\224}\324,H\205\\J#\346Z\220ao$\300 \202?\246I!a\014\023Z\247\016\320C\376\214\014\346L\006\313\024\376\"\211=\022S\310L\3707\016\275\332\333\333G\226\350F\023\006r\337lD\026_/\277\244G\313\027\377\007\206\277.6\365\204p\317\n\r\277'/\ta\257\3112\200d\303\177\261La3)\265\264\000\203\035%\000\021>\370'>\362\324\024$\202a\330}\313\241H0\210\316\211-\273\260ld\347\347m\245\230\265\224.-\330J1k-]\262\227.\331KC\366\322\220\255t\331^\272l/\r\331KC\366\3225{\351\232\275t}\335V\212YK\351\306\206\255\024\263P:\373\346\365\314|d\306?6\246''\215\204\t{\021\010\315\362t0\260\301S\363\257\327Vyriaf\365uhv\346\365r\320\200,..8 \313ka\235\312\322\353\345\360<O\333\2606f\003\253-\3001l\006~\250\r\306@\254\014)\216\275\314P\2269\nq\321\354\003e\315\016,\033\004\226\r\002!F \304\t\204\014\224p\020\030D3j\3223a&Q\035\266\034Xv\242Y\263\304g\007%\2029(\001\314I\t@<\273\306:\273\306;\273f\037\336\232\321\367\265\220\235\233\301p\013\270\277l\316\203\341\2157""\263\221@\310\232\013\006\255\2719[\331\374\2745\267\264`\313-\331r\266z\313\266\334\033[.d\313\255\331r\353\353\326\334\006\314m \334\022\216`$\374\375\353e\230\227\010\376,,\317\275n\211P\360\301,\212\300 #\201\305\005X\245!c\022\220a:\0331\035\014G0\272\216Qu\306\0053Kl0\263s\366Rb\204\231%NX\262K\366\254\275\356\262=\373\306\236\r\331\263k\366,1\304\314\"G\326\026a\324\357_\317\315\205f\303-<\352\302vu`#\024y\261\312\367\025\345\026\226\2559([Y\013\254\206gW\215R\2367\305\356\210\231\274\333\002Z\210\354\264z\313w%\377a{W\275\353F\311\363{wKGW\261S\355PW\324h\311s\330\331[\\P\327J\336\322DI<\354\275\254\236W\013\245@)Tn=\274\334\247N\252y@\351\377Ki\245$\225\237i\255\332\267Z\356\360\362\267j\014\360\037\225\257U\332+\213U@\374\256\364S\305[y\244]\303\014\340\337*\315\225\007\312\241J\353a\337Uh&\016\004\327\313\201\362\333\212\2772\257\275\252\212U\271\346=+\342\002\240\265U\374n\210K5Om\240\266r\004\375\370\261,\226w*\353Z\200j\375\005\306\321Vv\251\263T\365T\007\252+\207_P\343\373R\272\022\250\274\325\036WY\317\004\300\237(\213\r5\352\017\236V\003\325P\255\365\250\275\253\350)z\217\332;\213\255\365\226>\325\217\251\216\342\232z[}\t\323\002\374\237U\257\252\242*\227\274\310\377\016c2\200\377\343\352\252\232;\354\207\351+\315\224\376\001\355\206\264V\344\377\247\262\207\363\355\3625u\2372+\230T`V\372\3123\345|\305S\031\250\254T\242\232G\033\324Dm\247\272R\215!+\021\3451U\375\006fl\242\"Vd\315\253Mj\271\3529\340\266R\3633\224)\032\324f\245\265\322\307\032\325\372\265\025-\016\003\n\327<|@lU\365\364\036\265_\200\301\014\301\262\231-_-K\225)\355\034`\316\325\356\034\234;\020q\254\235j\353a\347\205b\250~y\240\354\257\017>\206\306Z\r\370\305\342\246z\016F\017=\257{\307\265\3330\017\235\227\212\005u\246~\355^\305[\277\377\034\272\2253\321r\2456\340M\254|\247>\362C\365J\325\177,2\321\234\320\306\265\225\323\322\234\256\336\256\272u\300>\207l\334\260\241\212\337\303\354\360}\205(\327\325\0330wO\312\323\300\372\270\026\254v\326Z\177?\327\322\321[|\242\376@\233\n\271""\032\005\236\316\000\333\007\264\267\320\377\366\236\346\205\320\225c\213g`\024' \340\3769\021\005\366\316i\220B\007\255\247Ck;\360\237\026q\342@l\206:\250E\253\337Vs\265\266\332D-z\320w0s \327W\327\352ko\261\302d1Gs'\227\006,\325\202Z\2736\243\3552\2664Ci\203\255;P}\307\306\334\034\351I\365iM>\030\251\257\206\216\307{\252\363\2709\312\217\325h\315\203\013\241\253x\256\270\255\212\207\235l\251\014\342\242\203=\334\34513\025\217\236\025K;$y\002&\240P\236\203]\353?\352\354:\274\340Q\277\205\246\006Qh{\324~u\035\004\204\002\202\2132k\320\205p\331\3032oiq{Y\346\035t\255\275\034pd\256\300\366\315\227\372K\037+\267\241\303\227\200\177\266\362\236\013\305\225b\002\366\211U\226u\253\367K+\365\026\330\322\277\337k\351\350\374\327N1\304\366\363\257\245V\320\031\355B\371|9\007\203k?\377\257}\265O\245]\225\373\275\263\005\366\n\240\335@\315s\rvO'\010D\200\002kP$zU?\212\212w J\267J\260k{\212\317K\036\224\213W\324Au\223\366i\024\244\335 \212\246\303\336\353@\351\302e\265\r*\365\002q\024\214\277\202\336\352\277z\370d\272\352=r\300\236\302Nv\302\00235\377\021\020\367~\025:\337\302\324\302\274\000\337/ \321{%\322)C\017*/5\2776[\245%\320\371/\245\350\347l:\354}V]E\341\322S\364\027_\342\026\250\267\010@\020e\252>rH\214\027\337\252~5\240\206\370\370\373qY\230\005s\245!\234y\275\312@i\345,\225\254r\315\013K\006\333\006\030bN\251\255\252\207\255\354\277\203Xs \343\0142d&\365\230\342\221A\355\240\216j\020\206|[\342\334n\320\322Fm>\001\n\252\017\212\232\026\354V\367\016Z\017<Lc\256\024c\352\010\260\004\027\022\230)\270\3176@y\347\030\240]\235\001\320\235r+\014\202\000\335\264\017{A\177\255\330{~\0336\003c\361#\325\003Zx\016\007\007\333G.\023\273-@=;\204\312\331\235H\237\372\244D\013\030\205\3744\330IQ\316\207;\032\227\226\016\240\346q\007\367i\201f\005\304\240\257Nj\025\006<@\334~\244]\321\374&X\341\242k\016\264q\260\332j-\230\244\t~\013*5\\\355\257Z$\350f\251\275\024\004a1S\336\255\344\234\340\266\362c\250\365N[i,xRyVm\253>\251\371\033\213~D\353\305&p\300\344\030Dqd\260\035\366S7\254\263""\233\326\3513V\355\217\250\332\331\372\364\250\003\260\021ZOX\324\324@\277\032\340\272\035\226Q\227\343\017\347\371\nT\357\352-\202T\356.\016\024W\016\273.\340\243\2738\004\002\301\006w\301\031,\212\366t3\034\202_0\250\\p\322\353.\336\001a\333\005\262\363\260\013\215\025(A\031\236\303\222a\354 \014\203m\232\367*Y:\240u\320\256\307d\014V7IcE\235P\245\372w>0\002w\300\272\373\004V\364\303\372\312*h<d,\214\363\250q<\364\270\350\034\306E{\237/X\2063`Asa\200Y\3634\254s\347N3\036_h\322t\003\374\350T\374\304\222\035u\005K\356\300Z\322\361\014 \241\3632N\217\243\020Y;=\252e\314\320\021LK\n\026\361,\223]\237i\262^\224\266\312+\345\355\272\357\177\327@S\200w\201j\277\227\251\251\036P\273d\013\374\010\306\375?kb\215H|\002\361?T\312\271\223\250\3358\360\036Z(\200\260'{\343;-\240Ej\001p\237\376x'\\\327\215\271?\216,3g]\031G\014t\3212QV\374f\373\303\276!\340\247\031\376\221\313~::\363\032q\337\267\366\265c_-\326ud];X\347\001\330\n\3506X\367\262m\307\036;\025\316\311l\230\t\244\220\006\223z\255\354=\035\205A\356\347\376\014\336\331\245Z\356\3004\365:\032\345 \374\325[n\225\376\237\224\224\272Ox\256\024/\223\274\334\002cT*\371m\2423\017\306w\256\324\001Fv\177y\345\177\244\345\177\256\264l\230%\224\\IP\346S`;\237 \271\3200l\003\275'\036\366\200\005W~T\361T\356\203\356\213V=U\037Y\232\235\375\352l\351J\351)\230\225\275}\365>\334X\263\225\353\032\332\364\207\227\373\r\203Z\004s\3436\254\217K\367(\360\345\321|\260\245\372k+\265t=\014>\352\273\372\273\215\372\306/\365_\376Z\377k\344\210;EW\301W;~/Zz\007~@\371[p\240z\300u\000\243\255z\221\tyk\357\324\347 \302\207\310\340j\322\271\021\220\357\337Vr\332E\026\333\251-\203n\257\207\336\326\337\256\327\327\337\327\337C\377>\3767\347\335\377h\224\257\247Q\316\266g\334\026\345\177\352\2269\235\002\264\364\316\252\004\345\252\267\372\374\300s\340u\366\016\365\334ZeD\3636\353\335}P\202s\232W{\016\346\360 l\272\177\253\257\301\206\201\256\301\206\371X\377\030\251G\376v*\325\210aA\370u\004{\031\323\375\272I\2363\354\360\3228\370j1\340\357\023\014""\371\240s\372\024\003.\207\224\300 <\271,\277!\232\001\343\256\350iZ\253_\374_\245\034\233j\327\346\254\256\355M\014;0z.\207\005\363\300N\026e\000\323\241\007\327\0178\230\024\350\270z\03589U\027\246(T<W\363\036^\273\216\301\021\026&\001i\266SYaA\355P\351<9\237o1\002M(\236\303\376k\352\016\370\353\337\224\007\301\371\274\246\265\221\217\331W\235\255\365\325\002fp\375-\314\361+pXvA$\266\261\020\2503\302\216Q\014\013;,\2357\271p\261\230\201\361\213vv\320\352\002\332\271\303\223\331\261\252~\306\352_rv\302x\361\031\006\016\231m\ny\254W\002,\356>\001\250\343\320\215x%\200G\022\024,\235G\343\374\320\031{9j7\215\013z\220\264\240\307U\024\013\030\237\352\302\000\033\313\232\017\202a\220\252\013\007\326\20514\226\302e\324u\031\005\007\306\303\230\304\241\007\311\024\214y3\224\357a\254]0*^\200A/F\024x{\330\005\334\307N\266\027\347T/\356b\n\033\352|\216\325o\242\267\371\331\342/@\3477\330F`a?\221v5\356\216(\354Z?r\365\033u\004\326\333*P\247\314]\340\322&\260\2701sJ4[\346^i\246\224\307\270\027\312\266\351\312J\335\207\001\377}\024\035\254w\037(\234\t\275{\317FB\275\213\25334\273\215\315\3322\243\\\250\234\205\370\245\242\014\354w\251a\034\273\3501\020\014qDK\267h\325\376Zm\205\315\0228t\001\316Twk\271\343\n\352=\177\341\201\262w\332{#\340~\275\276\022\256\207\305\272\270y\034\312\352\351\352\203\274\222K\017\312\"\030+\373\2407\006\253\242\0330JR\335Qp\245:Y\225kw\351H\241\336\363})Z\276UY\251lk\277\326\276\001\371\214\007\003\013\244<\342\365\370\226+J\354`\340`\003L\236\343\nA\274o\325\267\266M\361\031\304\331`'s\030\217\242\200\371\365\322M\3220,\224\005fQ\010f\357z\371Fe\220\004\322\036h%\017\202\337R8*W\356\3043\266\243\3137J\337\222\260[\005\371\267Z!\303\3551,\222_@\217zYx\312\026\277\032/\376\225\005\036\247@\257\341\251\010\311\373\211\242\010\312\377\205\372\t\204\355<\2064\017y\315q\346\203\234\241\246%x\326S\034\241\261\342\000\t5\n\203\344Qg\014\306u\302\000\261\363#\025\033\350*\210\312P\245\223\0058M\340v9\245Mh\333lnM\360'<C\264\203\242\345\353\025\217\025\324_""Z\267\207\016\031\360]\371\2436\240\2753\003\215\014\374\201\016\202y\2071\310\374\003(\365\025\353\010F`\3674\204\366X\310\226\235\303@\327\273\213\267QH\251~`N\2544T* \021\320=W*\343\2255\355\016\006>{\2133d{\34409\253^\203\326\277+\277(\213\230]d\307\034\275\305%\306\261\336\342\317La[\212\226Y\020\331H\\\250_\020(@\315\327\231\027\r\027\224}B\271\003\332\006\331\367=(\000?\372\235_\232\210\343(P\270\\.\3561\341\202\242\367Q\251\257\024\004\335\352-O\226\367\301\364\3622\360c:'\272\002u\203\344h\360\260\340\024\350\361I\224\212\240\213\023\340>\2642z\3734\320\257E\317\243v3\333\004\255\3329\243\342l\345\246^\261\240\316\323\241\026*D\251\362\024\217\215\217\005/\301\n\017\322\271\366T},\000\346\233\227\265\323\003\333+\360\247\267s\3114\350dR11\024\375\260O.\2009$2\360\210\321\374L\3717\275\371\246\330g#\322\000f\2352\364\357\177\237N}\315\225y,\221'F_\303\225[z_\233\202\237\225\333\240:\336\234\030\254\373~B\273\362k/\373?\273\263 \317O\024i,,\010\302\362R\361\237`{\346\216\025e\016)\345-_\243\003jH\\G\355u\214(\3723$\306%\np\017\322a67(\267\320\326*w\323\241x\023\243\375UY<2\006\342W\027\241\017w*\275\332\013\344\244~X\335\205\202\036\367;r\206\031a;\240\335\277\201\306\2420\3466`_X\353\323f\311\304\242\323\360\030\020{\302\365|\033\016\330\251l\320@>\346x\264\0334\357=~\345\3018f\034\004\003\255\217,\001\264\026rG\026\254\363\345\234\025\353\032\277_p\005\307}\026\254\027\300\275\301\262h\036l*\300gY\277\020d\305\342:_\307z\302\017\005_T\304\263a\005\370%\002K\277P\261\207\210\253+VZCf\357\207\350\016R'\235\004oj\016\007\217\261\366\224\367n\246`\202u\236\0326\213\013X?Km,0NS\335\212\214\363T\367B\271\352\375\257o/\014\0232\017\316d\010<\346\t\274\212b\265\246L\244~X\231\235\325V\367\302\276\312\313F\333\316\336\300\274\351i4\253/2\343\253\243\270\216at\375\022\314&\030?a\n\030\361\213.\006\000\244\204q\367E)?\006C{\033\\\307\234\t\224\313\303\320\357w(\027\351R\314e\365\034\355!\262\327\373H\201\313\354\352\213%\303n\273\364\225\226`cLT2`]\332\312i\177o\353""\207\307\215{\372\013\026\336\273\312J\343\264\000\260\"\272\203\243n\253\203\025\360\325a\3450\236\327oW\\ff\230M|c\301He\244\321\2566\353\004\3141\234\243\373\003\363\025cI\032\200\212qg,\010&m\177y\215D\033,\240\252\307Z\320\007\226\026\336\347\332e\267\376\032\031\352\010\325\254\252;(\203m\227\"\257\200#\235+\237\003\261\325{\245~\205\237T\241\0375\t\345C\\M\240\267\230s\023\025gl@\365\261\310\273\235>\236\224\366\223\337\010\353\317\336\006\206\307\333/\253\3202\265\202\361\020\366\300\360n;)\"\014\224\264c\214\204=0\372\322\216\301\230v\272\227\213A\026\343q\304P\250\006-2\302#\030\006wX\n\2036\006^C\r\212\007b\224\006\037G\254\200\032\272\206K\232\272\213\241\032|\034\265\343}#|\360j\324]\212\240\331\036G\355\030cb\3032\333\245\016\335\302[K\304g\032\026F\245\200\262\214\016\330\241~\311\0234\352\r:\233\316\2236e\367M.]f\322\300\212q\207\264\263\035\343\334a'F\377b\024sd\376\233\013\250\267\370\014\326\3605~\327d\305\010\226@\317~\277\325\322\321\315\327\000^F\363\200\021K~\007\214\243\003\177\321L\031\246\273O\230\333\241pa_i\021m\235z\313\020x\226=\3044\267k\256\001c\214z\260\240\003#\243\030\344\374\300#\243\374z^\240\376\027_e\213,8=J\216\241\004B\306{:q\346\000k\255\307[\022x\341\017\222W\212\206\247\377\030$\320d)\247g\037\221\215$\352\331\247\260\260\333\231y\302\253\227r\026\002\217@\360\275\004;&Xnu!\200\327~\320By\n\375j\327lDv\313{L\2115#\245\327\305\363\202\301\212h^H\212\223\035\364\0006\222R\365;\206\345\"OY\305\t5I\246c\256\351\315\262c\261\266@\371u\325<'b\205\2537\364\013\263\006\226\233\361\201\273\352z\331\243_@\272ar\334y\371\350{~\275X<\376\362Q\275\023\3664_l4\327W\030\tD~L\327\"\333\361\244\243\025\355%\036\213\341\201\211\016\272BI\267\226\230\221L\366}\023\213\t\273s\254M\n;\2434O\021\366\035`\031\261\277\351\225='~\270z\035Y|J\374\317Z\254z\027\357}\375\361+\201#d\206\362#\025\231y\034\0055\000\373\370Wv\277\025\267\372)\037GndR\264Z\316B\206DR\275g\004:\216\221\203v\n\315\326{F\201\323\275\325\000\277}\\\357\361\303\220\026k\255""\265\353\007\036\312\353\370\235\265\016\216\341\2059Z\244\303\003X\345\265\336\203`\375\r\277\003m\245\266Fq\323z\317\035\260\276o\321\361\013\236\032\374R_\001\334\367\365\367\037Xx\360\275\345\316$m\330\233t5\364\006\270OO4\277\t\332\004)<P\336`\307,g\301\3548\354\352)N\223\347t\037=\230\303N\026d\243[\023\230\234\007\307TdI\016Y\302(\377\2213h\251g\336aX\017\327\301{\322\317Q0\n\257\340\311\034\303\371F\035\0069\275\300\216mpu\367\025\003\024\275m\214fZ\002\203z\366\032\365\222\331\316\327\253<&g[P\346-\322N\324\005G\206I\366-\013\326\232\207a\334\215\263\003&\230\237\205ma\204w\2165\375X\035\340\243\261\334|\177\313\375\246W\354]\r}\257p\261>\301\257\357\315\224>\363\263\261\247UC\3363\221\312\215\274]\2206\347Kne'\3218r\355K\316\331\305kZ\007\310\205\356\232\267\366\350\300\346G\334\240\243\341\006{\023\301S\225\363\025Y\033\251z\033\013:a\3756x\r\254\250W\367u\276$l\374\013\354\253\371j\300\016\376E\017D\353\213\341.\205,\370\234\274\003^%\330\215u''\026`Gm\342\240\335\213\022\2601;\017Z\377\304\302\20687v\030E\343\036\254\313\353l\365:\202\337\326am\223q\274\253\235Y\3647\221\360M\004\271\016&\233\350\\Q\004Kj\215\005\241\330\355\203N2\320\330\273@\030\374\305\r\266\253\356\225/\002\021E\233\004\347u\004\326\325d-\347\032\270\007\353R\227\371qu\016,E\024\007W+\2226U\355\250\206kWk\"\273\241u\217\005q\214\243o=\014\031*wa \004\\\221\337\370\2533'\025\335%\231w\023\303\024\240{nUW\310w>\251\350\253\023<\246\350\036\271l\367\361X\211m\350Z[\315\177Dl\030f\241\267\213\326\000\360\377_l\340\213\205\335z\301\303Zt2\256S\274\217\034\213\013}\344\3521\370U:z\266\301\355&\024\371I\344w]wDF\351^\301\367dWw\242\227\344~\305\342\260\023\335\243Nf&\203I\202\376^/\371v\334QA\207\355\204\200\341\327\333\241G\215;\024/5^'G\250\237\207\366cU~ \031R/\201\302\372\006\225b\345\2616\244\025\252\301\33275\307\013\021w@\237}\221\237\364\013\177}\321\364\223\036\322\r\201\334q~\022\036\030\217\326\344\003\357A\3031\0378\251\226\200/68C\226s'\016%\014m\343eNNL\324\257\321y\217\310""\335\307W)\275\314\363\3777<\220k\250\364#\3153$~\242\023F\302\374;\311[J\376\023m+V\t\337\206:S\005l\305\354\017\r~\210\372`v\207\352\324\257\335\245\243ck+f\225;D\260\241\312=\366\336\230Y\245\3367B\261|L\215b$\352\210!>\240\310\016K\3731\002\367\207+\261\221S\235a\322\257\275t\376\2141\272>\365\031\3554\223\025\234\310}\3322\004\336\245\033;\224\374\007\252?Fz\025\266\375\200\272\312\3027}\344\345\266\032\353%\300\010\376F\352\235\021\244\226\365^\341}1|\231\314\357\030\022\r\303eHc\350\351\232\312\207\237Q0\236S\222\215\320\221\344\323\307\323\003\354x\204\322\2146K\337\321\337`R8K]\322\214m\374\334\247\265\354\321\243\250\270\300\247\364\3335\326\206\261B\033\223:\227\310&$\234\177\260\273IP\277\223\234\023v3\t\r\016\017\277\305\241;\347^#\277\305\337\272>my\214\277\226\334\014\237\347q\004\027\213d\312<3B\217^kVa&\3143nm\017\226E\026\345yn\265\267{\214,?axN1$<\032c\036\030]\242\343o\r\036\362;um\374}H\236=G/\307\255\030\327\002\316\332\243z\317w\374\372\306@\231\271lz\236\235\263\350y\205E\034\232\226\333\353\317Q\324\334c\351\325\311#1\262\235\366\032Ma_\207\001\305\237\350\002\\\224\202]P\256g\371\255\224\237\270.\013VZ\277\004\275\336s\313\260\213\3312\275E\357\330\233\313\n\363\037(@ \032\371_(\346\2343\362aF\321\310#\275\030[\206]\3056\360\021\360*mgW\361*\036\354\341\3459\005/\322\261W#\272<\244\261\273\350\276\017\336w\303\273\204\307\226\261+\\:J\277:\303\256\341\001\312\021\332\n|w:O\310\203\364\266\375\"\005\320\251h\224\230\274\311#\317\321\272\377\005\230\307x\222W\357\036`\370\272c\027c\227\316\364M1QL\321\251\036;\245G+\201\325\230\253xOW\303\210\236\222R\347\361(\266t\374_#\"\365\257\326\303\353\024s\306/I\334)\323K\302\177\007y\276\302\243\262\347\377\365\033\020Xf\342\325\032\245\325\327#ZZ\361z?(\302\372\275\227\265\374\301wx\205\270\005\243\332\326\363\231&6\023ZXW\215\027\265[]\335\366\256b?\310\372(\314.N\036\2304a\376\022!\217\3455\261\322\232\304\262\216\364Kr\027\331\355GZ\207\267a\213\377U\363k/\331W\000\360v\336\367\2602:\3508+\211w""\217\2714\230\240/N\254\241\007]}ZS\016\214\327x\307\301z\273]z\001\376\335&\235\246\256\202\217\227\257^\251>;\370\346\300\253\373\366\314\000\261g\\\"%7\231\343f\311\034\361\314-\262\223x\200w\221]_bnu/\275`d\034o\351\2400\005\371y\234\310\004^\007O\325\346\225\233\270\376\257O\361\3109.\354\375+\235\027\223\024\331\361\322w.\236\230\315wS(\3753\305\231<v\340.\030\235\266 \206\211\353\321\333\372\216$Q+\213Q`{?\303\016\353\001=<\253y\254\254}eF\340X\237\366\301\240\033\2524\370\275t@\303D\342\024?\312\367\3502\3621\177w\327\337\024\240/Mo\003\200\2332\256\227\327\255\177\364\326\207E;\225E\363H\346\032H\203v\274\376`\036\3118A\335L\2068weC\020-\250\266\322\267\014\274\366m\025\300\r|\017\343\257z\350\274_}OJ\010\314\270S?\216H`\264\225\236\003\213\371+\331z\226O\345>)\267\277\243\201\314z\323M\262\361\357\225\333\2259m@\373@\327:\035\005K\325\276\352+z#\307r\314\322j]\206\357\3547${Ii\275\004\221\260\255\211v\340|e\336\376\321\n\023\327\201i\013u\365\222\032s\274X\315\200O`\253\330\016\353M\334\225#KhP\3743\266Bw\361>\035\315\335c\352\035\333\232\244[&\271r\007\343\t\303Y\005\3404];\271\257\255j\271cp\357\321m\246{\364Y\233\357\350\342\316q\270\001\240\274_\3664\305i\330b\344\265\0327\374\215\317\265\314\302\022\344\n\363\t\217E\277\257\344\300\231\215\202\213\335_\013\341\327m\360\213$!'\306yM\006o{\022\234\323;\3657\253\365\325\267\354\356\261\203J\254:R\033b8+\024\246\177\333HG\251\376P\233=\350;\230\253\257\206\353a|\005E\357\236_]`Qi\333x\356\340\021\222mD\264\3410r\326yY\355\302\373\352W\370%\243`\371<.\246\372\330,\236\035\234P\314\256Qv\221m\335\016vG[e\022\264\030\254\257\352n\255p\000N\306\345\346\205\026\322L}\342B\331\256\210\365\207A\030\233\347\204bk\313m\364\365\201\301\312\026^\\\250?\177}P\000\245o\266\355Z\334\234\374\313\343;G\305F\353.\214\231?\3508Xi\3167*\266\325\037P\303\245~\272\254\275\216A\362\372\224\223\202;\202\243\01712\027\257\341R\256\373gjS\007\255\266>4\026;\347\356<\306\201\353O\026\016\256\036\210\366\211\373\243%\177p\246;\331""\347q\310\347e7\023yx\270\025_\270\020Oz`\370\212>xsE\365\363w\324\317\321U3zO\251]}\251\177\005\0073\2634U\255,3\247\177,\0073\363\372gt\0322K\334\205\260\325\351\001\027\277~\307\371\211\250n\014B\327[\300\316\347\357iL\203D\334\004GK$\213\033]\017\256\212\314\002\005\017\312\017\233\340v\323\247\307\032\360o\342\225*{\024\356\232\371A\252\257\362\241\267Ot\367\345|\305\361\3257<\3459\313\013K:+\\C\203\210\323\203\221\272\333\365\333S\354\212\253\371\262\"\336\301\224\312S\240&\356h\235\325s\325\324\201\237I\034v\361\201\342{?\303\240iY\255\303\200>\322\033\200[\325\225*\273.t\233N\223ZY\254\361-\275S\330\217\256\265\245\260\013\337UlV\374\270rW\3637\024\177\375>\3731\373\220\336\350\315\271\365\206\227\355i\255MK\207+74\257KW\317>\023nc\031\002\261\036\257.c\310\025\021\242\364:\004{\253\316\253\207\302l\357\305\333\033ff \336?zWZq^\222\263\336s`\021\006\217\276o\330u>k\361$E\262\254\344{\325@\323\006\31613\347\217\023\347\367\254l\221\377\233\365\233\024Y\325\337(\344\237\014py\271\320\366j\247\3774d\260/\030G0\246>\017s\3113\336f\247\014\272\343\016+\367w\337\231>\3135\204m\342\253e\226os\331\277\322\325}\342W\272X\334\344\362\215\3225\272\027@\356H%\250}\243\321kP\r@\374\374\242\377\270\317x\261Om\321g\265N\375y\256\237\0025\317\237\365\351\257\263\321>\373\347\300~\254\216W\371{\3440-{\030/\302\237NP\004?\200\314\345\246/\377V\330\177\0003\227n\223";
    PyObject *data = __Pyx_DecompressString(cstring, 10996, 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 (35259 bytes) */
const char* const bytes = ")00:00:01-00:00:0100:01:01-00:01:01.01+0101-0101012345678901/02/202101/02/2021 000006.05-04-0301/02/2021 000006.05-04-03UTC+01:0101/02/2021 000006.05-04-03+010102d-%02d%02d-%02d:%02d:%02d-%02d:%02d:%02d.%06d%02d:%02d:%02d.%06d%02d:%02d:%02d+%02d%02d03:04:0503:04:05.00000603:04:05.000006+010103:04:05+010104d%06d06d0.10.120.1234560.12345671.12.123456.12345671.01.11.121.1234561.12345671.1.11..1-1.1+1.1 1.11.1 1.1a1..1 != -1..11..1a, 2) = 2021-0002021-01-022021-01-02T03:04:052021-01-02T03:04:05.0000062021-01-02T03:04:05.0060072021-01-02 03:04:05.000006+01012021-01-02 03:04:05+01012021-3652021-3672021-W52-6+2359-235924:01:0124:01:01.000001-24:01:01.00000124:01:01.001000-24:01:01.00100024:01:01.001001-24:01:01.001001-24:01:012d%.7f +-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.\nAccepts: .\nAccepts: 'Y', 'M', 'W', 'D', 'h', 'm', 's', 'ms', 'us', 'ns'America/New_YorkAsia/KathmanduAsia/ShanghaiAustralia/Lord_HoweCannot 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 decimal point.Cannot parse '%s' to float: no digits fo""und.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: ].\nConversion limits to units between: 's', 'ms', 'us', 'ns'.\342\206\222'D', \nError: Europe/DublinEurope/ParisExpects 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: arr_div_ceil(Failed: arr_div_ceil_mul(Failed: arr_div_down(Failed: arr_div_down_mul(Failed: arr_div_even(Failed: arr_div_even_mul(Failed: arr_div_floor(Failed: arr_div_floor_mul(Failed: arr_div_up(Failed: arr_div_up_mul(Failed:\ndate_fr_sec(Failed: datetime64_type_checkFailed: dt_normalize_tz(Failed:\nhmsf_fr_sec(Failed: math_div_ceil(Failed: math_div_down(Failed: math_div_even(Failed: math_div_floor(Failed: math_div_up(Failed: math_mod(Failed: <'ndarray[datetime64[Failed: sec_to_us(Failed: timedelta64_type_checkInvalid timezone name '%s'\342\206""\222'M', NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Only supports arrays with units in ['ns', 'us', 'ms', 's'], instead got '%s'.Pacific/ApiaPassed: cross_test_with_ndarrayPassed: date_arithmeticPassed: date_conversionPassed: date_generatePassed: date_type_checkPassed: datetime64_conversionPassed: datetime64_type_checkPassed: days_bf_monthPassed: days_bf_yearPassed: days_in_monthPassed: days_in_quarterPassed: dt_conversionPassed: dt_generatePassed: dt_manipulatePassed: dt_normalize_tzPassed: dt_type_checkPassed: dt_tzinfoPassed: iso_week1_mon_ordPassed: isocalendarPassed: localtime & gmtimePassed: mathPassed: ndarray_dt64_conversionPassed: ndarray_dt64_type_checkPassed: ndarray_generatePassed: ndarray_mathPassed: ndarray_td64_conversionPassed: ndarray_td64_type_checkPassed: ndarray_type_checkPassed: numpy_sharePassed: parserPassed: quarter_of_monthPassed: sec_to_usPassed: slice_to_ufloatPassed: slice_to_uintPassed: time_conversionPassed: time_generatePassed: time_type_checkPassed: timedelta64_conversionPassed: timedelta64_type_checkPassed: timedelta_conversionPassed: timedelta_generatePassed: timedelta_type_chechPassed: tzinfo_accessPassed: tzinfo_generatePassed: tzinfo_type_checkPassed: weekdayPassed: ymd_fr_doyPassed: ymd_fr_isoPassed: ymd_fr_ordPassed: ymd_to_ordSeconds value must be finite, got '%s'Should raise RuntimeErrorThe 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 Unsupported timezone '\342\206\222'W', \342\206\222'Y', []]'> /:  != ]) = )\n => ?., -%: ' a1.1add_note\n  - arr2 length: arr_div_ceil: division by zero.arr_div_ceil_mul: division by zer""o.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 \ndate_fr_us(\n  - datetime2: 'datetime64[datetime64[D]datetime64[M]datetime64[W]datetime64[Y]datetime64[as]datetime64[fs]datetime64[h]datetime64[m]datetime64[ms]datetime64[ns]datetime64[ps]datetime64[%s]datetime64[s]datetime64[us]dt_isoformat: 'sep' cannot be None.dt_strformat: 'fmt' cannot be Noneetc/gmtetc/gmt0etc/gmt+0etc/gmt-0etc/universaletc/utcetc/zulu, expected fold must be either 0 or 1, got %d from '] from 'gmt+0gmt-0\342\206\222'h', \nhmsf_fr_us(\342\206\222'm', %m/%d/%Y%m/%d/%Y %f.%S-%M-%H%m/%d/%Y %f.%S-%M-%H%Z%m/%d/%Y %f.%S-%M-%H%zmath_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.\342\206\222'ms', \342\206\222'ns'numpy._core.multiarray failed to importnumpy._core.umath failed to import) out of range. Must be strictly between [-86400..86400] (exclusive)) out of range. Must be strictly between [-86400..86400] (exclusive).parse_to_float: 'token' cannot be Noneparse_to_int: 'token' cannot be None) != pendulum result ' resolution is not supported.\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_uint: 'token' cannot be Nonesrc/cytimes/utils.pxdsrc/cytimes/utils.py' 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'timedelta64[timedelta64[ns]timedelta64[%s]timedelta64[us]tm_strformat: expanded output exceeds buffer limittm_strformat: failed to allocate buffertm_strformat: 'fmt' cannot be None to '] to datetime64[' to float: contains invalid character '' to int64 ']] to int64 '' to integer. Contains invalid character '' to non-negative float: contains invalid character '' to unsigned integer. Contains invalid character ' token_len=' unit to int64 '\342\206\222'us', zoneinfo.ZoneInfo | datetime.timezoneABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzAprAugCETCSTCustomDateCustomDateTimeCustomTDCustomTimeDDateDateTimeDecDecimalFalseFebFriInvalidTimezoneErrorJanJulJunLOCALTZM_MAXORDINALMarMayMonNaTNoneNovOct__Pyx_PyDict_NextRefROUND_CEILINGROUND_FLOORROUND_HALF_DOWNROUND_HALF_EVENROUND_HALF_UPSENTINELSatSepSunTThuTimeTimestampTrueTueUTCVWWedYZoneInfoaabcdefghijklmnopqrstuvwxyzallarrarr1arr2arr_Darr_Marr_Yarr_farr_harr_iarr_marr_ordarr_sarr_usarr_wkdyarrayasastypeasyncio.coroutinesbabel.datesceilcline_in_tracebackcmpcount_cross_test_with_ndarrayctdcytimescytimes.utilsdd1d2datedatetimedatetime64daydays_days_before_month_days_before_year_days_in_monthdddecimal__doc__doydstdtdt2dt64dt_dt_cdt_ndt_strdt_tz1dt_tz2dt_tz3dt_tz4_dtmdtypeequalerrerrorsexpfactorfloat64floorfoldfromtimestampfromutcfs__func__functools_get_local_timezone_get_z""oneinfogmtgmt0gmtimegreenwichhh1h2hh_hmsfhourhoursii_leni_strinfint64_is_coroutine_is_leapiso_calriso_weekiso_weekdayiso_yearisocalendar_isoweek1monday_isoweek_to_gregorianitemskkeylocallocaltimelowerlru_cache_lru_cachemm_dt__main__mathmaxsize__metaclass__mimicrosecondmicrosecondsmillisecondsminminuteminutesmm__module__month__mro_entries__msmy_unitmy_unit_intname__name__name_lowernon_digitsnownpnsnumnumpyobjectoffset_ord2ymdord_ioutp_dtpairspandasparse_to_floatparse_to_intpdpdatependulumpfixpop__prepare__printpsptpt_tz1_pydatetime__pyx_capi__qtr__qualname__replaceresres2returnroundroundingssecondsecondssecs__set_name__setdefaultsfixssss_fstrtt1t2t_ct_nt_tz1tdtd1td2td3td4td5td6td64td7td8__test__test_cases_test_date_conversion_test_date_generate_test_date_type_check_test_date_type_check.<locals>.CustomDate_test_datetime64_conversion_test_datetime64_type_check_test_days_bf_month_test_days_bf_year_test_days_in_month_test_days_in_quarter_test_doy_test_dt_arithmetic_test_dt_conversion_test_dt_generate_test_dt_mainipulate_test_dt_normalize_tz_test_dt_type_check_test_dt_type_check.<locals>.CustomDateTime_test_dt_tzinfo_test_is_leap_year_test_iso_week1_mon_ord_test_isocalendar_test_localtime_n_gmtime_test_math_test_ndarray_dt64_conversion_test_ndarray_dt64_type_check_test_ndarray_generate_test_ndarray_math_test_ndarray_td64_conversion_test_ndarray_td64_type_check_test_ndarray_type_check_test_numpy_sharetest_pairs_test_parser_test_quarter_of_month_test_sec_to_us_test_slice_to_ufloat_test_slice_to_uint_test_time_conversion_test_time_generate_test_time_type_check_test_time_type_check.<locals>.CustomTime_test_timedelta64_conversion_test_timedelta64_type_check_test_timedelta_conversion_test_timedelta_conversion.<locals>.CustomTD_test_timedelta_generate_test_timedelta_generate.<locals>.CustomTD_test_timedelta_type_check_test_timedelta_type_check.<locals>.CustomTD_test_tzinfo_access_test_tzinfo_generate_test_tzinfo_type_check_test_utils_test_weekday_test_ymd_fr_iso_test_ymd_fr_ord_""test_ymd_to_ordtimetime1time2timedeltatimedelta64timestamptimetupletimetztimezone_tmtm_hourtm_isdsttm_mdaytm_mintm_montm_sectm_wdaytm_ydaytm_yeartmptmp1tmp2tmp3to_integral_valueto_unittodaytokentoordinaltotal_secondststztz1tz2tz3tz4tz_strtzinfotznameunitunitsuniversalusus_iutcutcoffsetutctimetuplevalvaluevalueswweekweekdaywkdwkd_iyyear_ymd_ymd2ordyyzzonezoneinfozuluPY_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_QUARTERPyObject *(PyObject *)\000tz_parse\320\000\033\2301\330\004\t\320\t\031\230\021\360\n\000\005\t\210\010\220\005\220Q\220c\230\021\330\010\014\210I\220U\230!\2303\230a\330\014\020\220\007\220u\230A\230S\240\001\330\020\023\2204\220r\230\021\330\024\035\230Q\230e\240=\260\001\260\026\260q\330\020\026\220d\230!\2306\240\027\250\004\250L\270\001\330\020\033\230?\250!\2506\260\027\270\001\330\020\021\330\024\034\230F\240#\240S\250\001\330\023\025\220Q\220f\230A\230W\240A\240V\2501\250H\260J\270a\270s\300!\330\020\021\330\024\034\230F\240#\240S\250\001\330\023\025\220Q\220f\230A\230W\240A\240V\2501\250H\260J\270a\270s\300!\330\020\021\330\024\034\230I\240S\250\003\2501\330\023\025\220Q\220f\230A\230W\240A\240V\2501\250H\260M\300\021\300#\300Q\340\020\033\230;\240a\240v\250W\260A\330\020\021\330\024\035\230S\240\003\2401\330\023\025\220Q\220f\230A\230W\240A\240V\2501\250M\270\021\270#\270Q\330\020\033\230;\240a\240v\250W\260A\330\020\021\330\024\035\230S\240\003\2401\330\023\025\220Q\220f\230A\230W\240A\240V\2501\250M\270\021\270#\270Q\330\020\036\230n\250A\250V\2607\270!\330\020\021\330\024 \240\003\2403\240a\330\023\025\220Q\220f\230A\230W\240A\240V\2501\320,<\270A\270S\300\001\340\004\t\210\021\210!\340\004\010\210\001\320\000\023\2201\340\004\010\210\005\210U\220\"\220G\2301\330\010\014\210E\220\025\220a\220s\230!\330\014\020\220\005\220U\230!\2303\230a\330\020\023\2202\220R\220q\330\024\033\2301\230C\230}\250A\250S\260\001\330\020\026\220k\240\021\240#\240S\250\001\330\020\027\220z\240\021\240#\240Q\330""\020\027\220t\2306\240\023\240C\240r\250\021\250#\250Q\250c\260\021\260$\260a\260v\270Q\270d\300!\330\020\027\220t\2307\240#\240S\250\002\250!\2503\250a\250s\260!\2604\260q\270\006\270a\270t\3001\330\020\027\220t\2305\240\003\2403\240b\250\001\250\023\250A\250S\260\001\260\024\260Q\260f\270A\270T\300\021\340\004\t\210\021\210!\320\000\033\2301\330\013\014\340\004\r\210U\220%\220u\230E\240\025\240e\2505\260\006\260f\270F\300&\310\006\310a\340\004\010\210\010\220\001\330\010\r\210S\320\020#\2401\320$7\260q\270\001\340\004\010\210\010\220\001\330\010\016\210b\220\006\220a\220t\2306\320!2\260\"\260A\330\010\017\210u\220C\320\027*\250!\320+>\270a\270q\330\010\016\210b\220\006\220a\220q\230\003\2303\230d\240&\320(9\270\022\2701\330\010\017\210u\220C\320\027*\250!\320+>\270a\270q\330\010\016\210b\220\006\220a\220t\2306\320!3\2602\260Q\330\010\017\210u\220C\320\027*\250!\320+>\270a\270q\330\010\016\210b\220\006\220a\220q\230\003\2303\230d\240&\320(:\270\"\270A\330\010\017\210u\220C\320\027*\250!\320+>\270a\270q\340\004\t\210\021\210!\340\004\010\210\001\320\000\033\2301\330\013\014\330\004\t\210\036\220q\330\004\t\320\t\031\230\021\340\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260D\270\010\300\001\360\006\000\005\014\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270A\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270C\270q\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270C\270s\300!\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270C\270s\300#\300Q\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270C\270s\300#\300S\310\001\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701\270C\270s\300#\300S\310\003\3101\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260#\260V\2701""\270C\270s\300#\300S\310\003\3103\310a\330\004\013\2108\2209\230A\230S\240\003\2403\240c\250\023\250C\250s\260$\260c\270\026\270q\300\003\3003\300c\310\023\310C\310s\320RU\320UV\330\004\013\2104\210q\220\006\220a\220s\230#\230S\240\003\2403\240c\250\023\250D\260\004\260C\260x\270q\330\004\013\2104\210q\220\006\220a\220s\230#\230S\240\003\2403\240c\250\023\250D\260\003\2607\270#\270X\300Q\330\004\013\2104\210q\220\006\220a\220s\230#\230S\240\003\2403\240c\250\023\250D\260\003\2608\270<\300s\310(\320RS\330\004\013\2104\210q\220\006\220a\220s\230#\230S\240\003\2403\240c\250\023\250D\260\003\260<\270s\300!\330\004\013\2104\210q\220\006\220a\220s\230#\230S\240\003\2403\240c\250\023\250D\260\003\260;\270c\300\021\360\006\000\005\t\210\006\210h\220a\330\010\t\210\030\220\031\230$\230d\240&\250\001\330\t\021\220\031\230$\230d\240&\250\001\250\021\330\t\021\220\031\230$\230a\230v\240V\2501\250A\330\t\021\220\031\230$\230a\230u\240F\250!\2501\340\010\t\330\r\021\220\026\220s\230$\230a\330\014\021\220\024\220W\230C\230t\2401\330\014\021\220\024\220U\230#\230T\240\021\330\014\021\220\024\220V\2303\230d\240!\330\014\021\220\024\220X\230S\240\004\240A\330\014\021\220\024\220X\230S\240\004\240A\330\014\022\220%\220r\230\024\230]\250\"\250D\260\017\270q\330\014\021\220\024\220X\230S\240\004\240A\330\013\r\210Q\210i\220q\230\001\340\004\t\210\021\210!\340\004\010\210\n\220+\230Q\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\320\000 \240\001\330\013\014\340\004\013\210>\230\021\230!\330\004\013\2102\210V\2201\220A\220S\230\003\2303\230c\240\024\240V\2501\330\004\013\2102\210V\2201\220F\230%\230t\2401\340\004\013\210>\230\021\230#\230Q\330\004\013\2102\210V\2201\220A\220S\230\003\2303\230c\240\024\240V\2501\330\004\013\2102\210V\2201\220F\230%\230t\2401\340\004\t\210\021\210!\340\004\010\210\001\320\000!\240\021\330\013\014\340\004\t\210\021\330\004\013\2105\220\001\220\021\330\004\013\2104\210{\230!\2301\340\004\t\210\021\210!\340\004\010\210\001\320\000\031\230\021\330\013\014\340\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260C\260x\270q\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260q\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260x\270y\310\001\310\021\340\004\010\210\005\210Q\210d\220(\230!\330\010\017\210q\220\007\220s\230#\230Y\240a\240q\330\010\017\210q\220\004\220C\220s\230&\240\001\240\021\330\010\017\210q\220\n\230#\230S\240\014\250A\250Q\340\004\t\210\021\210!\340\004\010\210\001\320\000\"\240!\330\013\014\340\004\013\2106\220\021\220\"\220F\230!\2301\230C\230s\240!\330\004\013\2106\220\021\220\"\220F\230!\2301\330\004\013\2106\220\021\220%\220s\230!\340\004\t\210\021\210!\340\004\010\210\001\320\000\"\240!\330\013\014\340\004\023\2208\2301\360\010\000\005\014\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\330\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\021\330""\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\023\260A\330\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\023\260C\260q\330\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\021\330\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\023\260A\330\004\013\2108\220:\230Q\230c\240\023\240C\240s\250&\260\001\260\023\260C\260q\330\004\013\2108\220:\230R\230s\240#\240S\250\003\2506\260\022\2601\330\004\013\2108\220:\230R\230t\2403\240c\250\023\250F\260\"\260D\270\001\330\004\013\2108\220:\230R\230t\2404\240s\250#\250V\2602\260T\270\024\270Q\330\004\013\2104\210q\220\006\220b\230\004\230D\240\004\240C\240x\250q\330\004\013\2104\210q\220\006\220b\230\004\230D\240\003\2407\250#\250X\260Q\330\004\013\2104\210q\220\006\220b\230\004\230D\240\003\2408\250=\270\003\2708\3001\330\004\013\2104\210q\220\006\220b\230\004\230D\240\003\240;\250c\260\021\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000$\240A\330\013\014\340\004\023\2208\2301\360\006\000\005\n\210\030\220\032\2301\230C\230s\240!\330\004\013\2105\220\001\220\021\330\004\013\210;\220a\220q\340\004\t\210\030\220\021\220#\220S\230\001\330\004\013\2105\220\001\220\021\330\004\013\2104\210{\230!\2301\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\024\220A\330\013\014\330\004\t\210\021\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\360\010\000\005\022\220\021\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210%\210q\330\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\n\210&\220\001\330\t\023\2201\330\t\017\210u\220A\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\024\220A\340\004\010\210\005\210Z\220q\330\010\016\210h\220a\220u\230A\330\010\016\210d\220\"\220A\330\010\017\210t\2203\220e\320\033.\250a\250v\260Q""\260k\300\021\300/\320QR\320RS\360\006\000\005\022\220\021\340\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\014\210A\330\t\016\210a\330\t\r\210Q\330\t\n\210$\210a\330\t\016\210a\330\t\014\210A\330\t\r\210Q\330\t\r\210Q\330\t\r\210Q\330\t\n\210#\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\n\210$\210a\330\t\016\210a\330\t\014\210A\330\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\340\t\n\210&\220\001\330\t\023\2201\330\t\017\210u\220A\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\024\220A\330\t\017\210v\220Q\330\t\022\220&\230\001\330\t\017\210u\220A\330\t\017\210v\220Q\330\t\022\220%\220q\330\t\022\220&\230\001\330\t\n\210&\220\001\330\t\017\210u\220A\330\t\023\2201\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\017\210v\220Q\340\004\010\210\005\210Z\220q\340\010\016\210m\2301\230E\240\021\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\330\014\025\220Q\340\010\t\330\014\020\220\003\2201\330\013#\2401\240F\250!\250;\260a\260\177\300a\300q\340\010\016\210k\230\021\230%\230q\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\020\220\003\2201\330\013!\240\021\240&\250\001\250\033\260A\260_\300A\300Q\340\010\016\210m\2301\230E\240\021\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\330\014\025\220Q\340\010\t\330\014\020\220\003\2201\330\013#\2401\240F\250!\250;\260a\260\177\300a\300q\360\006\000\005\022\220\021\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210%\210q\340\t\014\210A\330\t\r\210Q\330\t\n\210#\210Q\330\t\n\210$\210a\340\t\r\210Q\330\t\016\210a\330\t\n\210$\210a\330\t\n\210%\210q\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\014\210A\330\t\n\210#""\210Q\330\t\n\210#\210Q\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\340\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\r\210Q\340\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\340\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\n\210#\210Q\340\t\n\210&\220\001\330\t\023\2201\330\t\n\210'\220\021\330\t\024\220A\330\t\017\210u\220A\330\t\022\220%\220q\330\t\017\210v\220Q\330\t\022\220&\230\001\340\t\n\210,\220a\330\t\031\230\021\330\t\n\210&\220\001\330\t\023\2201\340\004\010\210\005\210Z\220q\330\010\016\210m\2301\230E\240\021\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\020\220\003\2201\330\013#\2401\240F\250!\250;\260a\260\177\300a\300q\330\010\016\210n\230A\230U\240!\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\020\220\003\2201\330\013$\240A\240V\2501\250K\260q\270\017\300q\310\001\340\004\t\210\021\210!\340\004\005\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\320\000\034\230A\330\013\014\330\004\t\210\021\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\360\010\000\005\022\220\021\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210%\210q\330\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\n\210&\220\001\330\t\023\2201\330\t\017\210u\220A\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\024\220A\340\004\010\210\005\210Z\220q\330\010\016\210b\220\006\220a\220q\230\006\230f\240A\330\010\016\210g\220Q\220e\2301\330\010\016\210d\220\"\220A\330\010\017\210r\220\026\220q\230\005\230T\240\024\240Q\360\006\000\005\022\220\021\340\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\014\210A\330\t\016\210a\330\t\r\210Q\330""\t\n\210$\210a\330\t\016\210a\330\t\014\210A\330\t\r\210Q\330\t\r\210Q\330\t\r\210Q\330\t\n\210#\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\n\210$\210a\330\t\016\210a\330\t\014\210A\330\t\014\210A\330\t\n\210#\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\340\t\n\210&\220\001\330\t\023\2201\330\t\017\210u\220A\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\024\220A\330\t\017\210v\220Q\330\t\022\220&\230\001\330\t\017\210u\220A\330\t\017\210v\220Q\330\t\022\220%\220q\330\t\022\220&\230\001\330\t\n\210&\220\001\330\t\017\210u\220A\330\t\023\2201\330\t\022\220%\220q\330\t\n\210'\220\021\330\t\017\210v\220Q\340\004\010\210\005\210Z\220q\330\010\016\210b\220\006\220a\220q\230\006\230f\240A\340\010\016\210l\230!\2305\240\001\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\330\014\025\220Q\340\010\t\330\014\017\210q\220\003\2203\220a\330\013\"\240!\2406\250\021\250+\260Q\260c\270\021\270.\310\001\310\021\340\010\024\220E\230\022\230<\240q\330\014\023\320\023#\2401\240E\250\030\260\021\330\014\r\330\020\024\220A\220S\230\003\2303\230a\230s\240\"\240A\330\017*\250!\2506\260\021\260.\300\001\300\024\300Q\300n\320TU\320UX\320XY\320Y\\\320\\^\320^_\340\010\016\210j\230\001\230\025\230a\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\017\210q\220\003\2203\220a\330\013 \240\001\240\026\240q\250\013\2601\260C\260q\270\016\300a\300q\340\010\024\220E\230\022\230<\240q\330\014\023\220>\240\021\240%\240x\250q\330\014\r\330\020\024\220A\220S\230\003\2303\230a\230s\240\"\240A\330\017(\250\001\250\026\250q\260\016\270a\270t\3001\300N\320RS\320SV\320VW\320WZ\320Z\\\320\\]\340\010\016\210l\230!\2305\240\001\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300""\001\330\014\025\220Q\340\010\t\330\014\017\210q\220\003\2203\220a\330\013\"\240!\2406\250\021\250+\260Q\260c\270\021\270.\310\001\310\021\340\010\024\220E\230\022\230<\240q\330\014\023\320\023#\2401\240E\250\030\260\021\330\014\r\330\020\024\220A\220S\230\003\2303\230a\230s\240\"\240A\330\017*\250!\2506\260\021\260.\300\001\300\024\300Q\300n\320TU\320UX\320XY\320Y\\\320\\^\320^_\360\006\000\005\022\220\021\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210%\210q\340\t\014\210A\330\t\r\210Q\330\t\n\210#\210Q\330\t\n\210$\210a\340\t\r\210Q\330\t\016\210a\330\t\n\210$\210a\330\t\n\210%\210q\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\014\210A\330\t\n\210#\210Q\330\t\n\210#\210Q\340\t\014\210A\330\t\n\210#\210Q\330\t\r\210Q\330\t\n\210$\210a\340\t\014\210A\330\t\r\210Q\330\t\014\210A\330\t\r\210Q\340\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\330\t\r\210Q\330\t\r\210Q\330\t\n\210$\210a\330\t\n\210$\210a\340\t\r\210Q\330\t\n\210$\210a\330\t\014\210A\330\t\n\210#\210Q\340\t\n\210&\220\001\330\t\023\2201\330\t\n\210'\220\021\330\t\024\220A\330\t\017\210u\220A\330\t\022\220%\220q\330\t\017\210v\220Q\330\t\022\220&\230\001\340\t\n\210,\220a\330\t\031\230\021\330\t\n\210&\220\001\330\t\023\2201\340\004\010\210\005\210Z\220q\330\010\016\210b\220\006\220a\220q\230\006\230f\240A\340\010\016\210l\230!\2305\240\001\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\017\210q\220\003\2203\220a\330\013\"\240!\2406\250\021\250+\260Q\260c\270\021\270.\310\001\310\021\340\010\024\220E\230\022\230<\240q\330\014\023\320\023#\2401\240E\250\030\260\021\330\014\r\330\020\024\220A\220S\230\003\2303\230a\230s\240\"\240A\330\017*\250!\2506\260\021\260.\300\001\300\024\300Q\300n\320TU\320UX\320XY\320Y\\\320\\^\320^_\340\010\016\210m\2301\230E\240\021\330\010\017\210w\220a\220u\230B\230g\240Q\240h\320.@\300\001\300\031\310!\330\010\t\330\014\017\210q\220\003\2203\220a\330\013#\2401\240F\250!""\250;\260a\260s\270!\270>\310\021\310!\340\010\024\220E\230\022\230<\240q\330\014\023\320\023$\240A\240U\250(\260!\330\014\r\330\020\024\220A\220S\230\003\2303\230a\230s\240\"\240A\330\017+\2501\250F\260!\260>\300\021\300$\300a\300~\320UV\320VY\320YZ\320Z]\320]_\320_`\340\004\t\210\021\210!\340\004\005\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\320\000\034\230A\330\004\t\320\t\034\230A\340\004\010\210\005\210U\220\"\220G\2301\330\010\016\210l\230!\2301\330\010\016\210h\220a\220q\330\010\017\210t\2203\220e\2302\230Q\230d\240!\2408\2501\250A\340\004\013\210<\220q\230\001\330\004\013\210<\220r\230\021\330\004\013\2104\210|\2302\230Q\330\004\013\210<\220r\230\021\340\004\010\210\001\320\000\034\230A\330\004\t\320\t\034\230A\340\004\010\210\005\210U\220\"\220G\2301\330\010\016\210l\230!\2301\330\010\016\320\016\037\230q\240\001\330\010\017\210t\2203\220e\2302\230Q\230d\240!\2408\2501\250A\340\004\t\210\021\210!\340\004\010\210\001\320\000\032\230!\330\004\t\320\t\034\230A\360\n\000\005\t\210\010\220\005\220Q\220c\230\021\330\010\014\210H\220E\230\021\230#\230Q\330\014\020\220\013\2305\240\001\240\023\240A\330\020\021\330\025\030\230\003\2305\320 5\260Q\260f\270F\300!\330\027\030\330\024\025\330\020\026\220j\240\001\240\026\240v\250Q\330\020\023\2202\220S\230\007\230s\240#\240V\2503\250a\330\024\025\330\020\021\330\024\027\220v\230S\240\002\240$\240c\250\027\260\003\2602\260T\270\023\270E\300\023\300A\330\023\025\220Q\220f\230A\230V\2401\240J\250a\250x\260q\270\003\2701\270C\270q\300\001\340\004\t\210\021\210!\340\004\010\210\001\320\000!\240\021\330\004\t\320\t\034\230A\340\004\010\210\010\220\005\220Q\220c\230\021\330\010\016\320\016\037\230q\240\001\330\010\016\210o\230Q\230a\330\010\017\210t\2203\220e\2302\230Q\230g\240Q\240h\250a\250q\330\004\t\210\021\210!\340\004\010\210\001\320\000\032\230!\330\004\t\320\t\034\230A\360\n\000\005\t\210\010\220\005\220R\220w\230a\330\010\014\210I\220U\230!\2303\230a\330\014\020\220\007\220u\230A\230S\240""\001\330\020\023\2204\220r\230\021\330\024\035\230Q\230e\240=\260\001\260\026\260q\330\020\026\220j\240\001\240\026\240w\250a\330\020\026\220h\230a\230v\240W\250A\330\020\027\220t\2303\230e\2402\240Q\240f\250A\250W\260A\260V\2701\270H\300A\300Q\330\004\t\210\021\210!\340\004\010\210\001\320\000\031\230\021\340\004\014\210A\330\t\016\210a\330\t\016\210a\330\t\023\2201\330\t\023\2201\330\t\025\220Q\330\t\017\210q\330\t\027\220q\330\t\025\220Q\330\t\025\220Q\330\t\025\220Q\330\t\027\220q\330\t\021\220\021\330\t\032\230!\330\t\030\230\001\330\t\032\230!\330\t\034\230A\330\t\020\220\001\330\t\022\220!\330\t\024\220A\330\t\024\220A\330\t\031\230\021\330\t\033\2301\330\t\034\230A\330\t\036\230a\330\t\035\230Q\330\t\031\230\021\330\t\026\220a\330\t\027\220q\330\t\037\230q\330\t!\240\021\340\004\010\210\004\210F\220!\340\010\016\210i\220q\230\001\330\010\017\210t\2203\220d\320\032.\250a\250w\260a\260\177\300a\300q\360\006\000\t\016\210Y\220a\220q\330\010\r\210X\220Q\220a\330\010\t\330\014\016\210h\220c\230\022\2301\330\014\020\220\002\220(\230#\230R\230q\330\014\020\220\002\220)\2303\230b\240\001\330\014\020\220\002\220)\2303\230b\240\001\330\014\020\220\002\220(\230#\230R\230q\330\014\020\220\002\220)\2303\230b\240\001\330\014\020\220\002\220)\2303\230b\240\001\330\014\020\220\002\220)\2303\230b\240\001\330\014\020\220\002\220*\230C\230r\240\021\330\013\"\240!\240:\250Q\320.>\270a\270z\310\021\310!\360\006\000\t\016\210[\230\001\230\021\330\010\r\210Z\220q\230\001\330\010\t\330\014\016\210f\220C\220r\230\021\330\014\020\220\002\220(\230#\230R\230q\330\014\020\220\002\220(\230#\230R\230q\330\014\020\220\002\220-\230s\240\"\240A\330\013\"\240!\240:\250Q\320.>\270a\270z\310\021\310!\360\006\000\t\016\210[\230\001\230\021\330\010\r\210Z\220q\230\001\330\010\t\330\014\017\210s\220!\330\013\"\240!\240:\250Q\320.>\270a\270z\310\021\310!\340\004\t\210\021\210!\320\000$\240A\330\013\014\340\004\013\210;\220c\230\034\240Q\240h\250j\270\001\270\023\270A\330\004\013\210;\220c\230\034""\240Q\240h\250j\270\001\270\023\270C\270x\300q\330\004\013\210;\220c\230\034\240Q\240h\250j\270\001\270\023\270C\270x\300q\330\004\013\320\013\035\230S\240\014\250A\250X\260Z\270q\300\003\3003\300c\310\030\320QT\320Ta\320ab\330\004\013\320\013\035\230S\240\014\250A\250X\260Z\270q\300\003\3003\300c\310\030\320QR\330\004\013\320\013\035\230S\240\014\250A\250X\260Z\270q\300\003\3003\300c\310\030\320QT\320Ta\320ab\330\004\013\210<\220s\230,\240a\240x\250z\270\021\270$\270a\330\004\013\210<\220s\230,\240a\240x\250z\270\021\270$\270c\300\031\310!\330\004\013\210<\220s\230,\240a\240x\250z\270\022\2704\270s\300)\3101\330\004\013\320\013\036\230c\240\034\250Q\250h\260j\300\002\300$\300c\310\023\310I\320UX\320Xf\320fg\330\004\013\320\013\036\230c\240\034\250Q\250h\260j\300\002\300$\300d\310#\310Y\320VW\330\004\013\320\013\036\230c\240\034\250Q\250h\260j\300\002\300$\300d\310#\310Y\320VY\320Yg\320gh\340\004\010\210\005\210U\220\"\220D\230\001\330\010\014\210E\220\025\220b\230\004\230A\330\014\021\220\030\230\032\2401\240F\250#\250X\260Q\330\014\025\220S\230\001\230\030\240\031\250$\250a\250x\260y\300\001\300\021\330\014\025\220V\2301\230C\230q\240\010\250\002\250!\340\020\031\230\026\230s\240#\240R\240v\250R\250q\330\014\023\2207\230#\230\\\250\021\250!\340\004\t\210\030\220\032\2301\230C\230s\240!\330\004\013\2102\210^\2301\330\004\013\2105\220\003\2209\230A\230Q\330\004\013\2103\210a\210u\220B\220k\240\023\240H\250A\250Q\330\004\t\210\030\220\032\2302\230T\240\024\240Q\330\004\013\2102\210^\2301\330\004\013\2105\220\003\2209\230A\230Q\330\004\013\2103\210a\210u\220B\220k\240\023\240H\250A\250Q\340\004\023\2208\2301\360\006\000\005\013\210(\220\"\220D\230\004\230A\330\004\013\2103\210c\220\030\230\021\230!\330\004\013\2104\210q\220\010\230\001\230\026\230s\240(\250!\330\004\013\2104\210q\220\010\230\001\230\025\230g\240S\250\010\260\001\330\004\013\2104\210q\220\010\230\001\230\025\230h\240m\2603\260h\270a\330\004\013\2104\210q\220\010\230\001\230\025\230k\250\023\250A\330""\004\013\2104\210q\220\010\230\001\230\025\230c\240\030\250\021\330\004\013\2104\210q\220\010\230\001\230\024\230W\240C\240x\250q\330\004\013\2104\210q\220\010\230\001\230\024\230X\240]\260#\260X\270Q\330\004\013\2104\210q\220\010\230\001\230\024\230[\250\003\2501\330\004\013\2103\210c\220\031\230!\2309\240A\240Q\330\004\013\2103\210c\220\030\230\021\230(\240!\2401\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\"\240!\330\013\014\360\006\000\005\t\210\001\330\004\n\210\"\210F\220!\2201\220B\220d\230%\230u\240A\240Q\240c\250\022\2502\250U\260&\270\001\330\004\014\210C\210w\220a\220q\330\004\014\210E\220\027\230\001\230\033\240B\240a\330\004\014\210L\230\001\230\021\330\004\014\210M\230\021\230!\330\004\014\210K\220q\230\001\330\004\014\210L\230\001\230\021\330\004\014\210N\230!\2301\330\004\014\210N\230!\2301\330\004\r\320\r \240\001\240\021\330\004\010\210\005\210U\220!\2203\220a\220q\330\010 \240\005\240Q\240a\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230f\240A\240Q\360\006\000\t\020\210y\230\001\230\021\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2207\230#\230T\240\022\2401\240D\250\013\2601\260A\330\010\017\210t\2205\230\003\2304\230r\240\021\240$\240i\250q\260\001\360\006\000\t\020\210z\230\021\230!\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2207\230#\230T\240\022\2401\240D\250\013\2601\260A\330\010\017\210t\2205\230\003\2304\230r\240\021\240$\240i\250q\260\001\360\006\000\t\021\220\n\230!\2301\330\010\017\210u\220F\230#\230T\240\022\2401\240E\250\032\2601\260A\330\010\017\210u\220H\230C\230t\2402\240Q\240e\250<\260q\270\001\330\010\017\210u\220H\230C\230t\2402\240Q\240e\250<\260q\270\001\330\010\017\210u\220M\240\023\240D\250\002\250!\2505\3200A\300\021\300!\360\006\000\t\021\220\013\2301\230A\330\010\017\210u""\220F\230#\230T\240\022\2401\240E\250\032\2601\260A\330\010\017\210u\220H\230C\230t\2402\240Q\240e\250<\260q\270\001\330\010\017\210u\220H\230C\230t\2402\240Q\240e\250<\260q\270\001\330\010\017\210u\220M\240\023\240D\250\002\250!\2505\3200A\300\021\300!\360\006\000\t\017\210h\220a\220q\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\360\006\000\t\017\210i\220q\230\001\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220)\2303\230d\240\"\240A\240S\250\r\260Q\260a\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\330\010\017\210s\220(\230#\230T\240\022\2401\240C\240|\2601\260A\360\006\000\t\020\210y\230\001\230\021\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2207\230#\230T\240\022\2401\240D\250\013\2601\260A\330\010\017\210t\2205\230\003\2304\230r\240\021\240$\240i\250q\260\001\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2208\2303\230d\240\"\240A\240T\250\034\260Q\260a\330\010\017\210t\2208\2303\230d\240\"\240A\240T\250\034\260Q\260a\330\010\017\210t\220=\240\003\2404\240r\250\021\250$\320.?\270q\300\001\360\006\000\t\020\210z\230\021\230!\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2207\230#\230T\240\022\2401\240D\250\013\2601\260A\330\010\017\210t\2205\230\003\2304\230r\240\021\240$\240i\250q\260\001\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2208\2303\230d\240\"\240A\240T\250\034\260Q""\260a\330\010\017\210t\2208\2303\230d\240\"\240A\240T\250\034\260Q\260a\330\010\017\210t\220=\240\003\2404\240r\250\021\250$\320.?\270q\300\001\360\006\000\005\013\210\"\210F\220!\2201\220B\220d\230%\230u\240A\240Q\240c\250\022\2502\250U\260&\270\001\330\004\016\210n\230A\230Q\330\004\017\210\177\230a\230q\330\004\014\210L\230\001\230\021\330\004\014\210M\230\021\230!\330\004\014\210K\220q\230\001\330\004\010\210\005\210U\220!\2203\220a\220q\330\010!\240\027\250\001\250\021\330\010!\240\030\250\021\250!\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\330\010\036\230e\2401\240A\360\006\000\t\020\210z\230\021\230!\330\010\017\210t\2206\230\023\230D\240\002\240!\2404\240z\260\021\260!\330\010\017\210t\2207\230#\230T\240\022\2401\240D\250\013\2601\260A\330\010\017\210t\2205\230\003\2304\230r\240\021\240$\240i\250q\260\001\360\006\000\t\017\210k\230\021\230$\230d\240!\330\010\017\210t\2203\220g\230R\230q\240\n\250!\2501\340\004\t\210\021\210!\340\004\010\210\001\320\000\032\230!\330\004\t\320\t\034\230J\240a\340\004\010\210\005\210U\220!\2201\220L\240\002\240&\250\014\260B\260a\330\010\016\210j\230\001\230\021\330\t\014\210C\210u\220H\230A\230Q\330\010\t\330\014\017\210v\220S\230\002\230$\230c\240\027\250\003\2502\250T\260\023\260E\270\023\270A\330\013\r\210Q\210d\220!\2208\2301\230C\230q\240\003\2401\240A\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\035\230Q\330\013\014\340\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\n\210(\220*\230A\230S\240\003\2401\330\004\013\2106\220\021\220$\220c\230\023\230C\230s\240#\240R\240q\340\004\n\210(\220*\230A\230S\240\007\240q\330\004\013\2106\220\021\220$\220c\230\027\240\003\2403\240c\250\022\2501\340\004\n\210(\220*\230A\230S\240\007\240q\330\004\013\2106\220\021\220$\220c\230\027\240\003\2403\240c\250\022\2501\340\004\n\210(\220*\230B\230d\240$\240a\330\004\013\2106\220\021\220%\220t\2304\230s\240#\240S\250\002\250!\340\004\n\210(\220*\230B\230d\240(\250!\330\004\013\2106\220\021\220%""\220t\2308\2403\240c\250\023\250B\250a\340\004\n\210(\220*\230B\230d\240(\250!\330\004\013\2106\220\021\220%\220t\2308\2403\240c\250\023\250B\250a\340\004\n\210(\220*\230A\230S\240\004\240A\330\004\013\2106\220\021\220$\220c\230\024\230X\240S\250\003\2502\250Q\340\004\n\210(\220*\230B\230d\240%\240q\330\004\013\2106\220\021\220%\220t\2305\240\010\250\003\2503\250b\260\001\340\004\t\210\021\210!\340\004\010\210\001\320\000\035\230Q\330\013\014\330\004\t\320\t\031\230\021\340\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260D\270\010\300\001\360\006\000\005\014\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\021\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260A\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260C\260q\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260C\260s\270!\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\021\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260A\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260C\260q\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240S\250\010\260\001\260\023\260C\260s\270!\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240T\250\023\250H\260A\260S\270\003\2703\270c\300\021\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240#\240T\250\024\250S\260\010\270\001\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240#\240T\250\023\250G\2603\260h\270a\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240#\240T\250\023\250H\260H\270C\270x\300q\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240#\240T\250\023\250G\2603\260a\360\006\000\005\t\210\005\210W\220A\330\010\t\210\030\220\031\230$\230b\240\005\240T\250\030\260\021\330\t\021\220\031\230$\230b\240\005\240T\250\030\260\021\260!\330\t""\021\220\031\230$\230a\230t\2407\250$\250h\260a\260q\330\t\021\220\031\230$\230a\230s\240'\250\024\250X\260Q\260a\340\010\t\330\r\020\220\006\220c\230\023\230A\330\014\021\220\023\220H\230C\230s\240!\330\014\021\220\023\220H\230C\230s\240!\330\014\022\220%\220r\230\023\230M\250\022\2503\250o\270Q\330\014\021\220\023\220H\230C\230s\240!\330\013\r\210Q\210h\220a\220q\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\035\230Q\330\013\014\330\004\t\320\t\031\230\021\340\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260D\270\010\300\001\360\006\000\005\014\2108\2205\230\001\230\023\230C\230s\240#\240X\250Q\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240X\250Q\250a\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240X\250Q\250c\260\021\330\004\013\2108\2205\230\001\230\023\230C\230s\240#\240X\250Q\250c\260\023\260A\330\004\013\2104\210q\220\010\230\001\230\023\230C\230t\2403\240h\250a\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240'\250\023\250H\260A\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240(\250(\260#\260X\270Q\330\004\013\2104\210q\220\010\230\001\230\023\230C\230s\240'\250\023\250A\360\006\000\005\014\2108\2205\230\006\230c\240\023\240H\250A\330\004\013\2108\2205\230\006\230c\240\023\240H\250A\250Q\330\004\013\2108\2209\230D\240\001\240\024\240U\250#\250S\260\010\270\001\270\021\330\004\013\2108\2209\230D\240\001\240\023\240E\250\023\250C\250x\260q\270\001\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\035\230Q\330\004\t\320\t\034\230A\340\004\010\210\010\220\005\220R\220v\230Q\330\010\014\210E\220\025\220a\220s\230!\330\014\022\220-\230q\240\006\240a\330\014\022\320\022$\240A\240V\2501\330\014\023\2204\220s\230%\230r\240\021\240$\240a\240x\250q\260\001\340\004\t\210\021\210!\340\004\010\210\001\320\000\035\230Q\330\004\t\320\t\034\230A\340\004\010\210\010\220\005\220R\220v\230Q\330\010\014\210E\220\025\220a\220s\230!\330\014\022\220-\230q\240\006\240a\330\014\022\220.\240\001\240\026\240q\330\014\023\2204\220s""\230%\230r\240\021\240&\250\001\250\024\250Q\250h\260a\260q\340\004\t\210\021\210!\340\004\010\210\001\320\000\025\220Q\340\004\020\220\001\340\004\034\230A\340\004\026\220a\330\004\026\220a\330\004\r\210Q\330\004\032\230!\330\004\031\230\021\330\004\027\220q\330\004\027\220q\330\004\021\220\021\330\004\025\220Q\330\004\033\2301\330\004\024\220A\330\004\024\220A\330\004\024\220A\340\004\027\220q\330\004\031\230\021\330\004\031\230\021\340\004\025\220Q\330\004\027\220q\330\004\023\2201\330\004\027\220q\330\004\030\230\001\330\004\027\220q\330\004\031\230\021\340\004\027\220q\330\004\031\230\021\330\004\031\230\021\340\004\034\230A\330\004\036\230a\330\004\036\230a\340\004\031\230\021\330\004\033\2301\330\004\027\220q\340\004\025\220Q\340\004\037\230q\330\004\037\230q\340\004 \240\001\330\004 \240\001\340\004\034\230A\330\004\032\230!\330\004!\240\021\330\004!\240\021\330\004!\240\021\330\004!\240\021\340\004\016\210a\330\004\026\220a\330\004\027\220q\330\004\031\230\021\340\004\023\2201\330\004\034\230A\320\000\035\230Q\330\004\021\220\021\330\004\014\210A\330\004\037\230s\240!\2401\330\004\010\210\010\220\001\330\010\t\330\014\031\230\021\230%\230r\240\027\250\003\2506\260\022\2601\330\017\020\360\006\000\005\t\210\010\220\001\330\010\t\330\014\031\230\021\230&\240\002\240&\250\003\2506\260\022\2601\330\017\020\360\006\000\005\006\330\010\025\220Q\220d\230#\230Q\330\013\014\360\006\000\005\006\330\010\025\220Q\220d\230#\230Q\330\013\014\360\006\000\005\014\210=\230\001\230\027\240\003\2407\250#\250Q\340\004\t\210\021\210!\320\000\035\230Q\360\034\000\005\n\320\t\034\230A\340\004\007\200z\220\021\220)\2301\330\010\017\210q\330\004\005\330\010\017\210z\230\021\230'\240\021\330\013\014\330\010\017\210v\220Q\220c\230\023\230L\250\001\250\021\320\000%\240Q\330\013\025\220Q\340\004\r\210U\220%\220u\230E\240\025\240e\2505\260\006\260f\270A\330\004\010\210\010\220\001\330\010\014\210E\220\025\220b\230\005\230Q\330\014\023\2202\220[\240\001\240\023\240A\330\014\021\220\024""\220W\230A\320\035.\250g\260Q\260a\330\014\023\320\023#\2401\240F\250#\250Q\330\014\023\220:\230Q\230f\240C\240x\250q\260\001\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\035\230Q\330\013\014\340\004\t\210\030\220\031\230$\230a\330\004\t\210\022\2101\330\004\013\2105\220\003\2207\230!\2304\230q\330\004\013\2105\220\003\2206\230\021\230$\230a\330\004\013\2105\220\003\220<\230q\240\004\240A\340\004\t\210\030\220\031\230$\230a\230q\330\004\t\210\022\2101\330\004\013\2106\220\023\220G\2301\230D\240\001\330\004\013\2105\220\003\2206\230\021\230$\230a\330\004\013\2108\220:\230S\240\003\240<\250q\260\004\260A\340\004\t\210\030\220\031\230$\230a\230x\240y\260\001\260\021\330\004\t\210\022\2101\330\004\013\2106\220\023\220G\2301\230D\240\001\330\004\013\2108\220:\230S\240\003\2406\250\021\250$\250a\330\004\013\2108\220:\230Q\230f\240C\240s\250,\260a\260t\2701\340\004\t\210\030\220\031\230$\230a\330\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260D\270\010\300\001\330\004\013\2108\2203\220l\240!\2404\240q\330\004\t\210\030\220\031\230!\2308\240:\250Q\250f\260C\260x\270q\330\004\013\2108\2203\220l\240!\2404\240q\330\004\t\210\030\220\031\230!\2308\240:\250Q\250g\260S\270\t\300\021\330\004\013\2108\2203\220l\240!\2404\240q\330\004\t\210\030\220\031\230!\2308\240:\250Q\250g\260T\270\031\300!\330\004\013\2108\2203\220l\240!\2404\240q\340\004\t\210\021\210!\340\004\010\210\001\320\000\035\230Q\330\013\014\340\004\031\230\030\240\021\360\006\000\005\n\210\030\220\031\230$\230a\330\004\013\2105\220\001\220\021\330\004\013\210;\220a\220q\340\004\t\210\036\220q\230\003\2303\230a\330\004\013\2105\220\001\220\021\330\004\013\2104\210{\230!\2301\340\004\t\210\021\210!\340\004\010\320\010\030\230\001\320\000%\240Q\330\013\014\340\004\t\210\022\210;\220a\220q\330\004\013\2107\220!\2201\330\004\017\210q\220\001\340\004\n\210!\330\004\013\2104\210w\220a\220q\330\004\005\330\010\023\2201\220A\330\013\014\360\006\000\t\017\210n\230A\230Q\340\004\t\210\021\210!\340\004\010\210\001""\320\000\035\230Q\330\013\014\330\004\t\210\036\220q\340\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\n\210(\220)\2301\230H\240J\250a\250v\260S\270\010\300\001\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260q\330\004\n\210(\220)\2301\230H\240J\250a\250v\260T\270\030\300\021\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260q\330\004\n\210(\220)\2301\230H\240J\250a\250w\260d\270)\3001\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260q\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260x\270y\310\001\310\021\340\004\010\210\005\210Q\210d\220(\230(\240(\250!\330\010\016\210h\220a\220s\230!\330\010\017\210u\220A\220Q\220j\240\004\240A\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\340\010\016\210h\220a\220s\230!\330\010\017\210u\220A\220Q\220m\2404\240q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\330\014\017\210q\360\006\000\005\014\320\013(\250\003\250<\260q\270\004\270A\330\004\013\320\013-\250S\260\014\270A\270X\300Q\330\004\013\320\0131\260\023\260L\300\001\300\030\310\021\330\004\013\320\013(\250\003\250<\260q\270\010\300\005\300Q\330\004\013\320\013!\240\023\240L\260\001\260\026\260x\270q\300\014\310D\320PU\320UV\330\004\013\320\013-\250S\260\014\270A\270X\300U\310!\330\004\013\320\013&\240c\250\034\260Q\260f\270H\300A\300\\\320QU\320UZ\320Z[\330\004\013\2102\210Z\220s\230#\230Y\240a\240q\330\004\013\2106\220\032\2303\230c\240\031\250!\2508\2601\330\004\013\2106\220\032\2303\230b\240\002\240#\240Y\250a\250x\260q\330\004\013\2106\220\032\2303\230c\240\031\250!\2508\2601\330\004\013\2106\220\032\2303\230b\240\002\240#\240Y\250a\250x\260q\330\004\005\330\t\013\210:\220S\230\002\230+\240R\240q\330\010\n\210\"\210F\220\"\220A\330\010\n\210\"\210H\220B\220a\330\010""\n\210\"\210A\330\010\n\210\"\210M\230\022\2301\340\004\013\2105\220\003\2209\230A\230Q\330\004\013\2105\220\003\2209\230A\230X\240Q\330\004\r\210X\220Z\230q\240\006\240c\250\030\260\022\260>\300\021\330\004\013\2105\220\002\220'\230\023\230I\240Q\240h\250a\330\004\t\210\023\210A\210U\220\"\220A\330\004\013\2103\210c\220\030\230\021\230!\330\004\013\2103\210c\220\030\230\021\230(\240!\330\004\013\2103\210c\220\027\230\002\230+\240S\250\010\260\001\260\030\270\021\330\004\010\210\005\210Q\210d\220(\230(\240(\250!\330\010\017\210q\220\n\230#\230S\240\010\250\001\250\021\340\004\013\2108\2205\230\001\230\026\230s\240!\330\004\014\210H\220E\230\021\230#\230S\240\003\2401\330\004\014\210H\220E\230\021\230#\230S\240\003\2403\240a\330\004\013\2103\210c\220\032\2301\230F\240!\330\004\013\2107\220#\220Z\230q\240\006\240a\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250J\260a\260v\270Q\330\004\n\210(\220)\2304\230q\330\004\013\2103\210h\220a\220u\230C\230w\240c\250\027\260\003\260<\270q\330\004\013\2105\220\003\220:\230Q\230f\240A\330\004\013\2104\210x\220q\230\007\230q\330\004\013\2105\220\003\220:\230Q\230f\240A\330\004\013\2103\210h\220a\220u\230C\230w\240c\250\027\260\003\260<\270q\330\004\013\2105\220\003\220:\230Q\340\004\013\2108\2209\230A\230V\2403\240c\250\023\250J\260a\260q\330\004\013\2108\2209\230A\230V\2403\240c\250\027\260\005\260S\270\n\300!\3006\310\021\330\004\013\2104\210q\220\010\230\001\230\031\240!\2406\250\023\250H\260A\330\004\013\2104\210q\220\010\230\001\230\031\240!\2405\250\007\250s\260(\270!\330\004\013\2104\210q\220\010\230\001\230\031\240!\2405\250\010\260\014\270C\270x\300q\330\004\013\2104\210q\220\010\230\001\230\031\240!\2405\250\014\260C\260q\330\004\013\2104\210q\220\010\230\001\230\025\230c\240\030\250\021\330\004\013\2104\210q\220\010\230\001\230\024\230W\240C\240x\250q\330\004\013\2104\210q\220\010\230\001\230\024\230X\240\\\260\023\260H\270A\330\004\013\2104\210q\220\010\230\001\230\024\230\\\250\023\250A\330\004\013\2103\210c\220""\030\230\021\230)\2401\240A\330\004\013\2107\220#\220X\230Q\230i\240q\250\001\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250I\260Q\260b\270\n\300!\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250I\260Q\260i\270q\300\010\310\001\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250I\260Q\260i\270q\300\010\310\001\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250I\260Q\260i\270q\300\010\310\001\330\004\013\2108\2209\230A\230V\2403\240c\250\023\250I\260Q\260i\270q\300\010\310\001\330\004\013\2103\210c\220\031\230!\2309\240A\240Q\330\004\013\2107\220#\220Y\230a\230y\250\001\250\030\260\030\270\021\330\004\013\2103\210c\220\030\230\021\230(\240!\2401\330\004\013\2107\220#\220X\230Q\230h\240a\240x\250x\260q\340\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\n\210(\220)\2301\230H\240J\250a\250v\260S\270\010\300\001\330\004\n\210(\220)\2301\230H\240J\250a\250v\260T\270\030\300\021\330\004\n\210(\220)\2301\230H\240J\250a\250w\260d\270)\3001\330\004\n\210(\220)\2301\230A\330\004\010\210\006\210a\210v\220U\230%\230u\240A\330\010\016\210b\220\010\230\001\230\027\240\001\330\010\r\210S\220\n\230!\330\010\017\210x\220y\240\016\250a\250t\2604\260s\270(\300!\3004\300q\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\"\240!\330\013\021\220\021\340\004\010\210\005\210Q\210f\220F\230&\240\006\240c\250\025\250e\2605\270\005\270T\300\025\300a\330\010\016\210d\220*\230A\230Q\330\010\016\210l\230!\2301\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c""\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220*\230C\230s\240+\250R\250q\260\003\260<\270q\300\003\3001\340\010\016\210d\220'\230\021\230!\330\010\016\210i\220q\230\001\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220(\230#\230S\240\t\250\022\2501\250C\250|\2701\270C\270q\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220)\2303\230c\240\032\2502\250Q\250c\260\034\270Q\270c\300\021\330\010\017\210s\220*\230C\230s\240+\250R\250q\260\003\260<\270q\300\003\3001\340\004\010\210\005\210Q\210b\220\006\220a\220r\230\021\330\010\t\330\014\030\230\001\230\021\330\017\020\360\006\000\r\023\220.\240\001\240\021\330\010\t\330\014\025\220Q\220a\330\017\020\360\006\000\r\023\220.\240\001\240\021\340\004\t\210\021\210!\340\004\010\210\001\320\000 \240\001\330\004\030\230\001\330\004\030\230\001\330\004\010\210\005\210U\220!\2203\220a\330\010\016\320\016\036\230a\230q\330\010\016\210a\330\010\017\210t\2203\220e\2302\230Q\230d\240!\2408\2501\250A\330\010\021\220\021\330\010\013\2106\220\023\220A\330\014\024\220A\330\014\025\220Q\330\004\t\210\021\210!\320\000\036\230a\330\013\014\340\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\n\210(\220)\2301\230H\240J\250a\250v\260S\270\010\300\001\330\004\n\210(\220)\2301\230H\240J\250a\250v\260T\270\030\300\021\330\004\n\210(\220)\2301\230H\240J\250a\250w\260d\270)\3001\330\004\n\210(\220)\2301\230A\340\004\010\210\006\210a\210v\220U\230%\230u\240A\330\010\017\210r\220\030\230\021\230'\240\024\240S\250\r\260Q\260d\270!\330\004\013\2102\210S""\220\017\230q\240\002\240(\250!\2507\260%\260u\270D\300\002\300!\340\004\t\210\021\210!\340\004\010\210\001\320\000&\240a\330\013\025\220Q\340\004\r\210U\220%\220u\230E\240\025\240e\2505\260\006\260f\270A\330\004\010\210\010\220\001\330\010\014\210E\220\025\220b\230\005\230Q\330\014\023\2202\220\\\240\021\240#\240Q\330\014\021\220\024\220W\230A\320\035/\250w\260a\260q\330\014\023\320\023#\2401\240F\250#\250Q\330\014\023\220:\230Q\230f\240C\240x\250z\270\021\270-\300s\310!\3101\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\026\220a\340\004\010\210\005\210U\220!\2201\330\010\014\210C\210q\220\001\340\010\013\2102\210T\220\025\220e\2301\330\014\023\220:\230Q\230a\330\014\023\220>\240\021\240!\340\014\023\2204\220z\240\021\240!\330\014\023\2204\220~\240Q\240a\340\010\013\2102\210T\220\025\220e\2301\330\014\023\220;\230a\230q\330\014\023\220?\240!\2401\340\014\023\2204\220{\240!\2401\330\014\023\2204\220\177\240a\240q\340\010\013\2102\210S\220\001\330\014\023\220;\230a\230q\330\014\023\220?\240!\2401\340\014\023\2204\220{\240!\2401\330\014\023\2204\220\177\240a\240q\340\010\013\2102\210T\220\025\220a\330\014\023\220>\240\021\240!\330\014\023\320\023%\240Q\240a\340\014\023\2204\220~\240Q\240a\330\014\023\2204\320\027)\250\021\250!\340\010\013\2102\210S\220\001\330\014\023\220>\240\021\240!\330\014\023\320\023&\240a\240q\340\014\023\2204\220~\240Q\240a\330\014\023\2204\320\027*\250!\2501\340\010\013\2102\210S\220\001\330\014\023\320\023(\250\001\250\021\330\014\023\320\023-\250Q\250a\340\014\023\2204\320\027,\250A\250Q\330\014\023\2204\320\0271\260\021\260!\340\010\013\2102\210S\220\001\330\014\023\320\023(\250\001\250\021\330\014\023\320\023-\250Q\250a\340\014\023\2204\320\027,\250A\250Q\330\014\023\2204\320\0271\260\021\260!\340\010\013\2102\210S\220\001\330\014\023\220?\240!\2401\330\014\023\320\023'\240q\250\001\330\014\023\2208\2301\230A\330\014\023\220=\240\001\240\021\340\014\023\2204\220\177\240a\240q\330\014\023\2204\320\027+\2501\250A\330\014\023\2204""\220x\230q\240\001\330\014\023\2204\220}\240A\240Q\340\010\013\2102\210R\210s\220#\220R\220s\230!\330\014\023\220<\230q\240\001\330\014\023\320\023#\2401\240A\340\014\023\2204\220|\2401\240A\330\014\023\2204\320\027'\240q\250\001\340\010\013\2102\210S\220\003\2203\220b\230\003\2301\330\014\023\320\023(\250\001\250\021\330\014\023\320\023,\250A\250Q\340\014\023\2204\320\027,\250A\250Q\330\014\023\2204\320\0270\260\001\260\021\340\004\010\210\005\210Q\210f\220A\330\010\017\210t\220>\240\021\240!\330\010\017\210t\220?\240!\2401\330\010\017\210t\220?\240!\2401\330\010\017\210t\320\023%\240Q\240a\330\010\017\210t\320\023#\2401\240A\330\010\017\210t\320\023,\250A\250Q\330\010\017\210t\320\023&\240a\240q\330\010\017\210t\320\023-\250Q\250a\330\010\017\210t\320\023-\250Q\250a\330\010\017\210t\320\023'\240q\250\001\330\010\017\210t\220=\240\001\240\021\360\006\000\005\t\210\005\210U\220!\2205\230\001\330\010\017\210t\220?\240!\2401\330\010\017\210t\320\023'\240q\250\003\2501\250A\330\010\017\210x\220q\230\001\330\010\017\210}\230A\230S\240\001\240\021\360\010\000\005\014\320\013\035\230Q\230e\2403\240c\250\021\330\004\013\320\013\035\230Q\230f\240C\240s\250!\330\004\013\320\013\035\230Q\230g\240S\250\003\2501\330\004\013\320\013\035\230Q\230f\240C\240s\250!\330\004\013\320\013\035\230Q\230g\240S\250\003\2501\330\004\013\320\013\035\230Q\230d\240#\240S\250\001\330\004\013\320\013\035\230Q\230f\240C\240s\250!\330\004\013\320\013\035\230Q\230f\240C\240s\250!\360\006\000\005\016\210Q\330\004\013\210=\230\001\230\023\230C\230s\240!\330\004\013\210=\230\001\230\023\230C\230t\2401\330\004\013\210=\230\001\230\026\230s\240$\240a\360\006\000\005\014\210>\230\021\230#\230S\240\003\2401\330\004\013\210>\230\021\230#\230S\240\004\240A\330\004\013\210>\230\021\230&\240\003\2404\240q\360\006\000\005\014\210<\220q\230\003\2303\230c\240\021\330\004\013\210<\220q\230\003\2303\230d\240!\330\004\013\210<\220q\230\006\230c\240\024\240Q\360\006\000\005\t\210\001\330\004\013\210=\230\001\230\023""\230C\230s\240!\330\004\013\210=\230\001\230\023\230C\230t\2401\330\004\013\210=\230\001\230\026\230s\240$\240a\360\006\000\005\014\320\013\033\2301\230C\230s\240#\240Q\330\004\013\320\013\033\2301\230C\230s\240$\240a\330\004\013\320\013\033\2301\230C\230t\2404\240q\330\004\013\320\013\033\2301\230C\230s\240$\240a\330\004\013\320\013\033\2301\230C\230s\240#\240Q\330\004\013\320\013\033\2301\230F\240#\240T\250\021\360\006\000\005\t\210\001\330\004\013\210<\220q\230\003\2303\230c\240\021\330\004\013\210<\220q\230\003\2303\230d\240!\330\004\013\210<\220q\230\003\2303\230d\240!\330\004\010\210\001\330\004\013\210<\220q\230\003\2303\230d\240!\330\004\010\210\001\330\004\013\210<\220q\230\003\2303\230d\240!\330\004\013\210<\220q\230\006\230c\240\024\240Q\360\006\000\005\t\210\001\330\004\013\210=\230\001\230\023\230C\230s\240!\330\004\013\210=\230\001\230\023\230C\230t\2401\330\004\013\210=\230\001\230\026\230s\240$\240a\360\006\000\005\014\210?\230!\2303\230c\240\023\240A\330\004\013\210?\230!\2303\230c\240\024\240Q\330\004\013\210?\230!\2306\240\023\240D\250\001\360\006\000\005\014\210?\230!\2303\230c\240\023\240A\330\004\013\210?\230!\2303\230c\240\024\240Q\330\004\013\210?\230!\2306\240\023\240D\250\001\360\006\000\005\014\320\013\034\230A\230V\2403\240c\250\021\330\004\013\320\013\034\230A\230W\240C\240s\250!\330\004\013\320\013\034\230A\230[\250\003\2503\250a\330\004\013\320\013\034\230A\230\\\250\023\250C\250q\330\004\013\320\013\034\230A\230T\240\023\240D\250\001\330\004\013\320\013\034\230A\230V\2403\240d\250!\360\006\000\005\t\210\003\2104\210v\220Q\330\010\t\210\025\210d\220!\330\t\017\210t\2201\330\t\020\220\003\2201\330\t\021\220\023\220A\330\t\025\220S\230\001\330\t\026\220c\230\021\330\t\020\220\003\2201\330\t\021\220\023\220A\330\t\025\220S\230\001\330\t\026\220c\230\021\330\t\017\210s\220!\330\t\020\220\003\2201\330\t\024\220C\220q\330\t\025\220S\230\001\340\010\016\320\016'\240q\250\003\2501\330\010\017\210s\220(\230#\230T\240\022\2401\240D\250\001\250""\023\250L\270\001\270\021\330\010\017\210s\220-\230s\240$\240b\250\001\250\024\250Q\250c\3201B\300!\3001\340\004\n\320\n#\2401\240D\250\001\330\004\013\2103\210h\220d\230#\230R\230q\240\003\2401\330\004\013\2103\210m\2304\230s\240\"\240A\240S\250\001\330\004\n\320\n#\2401\240F\250!\330\004\013\2103\210h\220d\230#\230R\230q\240\003\2401\330\004\013\2103\210m\2304\230s\240\"\240A\240S\250\001\340\004\t\210\021\210!\320\000&\240a\330\013\014\340\004\t\210\022\210<\220q\230\003\2301\330\004\013\2107\220!\2201\330\004\017\210q\220\001\340\004\n\210!\330\004\013\2104\210w\220a\220q\330\004\005\330\010\023\2201\220A\330\013\014\360\006\000\t\017\210n\230A\230Q\340\004\t\210\021\210!\340\004\010\210\001\200\001\330\030 \240\001\340\004\026\220d\230&\240\001\330\004\007\200{\220#\220Q\330\010\017\210q\330\004\007\200|\2201\220N\240!\330\010\017\210q\330\004\005\330\010\017\210z\230\021\230!\330\004\013\210=\230\001\330\010\016\210f\320\024)\250\021\320*G\300r\310\033\320TU\320\000\037\230q\330\013\014\330\004\t\320\t\031\230\021\340\004\n\210(\220)\2301\230H\240J\250a\250v\260S\270\010\300\001\330\004\t\210\030\220\025\220a\220s\230#\230S\240\001\330\004\014\210H\220E\230\021\230#\230S\240\003\2403\240a\330\004\t\210\024\210Q\210c\220\023\220C\220q\330\004\r\210T\220\021\220#\220S\230\003\2303\230a\330\004\t\210\030\220\031\230!\2306\240\023\240C\240s\250#\250S\260\001\330\004\r\210X\220Y\230a\230v\240S\250\003\2503\250c\260\023\260C\260q\340\004\013\320\013\035\230S\240\016\250a\250w\260a\330\004\013\320\013\"\240#\240^\2601\260G\2701\330\004\013\210;\220c\230\036\240q\250\005\250X\260Q\260l\300$\300a\330\004\013\320\013\033\2303\230n\250A\250U\260(\270!\270<\300t\3101\330\004\013\2102\210V\2202\220U\230\"\230B\230h\240b\250\003\2502\250R\250x\260r\270\022\270=\310\002\310!\330\004\013\2105\220\003\220;\230a\230q\330\004\013\2105\220\003\220;\230a\230q\330\004\t\210\023\210A\210U\220\"\220A\330\004\013\2103\210c\220\032\2301\230A\330\004\013\2103\210c\220\032\2301\230A\340""\004\013\2103\210c\220\034\230Q\230a\330\004\013\2106\220\023\220L\240\001\240\021\330\004\013\2104\210q\220\014\230A\230U\240#\240X\250Q\330\004\013\2104\210q\220\014\230A\230T\240\027\250\003\2508\2601\330\004\013\2104\210q\220\014\230A\230T\240\030\250\030\260\023\260H\270A\330\004\013\2104\210q\220\014\230A\230T\240\027\250\003\2501\330\004\013\2104\210q\220\014\230A\230U\240#\240X\250Q\330\004\013\2104\210q\220\014\230A\230T\240\027\250\003\2508\2601\330\004\013\2104\210q\220\014\230A\230T\240\030\250\030\260\023\260H\270A\330\004\013\2104\210q\220\014\230A\230T\240\027\250\003\2501\340\004\013\2103\210c\220\032\2301\230A\330\004\013\2106\220\023\220J\230a\230q\330\004\013\2104\210q\220\n\230!\2305\240\003\2408\2501\330\004\013\2104\210q\220\n\230!\2304\230w\240c\250\030\260\021\330\004\013\2104\210q\220\n\230!\2304\230x\240x\250s\260(\270!\330\004\013\2104\210q\220\n\230!\2304\230w\240c\250\021\340\004\013\2103\210c\220\033\230A\230[\250\001\250\021\330\004\013\2106\220\023\220K\230q\240\013\2501\250E\260\021\330\004\013\2103\210c\220\032\2301\230J\240a\240q\330\004\013\2106\220\023\220J\230a\230z\250\021\250%\250q\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\037\230q\340\004\013\210?\230!\2305\240\003\2403\240c\250\021\330\004\013\210?\230!\2307\240#\240S\250\003\2501\330\004\013\210?\230!\2307\240#\240S\250\003\2501\330\004\013\210?\230!\2306\240\023\240C\240s\250!\330\004\013\210?\230!\2306\240\023\240C\240s\250!\340\004\010\210\005\210Q\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\330\010\t\340\010\t\330\014\033\2301\230C\230s\240#\240Q\240a\330\017\020\360\006\000\005\006\330\010\027\220q\230\004\230C\230q\330\013\014\360\006\000\005\006\330\010\027\220q\230\004\230C\230q\330\013\014\360\006\000\005\n\210\021\210!\320\000\037\230q\330\013\014\330\004\t\320\t\031\230\021\340\004\013\2108\2205\230\001\230\026\230s\240!\330\004\014\210D\220\001\220\026\220s\230!\330\004\t\210\030\220\031\230!""\2306\240\023\240A\340\004\n\210*\220A\220Q\330\004\013\2105\220\001\220\024\220Z\230t\2401\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\330\010\013\2101\340\004\013\210=\230\003\230>\250\021\250&\260\001\330\004\013\210=\230\003\230>\250\021\250!\330\004\013\2104\210z\230\023\230C\230{\250!\2501\330\004\014\210D\220\n\230#\230R\230{\250\"\250F\260#\260[\300\001\300\021\330\004\014\210D\220\n\230#\230R\230{\250\"\250M\270\023\270J\300a\300q\340\004\013\2105\220\003\220<\230q\240\001\330\004\013\2104\210q\220\014\230A\230X\240S\250\010\260\001\330\004\013\2104\210q\220\014\230A\230W\240G\2503\250h\260a\330\004\013\2104\210q\220\014\230A\230W\240H\250H\260C\260x\270q\330\004\013\2104\210q\220\014\230A\230W\240G\2503\250a\330\004\013\2104\210q\220\014\230A\230W\240C\240x\250q\330\004\013\2104\210q\220\014\230A\230V\2407\250#\250X\260Q\330\004\013\2104\210q\220\014\230A\230V\2408\2508\2603\260h\270a\330\004\013\2104\210q\220\014\230A\230V\2407\250#\250Q\340\004\013\2105\220\003\220:\230Q\230a\330\004\013\2104\210q\220\n\230!\2305\240\003\2408\2501\330\004\013\2104\210q\220\n\230!\2304\230w\240c\250\030\260\021\330\004\013\2104\210q\220\n\230!\2304\230x\240x\250s\260(\270!\330\004\013\2104\210q\220\n\230!\2304\230w\240c\250\021\340\004\n\210+\220Q\220d\230*\240A\330\004\013\2105\220\003\2204\220t\2304\230q\240\005\240S\250\010\260\001\340\004\n\210+\220R\220t\230:\240S\250\002\250+\260R\260q\330\004\013\2105\220\003\2204\220t\2304\230q\240\005\240S\250\010\260\001\340\004\n\210*\220B\220d\230*\240C\240r\250\033\260B\260a\330\004\013\2105\220\003\2204\220t\2304\230q\240\005\240S\250\010\260\001\340\004\n\210*\220A\220R\220z\240\021\330\004\013\2105\220\003\2204\220t\2304\230q\240\005\240S\250\010\260\001\340\004\t\210\021\210!\340\004\010\210\n\220!\320\000\037\230q\330\013\025\220Q\330\004\t\320\t\034\230A\360\006\000\005\014\2108\2209\230E\240\023\240F\250!\330\004\013\2108\2209""\230A\230X\240Z\250q\260\006\260c\270\030\300\024\300S\310\006\310a\310s\320RS\330\004\013\2108\2209\230A\230X\240Z\250q\260\007\260s\270)\3004\300s\310&\320PR\320RV\320VW\330\004\013\2108\2209\230A\230X\240Z\250q\260\006\260d\270(\300%\300s\310&\320PQ\320QU\320UV\330\004\013\2108\2209\230A\230X\240Z\250q\260\007\260t\2709\300E\310\023\310F\320RT\320TY\320YZ\360\006\000\005\014\2108\2201\220I\230S\240\010\250\001\340\004\t\210\021\210!\340\004\010\210\n\220&\230\001\320\000\037\230q\330\013\025\220Q\330\004\t\320\t\031\230\021\340\004\021\220\021\340\010\020\220\t\230\021\330\014\022\220$\220c\230\023\230D\240\007\240x\250q\3200E\300U\310!\340\010\020\220\t\230\021\330\014\022\220$\220c\230\023\230D\240\007\240x\250q\3200E\300U\310!\360\006\000\t\021\220\t\230\021\230&\240\004\240D\250\003\2504\250w\260h\270a\270x\300u\310A\330\010\020\220\t\230\021\230&\240\004\240D\250\003\2504\250w\260h\270a\270x\300u\310A\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/D\300E\310\021\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/D\300E\310\021\360\006\000\t\021\220\t\230\021\230&\240\003\2404\240s\250$\250g\260X\270Q\320>O\310u\320TU\330\010\020\220\t\230\021\230&\240\003\2404\240s\250$\250g\260X\270Q\320>O\310u\320TU\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/G\300u\310A\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/G\300u\310A\360\006\000\t\021\220\t\230\021\330\014\022\220$\220c\230\023\230D\240\007\240x\250q\3200H\310\005\310Q\340\010\020\220\t\230\021\330\014\022\220$\220c\230\023\230D\240\007\240x\250q\3200H\310\005\310Q\360\006\000\t\021\220\t\230\021\330\014\022\220#\220T\230\024\230T\240\024\240W\250H\260A\3205H\310\005\310Q\340\010\020\220\t\230\021\330\014\022\220#\220T\230\024\230T\240\024\240W\250H\260A\3205H\310\005\310Q\360\006\000\t\021\220\t\230\021\330\014\022\220$\220d\230#\230T\240\027\250\010\260\001\3201C\3005\310\001\340""\010\020\220\t\230\021\330\014\022\220$\220d\230#\230T\240\027\250\010\260\001\3201C\3005\310\001\360\006\000\t\021\220\t\230\021\230&\240\004\240D\250\007\250x\260q\3208I\310\025\310a\330\010\020\220\t\230\021\230&\240\004\240D\250\007\250x\260q\3208I\310\025\310a\330\010\020\220\t\230\021\230&\240\004\240D\250\007\250x\260q\3208I\310\025\310a\330\010\020\220\t\230\021\230&\240\004\240D\250\007\250x\260q\3208I\310\025\310a\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/D\300E\310\021\340\010\020\220\t\230\021\330\014\022\220#\220S\230\003\2304\230w\240h\250a\320/D\300E\310\021\360\010\000\005\t\210\006\210a\330\010\017\210\177\230a\230q\330\010\017\210x\220y\240\001\330\014\016\210a\330\014\016\210a\330\014\016\210a\330\014\016\210a\330\014\016\210a\330\014\016\210a\330\014\016\210a\330\014\017\210r\220\021\330\014\021\220\022\2201\340\010\t\330\014\020\220\006\220c\230\024\230Q\330\014\020\220\004\220G\2303\230d\240!\330\014\020\220\004\220E\230\023\230D\240\001\330\014\020\220\004\220F\230#\230T\240\021\330\014\020\220\004\220H\230C\230t\2401\330\014\020\220\004\220H\230C\230t\2401\330\014\020\220\004\220M\240\023\240D\250\001\330\014\020\220\004\220F\230#\230T\240\021\330\013%\240Q\320&>\270a\270q\340\004\t\210\021\210!\340\004\010\210\n\220*\230A\320\000'\240q\330\013\014\340\004\013\210:\220Q\220b\230\006\230a\230q\240\003\2403\240d\250&\260\001\330\004\013\210:\220Q\220b\230\006\230a\230t\2406\250\021\330\004\013\210:\220Q\220b\230\006\230a\230q\240\003\2403\240d\250&\260\n\270#\270Q\330\004\013\210:\220Q\220b\230\006\230a\230t\2406\250\032\2603\260a\340\004\t\210\021\210!\340\004\010\210\001\320\000\027\220q\330\004\t\320\t\031\230\021\360\n\000\005\t\210\010\220\005\220Q\220c\230\021\330\010\014\210I\220U\230!\2303\230a\330\014\020\220\007\220u\230A\230S\240\001\330\020\023\2204\220r\230\021\330\024\035\230Q\230e\240=\260\001\260\026\260q\330\020\026\220k\240\021\240&\250\007\250q\330\020\026\220d\230!\2306\240\027\250\004""\250H\260A\330\020\027\220t\2303\230e\2402\240Q\240f\250A\250W\260A\260V\2701\270H\300A\300Q\330\004\t\210\021\210!\340\004\010\210\001\320\000'\240q\330\013\014\340\004\r\210U\220%\220u\230E\240\025\240e\2505\260\006\260f\270A\340\004\010\210\013\2201\330\010\"\320\"5\260Q\260a\330\010\016\210b\220\006\220a\220q\230\002\230$\230e\2405\250\002\250&\260\010\270\006\270m\3101\310A\330\010\020\220\003\2207\230!\2301\330\010\014\210K\220q\330\014\022\220#\220W\230A\230]\250!\250;\260g\270Q\270a\330\014\022\320\022\"\240!\2405\250\001\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\330\014\022\320\022\"\240!\2405\250\t\260\021\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\330\014\022\320\022\"\240!\2407\250)\2601\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\340\004\010\210\013\2201\330\010\"\320\"5\260Q\260a\330\010\016\210b\220\006\220a\220q\230\002\230$\230e\2405\250\002\250&\260\010\270\006\270m\3101\310A\330\010\020\220\003\2207\230!\2301\330\010\014\210K\220q\330\014\022\220#\220W\230A\230]\250!\2501\330\014\022\220/\240\021\240%\240q\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\330\014\022\220/\240\021\240%\240y\260\001\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\330\014\022\220/\240\021\240'\250\031\260!\330\014\023\2202\220V\2301\230E\240\024\240T\250\021\340\004\t\210\021\210!\340\004\010\210\001\320\000'\240q\330\013\014\340\004\r\210U\220%\220u\230E\240\025\240e\2505\260\006\260f\270A\340\004\010\210\013\2201\330\010\016\210b\220\006\220a\220q\230\002\230$\230e\2405\250\002\250%\250w\260f\270N\310!\3101\330\010\016\210c\220\027\230\001\230\021\330\010\016\320\016!\240\021\240!\330\010\017\210r\220\026\220q\230\005\230T\240\024\240Q\340\004\t\210\021\210!\340\004\010\210\001\320\000\037\230q\330\013\014\340\004\025\220X\230Q\360\006\000\005\014\2108\2205\230\001\230\023\230C\230q\330\004\013\2107\220!\2201\330\004\013\210=\230\001\230\021\340\004\013\210:\220Q\220c\230\023\230A\330\004\013\2107\220!\2201\330\004\013\2104""\210}\230A\230Q\340\004\t\210\021\210!\340\004\010\210\014\220A\320\000\037\230q\330\013\014\340\004\025\220X\230Q\360\006\000\005\014\2108\2205\230\006\230a\330\004\013\2107\220!\2201\330\004\013\210=\230\001\230\021\340\004\013\210:\220Q\220c\230\023\230A\330\004\013\2107\220!\2201\330\004\013\2104\210}\230A\230Q\340\004\t\210\021\210!\340\004\010\210\014\220A\320\000\037\230q\340\004\027\220q\330\004\010\210\005\210U\220!\2203\220a\330\010\032\320\032*\250!\2501\330\010\016\210o\230Q\230f\240A\330\010\016\210o\230Q\230a\330\010\017\210t\2203\220e\2302\230Q\230d\240!\2408\2501\250A\340\004\013\2101\330\004\010\210\005\210U\220!\2203\220a\330\010\032\320\032*\250!\2501\330\010\016\210o\230Q\230f\240A\330\010\013\2104\210s\220!\330\014\022\220/\240\021\240%\240r\250\021\340\014\022\220/\240\021\240!\330\010\017\210t\2203\220e\2302\230Q\230d\240!\2408\2501\250A\330\004\t\210\021\210!\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 < 725; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 356) 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 = 725; i < 782; 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 < 782; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 725;
      for (Py_ssize_t i=0; i<57; ++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;
    double const c_constants[] = {0.0,-0.1,0.1,-0.4,0.4,-0.5,0.5,-0.6,0.6,1.0,-60.0,60.0,-1e-06,1e-06,-0.000001,-0.999999,0.999999,-1.000001,1.000001,0.0000004,0.0000005,1000000.0,-31536000.0,-59.9999996,59.9999996,946684800.0,12345.678901,-2208988800.0,-86399.9999996,86399.9999996,-999999.9999995,999999.9999995,-31556926.123456,31556926.123456,-1234567890.123456,1234567890.123456,2147483647.999999,-2147483648.000001,1672531199.9999996};
    for (int i = 0; i < 39; i++) {
      numbertab[i] = PyFloat_FromDouble(c_constants[i]);
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 39;
    int8_t const cint_constants_1[] = {0,-1,1,-2,2,-3,3,-4,4,-5,5,6,-7,7,-8,8,-9,9,-10,10,-11,11,-12,12,-13,13,-14,14,-15,15,-16,16,17,-23,23,25,26,29,30,31,34,-35,35,45,56,-59,59,-60,60};
    int16_t const cint_constants_2[] = {128,-1000,1000,1001,1970,1971,2011,2021,2024,2025,3600,10000};
    int32_t const cint_constants_4[] = {-86399L,86399L,-86400L,86400L,-100000L,100000L,120000L,123456L,-999999L,999999L,1000000L,-1000001L,1000001L,9999999L,-59999999L,59999999L,-60000000L,60000000L};
    int64_t const cint_constants_8[] = {12345678901LL,-86399999999LL,86399999999LL,86400000000LL,-999999999999LL,999999999999LL,31556926123456LL,-31536000000000LL,-31556926123456LL,946684800000000LL,1234567890123456LL,1672531199999999LL,2147483647999999LL,-1234567890123456LL,-2147483648000001LL,-2208988800000000LL,4611686018427387904LL,4611686018427387906LL,4611686018427387914LL,9223372036854775807LL,-4611686018427387904LL,-4611686018427387906LL,-4611686018427387914LL,-9223372036854775807LL};
    for (int i = 0; i < 103; i++) {
      numbertab[i] = PyLong_FromLongLong((i < 49 ? cint_constants_1[i - 0] : (i < 61 ? cint_constants_2[i - 49] : (i < 79 ? cint_constants_4[i - 61] : cint_constants_8[i - 79]))));
      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<142; ++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 : 1;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 6;
    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 = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 147};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_LOCALTZ};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_get_local_timezone, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_z_1_q_z_vQc_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 174};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name_lower, __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_utils_py, __pyx_mstate->__pyx_n_u_get_zoneinfo, __pyx_mstate->__pyx_kp_b_iso88591_d_Q_q_1N_q_z_f_Gr_TU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 276};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_utils, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_a_a_Q_q_q_Q_1_A_A_A_q_Q_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 345};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_ss, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_parser, __pyx_mstate->__pyx_kp_b_iso88591_a_U_1_Cq_2T_e1_Qa_4z_4_Qa_2T_e1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 552};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_cmp, __pyx_mstate->__pyx_n_u_tm};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_localtime_n_gmtime, __pyx_mstate->__pyx_kp_b_iso88591_QfF_c_e5_T_a_d_AQ_l_1_s_S_1C_1C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 600};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_is_leap, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_is_leap_year, __pyx_mstate->__pyx_kp_b_iso88591_A_A_U_G1_l_1_haq_t3e2Qd_81A_q_r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 616};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_days_before_year, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_days_bf_year, __pyx_mstate->__pyx_kp_b_iso88591_A_A_U_G1_l_1_q_t3e2Qd_81A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 629};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_doy, __pyx_mstate->__pyx_n_u_ymd};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_doy, __pyx_mstate->__pyx_kp_b_iso88591_1_U_G1_E_as_U_3a_2Rq_1C_AS_k_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 645};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_count, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_quarter_of_month, __pyx_mstate->__pyx_kp_b_iso88591_U_3a_aq_a_t3e2Qd_81A_6_A_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 659};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_qtr, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_days_in_quarter, __pyx_mstate->__pyx_kp_b_iso88591_q_q_U_3a_1_oQfA_oQa_t3e2Qd_81A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 680};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_days_in_month, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_days_in_month, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_RvQ_E_as_q_a_q_4s_r_Qhaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 694};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_days_before_month, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_days_bf_month, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_RvQ_E_as_q_a_AV1_4s_r_axq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 708};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_weekday, __pyx_mstate->__pyx_kp_b_iso88591_q_Qc_IU_3a_uAS_4r_Qe_q_k_q_d_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 727};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_cmp, __pyx_mstate->__pyx_n_u_iso_calr, __pyx_mstate->__pyx_n_u_iso_year, __pyx_mstate->__pyx_n_u_iso_week, __pyx_mstate->__pyx_n_u_iso_weekday};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_isocalendar, __pyx_mstate->__pyx_kp_b_iso88591_1_Qc_IU_3a_uAS_4r_Qe_q_d_6_L_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 768};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_isoweek1monday, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_iso_week1_mon_ord, __pyx_mstate->__pyx_kp_b_iso88591_A_Qc_q_oQa_t3e2QgQhaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 780};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ymd2ord, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_month, __pyx_mstate->__pyx_n_u_day, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_cmp};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ymd_to_ord, __pyx_mstate->__pyx_kp_b_iso88591_A_Rwa_IU_3a_uAS_4r_Qe_q_j_wa_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 799};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ord2ymd, __pyx_mstate->__pyx_n_u_MAXORDINAL, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_d};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ymd_fr_ord, __pyx_mstate->__pyx_kp_b_iso88591_Ja_U_1L_Ba_j_CuHAQ_vS_c_2T_E_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 814};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_isoweek_to_gregorian, __pyx_mstate->__pyx_n_u_year, __pyx_mstate->__pyx_n_u_week, __pyx_mstate->__pyx_n_u_weekday, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_val};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ymd_fr_iso, __pyx_mstate->__pyx_kp_b_iso88591_A_Qc_HE_Q_5_A_5_5QfF_j_vQ_2S_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 840};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Date, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_date_generate, __pyx_mstate->__pyx_kp_b_iso88591_Q_8_QfD_85_Cs_XQ_85_Cs_XQa_85_C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 867};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_CustomDate, __pyx_mstate->__pyx_n_u_date};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_date_type_check, __pyx_mstate->__pyx_kp_b_iso88591_q_XQ_85_a_7_1_Qc_A_7_1_4_AQ_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 886};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Date, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_pdate, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tm, __pyx_mstate->__pyx_n_u_tmp};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_date_conversion, __pyx_mstate->__pyx_kp_b_iso88591_q_85_s_D_s_6_A_AQ_5_Zt1_1_1_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 946};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Timestamp, __pyx_mstate->__pyx_n_u_DateTime, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_dt_n, __pyx_mstate->__pyx_n_u_dt_c};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_generate, __pyx_mstate->__pyx_kp_b_iso88591_1_q_8_QfD_89AS_3c_Cs_V1_89AS_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 992};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_CustomDateTime, __pyx_mstate->__pyx_n_u_dt};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_type_check, __pyx_mstate->__pyx_kp_b_iso88591_Q_a_5_aq_q_3a_5_4_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1011};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_dt_tz1, __pyx_mstate->__pyx_n_u_dt_tz2, __pyx_mstate->__pyx_n_u_t};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_tzinfo, __pyx_mstate->__pyx_kp_b_iso88591_6_Cs_S_8_QfCxq_XYavS_3c_Cq_XYav, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 27, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1029};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Timestamp, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tz1, __pyx_mstate->__pyx_n_u_dt_tz1, __pyx_mstate->__pyx_n_u_tz2, __pyx_mstate->__pyx_n_u_dt_tz2, __pyx_mstate->__pyx_n_u_tz3, __pyx_mstate->__pyx_n_u_dt_tz3, __pyx_mstate->__pyx_n_u_dt_tz4, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_tm, __pyx_mstate->__pyx_n_u_secs, __pyx_mstate->__pyx_n_u_offset, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_t, __pyx_mstate->__pyx_n_u_date, __pyx_mstate->__pyx_n_u_time1, __pyx_mstate->__pyx_n_u_time2, __pyx_mstate->__pyx_n_u_tmp, __pyx_mstate->__pyx_n_u_tmp1, __pyx_mstate->__pyx_n_u_tmp2, __pyx_mstate->__pyx_n_u_tmp3, __pyx_mstate->__pyx_n_u_tz4, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_dt_2, __pyx_mstate->__pyx_n_u_ts};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_conversion, __pyx_mstate->__pyx_kp_b_iso88591_Q_q_6_Cs_S_1HJavS_XYavS_3c_Cq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1149};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tz1, __pyx_mstate->__pyx_n_u_tz2, __pyx_mstate->__pyx_n_u_tz3, __pyx_mstate->__pyx_n_u_tz4, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_mainipulate, __pyx_mstate->__pyx_kp_b_iso88591_a_6_Cs_S_1HJavS_1HJavT_1HJawd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1167};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_td1, __pyx_mstate->__pyx_n_u_td2, __pyx_mstate->__pyx_n_u_td3, __pyx_mstate->__pyx_n_u_td4, __pyx_mstate->__pyx_n_u_td5, __pyx_mstate->__pyx_n_u_td6, __pyx_mstate->__pyx_n_u_td7, __pyx_mstate->__pyx_n_u_td8};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_arithmetic, __pyx_mstate->__pyx_kp_b_iso88591_Q_6_Cs_S_AS_1_6_c_Cs_Rq_AS_q_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1200};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_pendulum, __pyx_mstate->__pyx_n_u_ZoneInfo, __pyx_mstate->__pyx_n_u_test_pairs, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_m_dt, __pyx_mstate->__pyx_n_u_p_dt};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_dt_normalize_tz, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_c_D_xq0EU_c_D_xq0EU_D_4whax, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1297};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Time, __pyx_mstate->__pyx_n_u_tz, __pyx_mstate->__pyx_n_u_t_n, __pyx_mstate->__pyx_n_u_t_c};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_time_generate, __pyx_mstate->__pyx_kp_b_iso88591_Q_8_QfD_85_Cs_S_85_Cs_S_85_Cs_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1339};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_CustomTime, __pyx_mstate->__pyx_n_u_time};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_time_type_check, __pyx_mstate->__pyx_kp_b_iso88591_q_XQ_85_Cq_7_1_Qc_A_7_1_4_AQ_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1358};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_Time, __pyx_mstate->__pyx_n_u_tz1, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_t_tz1, __pyx_mstate->__pyx_n_u_pt, __pyx_mstate->__pyx_n_u_pt_tz1, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_dt_tz1, __pyx_mstate->__pyx_n_u_secs, __pyx_mstate->__pyx_n_u_us};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_time_conversion, __pyx_mstate->__pyx_kp_b_iso88591_q_1HJavS_as_S_HE_S_3a_Qc_Cq_T_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1410};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_CustomTD};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_timedelta_generate, __pyx_mstate->__pyx_kp_b_iso88591_81_8_Qc_Cs_8_Qc_Cs_8_Qc_Cs_A_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1437};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_CustomTD, __pyx_mstate->__pyx_n_u_td};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_timedelta_type_check, __pyx_mstate->__pyx_kp_b_iso88591_A_81_1Cs_5_aq_S_5_4_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1456};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_h, __pyx_mstate->__pyx_n_u_m, __pyx_mstate->__pyx_n_u_td, __pyx_mstate->__pyx_n_u_dt_str, __pyx_mstate->__pyx_n_u_tz_str, __pyx_mstate->__pyx_n_u_secs, __pyx_mstate->__pyx_n_u_CustomTD, __pyx_mstate->__pyx_n_u_ctd};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_timedelta_conversion, __pyx_mstate->__pyx_kp_b_iso88591_A_c_Qhj_A_c_Qhj_Cxq_c_Qhj_Cxq_S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1512};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_time, __pyx_mstate->__pyx_n_u_LOCALTZ};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_tzinfo_generate, __pyx_mstate->__pyx_kp_b_iso88591_q_Q_A_89E_F_89AXZq_c_S_asRS_89A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1531};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_tzinfo_type_check, __pyx_mstate->__pyx_kp_b_iso88591_5_4_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1543};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_tz};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_tzinfo_access, __pyx_mstate->__pyx_kp_b_iso88591_Q_a_1_5_7_4q_5_6_a_5_q_A_aq_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1580};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_units, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_arr};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_numpy_share, __pyx_mstate->__pyx_kp_b_iso88591_1_U_uE_e5_fF_a_S_1_7q_b_at6_2_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1604};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_dt2};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_datetime64_type_check, __pyx_mstate->__pyx_kp_b_iso88591_Q_aq_7_1_q_4waq_1A_nAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1625};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_units, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_dt64, __pyx_mstate->__pyx_n_u_us};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_datetime64_conversion, __pyx_mstate->__pyx_kp_b_iso88591_Q_Q_U_uE_e5_fA_E_b_Q_2_A_WA_gQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1642};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_td, __pyx_mstate->__pyx_n_u_td2};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_timedelta64_type_check, __pyx_mstate->__pyx_kp_b_iso88591_a_q_1_7_1_q_4waq_1A_nAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1663};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_datetime, __pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_units, __pyx_mstate->__pyx_n_u_unit, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_td64, __pyx_mstate->__pyx_n_u_us};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_timedelta64_conversion, __pyx_mstate->__pyx_kp_b_iso88591_a_Q_U_uE_e5_fA_E_b_Q_2_Q_WA_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1680};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_type_check, __pyx_mstate->__pyx_kp_b_iso88591_6_F_1Cs_6_F_1_6_s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1693};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_arr1, __pyx_mstate->__pyx_n_u_arr2};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_generate, __pyx_mstate->__pyx_kp_b_iso88591_2V1AS_3c_V1_2V1F_t1_Q_2V1AS_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1710};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_dt64_type_check, __pyx_mstate->__pyx_kp_b_iso88591_q_Qb_aq_3d_Qb_at6_Qb_aq_3d_Q_Qb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1723};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_units, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_my_unit_int, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_i, __pyx_mstate->__pyx_n_u_to_unit, __pyx_mstate->__pyx_n_u_cmp, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_dt64_conversion, __pyx_mstate->__pyx_kp_b_iso88591_q_U_uE_e5_fA_1_5Qa_b_aq_e5_m1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1760};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_td64_type_check, __pyx_mstate->__pyx_kp_b_iso88591_q_Qb_aq_3d_Qb_at6_Qb_aq_3d_Q_Qb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1773};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_units, __pyx_mstate->__pyx_n_u_my_unit, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_cmp, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_td64_conversion, __pyx_mstate->__pyx_kp_b_iso88591_q_U_uE_e5_fA_1_b_aq_e5_wfN_1_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1790};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_math, __pyx_mstate->__pyx_n_u_Decimal, __pyx_mstate->__pyx_n_u_ROUND_HALF_EVEN, __pyx_mstate->__pyx_n_u_ROUND_HALF_UP, __pyx_mstate->__pyx_n_u_ROUND_HALF_DOWN, __pyx_mstate->__pyx_n_u_ROUND_CEILING, __pyx_mstate->__pyx_n_u_ROUND_FLOOR, __pyx_mstate->__pyx_n_u_test_cases, __pyx_mstate->__pyx_n_u_num, __pyx_mstate->__pyx_n_u_factor, __pyx_mstate->__pyx_n_u_res, __pyx_mstate->__pyx_n_u_exp};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_math, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_Q_q_A_Q_A_Q_Q_a_Q_a_A_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2014};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_Decimal, __pyx_mstate->__pyx_n_u_ROUND_HALF_EVEN, __pyx_mstate->__pyx_n_u_ROUND_HALF_UP, __pyx_mstate->__pyx_n_u_ROUND_HALF_DOWN, __pyx_mstate->__pyx_n_u_ROUND_CEILING, __pyx_mstate->__pyx_n_u_ROUND_FLOOR, __pyx_mstate->__pyx_n_u_test_cases, __pyx_mstate->__pyx_n_u_num, __pyx_mstate->__pyx_n_u_factor, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_res, __pyx_mstate->__pyx_n_u_exp, __pyx_mstate->__pyx_n_u_res2};
    __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_ndarray_math, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Q_Q_q_A_Q_A_Q_Q_a_Q_a_A_Q_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2273};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pairs, __pyx_mstate->__pyx_n_u_ss, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_res, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_t2, __pyx_mstate->__pyx_n_u_h1, __pyx_mstate->__pyx_n_u_h2, __pyx_mstate->__pyx_n_u_d1, __pyx_mstate->__pyx_n_u_d2};
    __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_sec_to_us, __pyx_mstate->__pyx_kp_b_iso88591_A_a_a_1_1_Q_q_q_Q_Q_Q_q_A_A_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 33, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2347};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_np, __pyx_mstate->__pyx_n_u_V, __pyx_mstate->__pyx_n_u_arr, __pyx_mstate->__pyx_n_u_arr_i, __pyx_mstate->__pyx_n_u_arr_f, __pyx_mstate->__pyx_n_u_arr_Y, __pyx_mstate->__pyx_n_u_arr_M, __pyx_mstate->__pyx_n_u_arr_D, __pyx_mstate->__pyx_n_u_arr_h, __pyx_mstate->__pyx_n_u_arr_m, __pyx_mstate->__pyx_n_u_arr_s, __pyx_mstate->__pyx_n_u_arr_us, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_us_i, __pyx_mstate->__pyx_n_u_ss_f, __pyx_mstate->__pyx_n_u_yy, __pyx_mstate->__pyx_n_u_mm, __pyx_mstate->__pyx_n_u_dd, __pyx_mstate->__pyx_n_u_hh, __pyx_mstate->__pyx_n_u_mi, __pyx_mstate->__pyx_n_u_ss, __pyx_mstate->__pyx_n_u_us, __pyx_mstate->__pyx_n_u_ymd, __pyx_mstate->__pyx_n_u_hmsf, __pyx_mstate->__pyx_n_u_tm, __pyx_mstate->__pyx_n_u_dtm, __pyx_mstate->__pyx_n_u_arr_ord, __pyx_mstate->__pyx_n_u_arr_wkdy, __pyx_mstate->__pyx_n_u_ord_i, __pyx_mstate->__pyx_n_u_wkd_i, __pyx_mstate->__pyx_n_u_wkd, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_cross_test_with_ndarray, __pyx_mstate->__pyx_kp_b_iso88591_F_1Bd_uAQc_2U_Cwaq_E_Ba_L_M_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2466};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_non_digits, __pyx_mstate->__pyx_n_u_i_str, __pyx_mstate->__pyx_n_u_i_len, __pyx_mstate->__pyx_n_u_pfix, __pyx_mstate->__pyx_n_u_sfix};
    __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_slice_to_uint, __pyx_mstate->__pyx_kp_b_iso88591_Q_A_s_1_r_6_1_6_1_Qd_Q_Qd_Q_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2497};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_i};
    __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_src_cytimes_utils_py, __pyx_mstate->__pyx_n_u_test_slice_to_ufloat, __pyx_mstate->__pyx_kp_b_iso88591_q_5_3c_7_S_1_7_S_1_6_Cs_6_Cs_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) 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)

  /* AssertionsEnabled.init */
  if (likely(__Pyx_init_assertions_enabled() == 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;
}

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

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

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

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

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

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

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

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_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 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(!(is_unsigned || value == 0 || value > 0) ||
                    !(sizeof(value) <= 2 || value & ~ (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_long(long value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(long)*3+2];
    char *dpos, *end = digits + sizeof(long)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    long remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (long) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (long) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (long) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    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);
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return PyLong_FromLong(-intval);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a - b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla - llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) - (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
}
#endif

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op2);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    calculate_long:
        {
            long x;
            x = a + b;
            return PyLong_FromLong(x);
        }
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla + llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) + (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
}
#endif

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyLongCompare */
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = __Pyx_PyFloat_AS_DOUBLE(op1);
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

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

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

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

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
    }
    calculate_long:
        CYTHON_UNUSED_VAR(a);
        CYTHON_UNUSED_VAR(b);
        lla = a;
        goto calculate_long_long;
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla * llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) * (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace);
}
#endif

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    calculate_long:
        if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                || __Pyx_PyLong_DigitCount(op1) <= 52 / PyLong_SHIFT) {
            return PyFloat_FromDouble((double)a / (double)b);
        }
        return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_TrueDivideObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) / (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_TrueDivideObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_TrueDivideObjC(op1, op2, inplace);
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
        a = __Pyx_PyFloat_AS_DOUBLE(op1);
        
    } else
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        result = a / b;
        return PyFloat_FromDouble(result);
}
#endif

/* unicode_iter */
static CYTHON_INLINE int __Pyx_init_unicode_iteration(
    PyObject* ustring, Py_ssize_t *length, void** data, int *kind) {
#if CYTHON_COMPILING_IN_LIMITED_API
    *kind   = 0;
    *length = PyUnicode_GetLength(ustring);
    *data   = (void*)ustring;
#else
    if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1;
    *kind   = PyUnicode_KIND(ustring);
    *length = PyUnicode_GET_LENGTH(ustring);
    *data   = PyUnicode_DATA(ustring);
#endif
    return 0;
}

/* VoidPtrExport */
static int __Pyx_ExportVoidPtr(PyObject *api_dict, const char *name, void *p, const char *sig) {
    PyObject *cobj;
    cobj = PyCapsule_New(p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(api_dict, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(cobj);
    return -1;
}

/* GetApiDict */
static PyObject *__Pyx_ApiExport_GetApiDict(void) {
    PyObject *d;
    if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1)
        return NULL;
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0)
            goto bad;
    }
    return d;
bad:
    Py_XDECREF(d);
    return NULL;
}

/* FunctionExport */
static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) {
    PyObject *cobj;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(api_dict, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(cobj);
    return -1;
}

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

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

/* 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 (used by FetchCommonType) */
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;
}

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

/* CallTypeTraverse (used by CythonFunctionShared) */
#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

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

/* 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;\
    }

static PyObject* __pyx_convert__to_py___pyx_t_7cytimes_5utils_ymd(__pyx_t_7cytimes_5utils_ymd s) {
  PyObject* res;
  PyObject* member;
  res = __Pyx_PyDict_NewPresized(3); if (unlikely(!res)) return NULL;
  member = __Pyx_PyLong_From_int(s.year); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_year, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.month); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_month, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.day); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_day, member) < 0)) goto bad;
  Py_DECREF(member);
  return res;
  bad:
  Py_XDECREF(member);
  Py_DECREF(res);
  return NULL;
}
static PyObject* __pyx_convert__to_py_struct__tm(struct tm s) {
  PyObject* res;
  PyObject* member;
  res = __Pyx_PyDict_NewPresized(9); if (unlikely(!res)) return NULL;
  member = __Pyx_PyLong_From_int(s.tm_sec); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_sec, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_min); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_min, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_hour); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_hour, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_mday); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_mday, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_mon); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_mon, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_year); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_year, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_wday); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_wday, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_yday); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_yday, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.tm_isdst); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_tm_isdst, member) < 0)) goto bad;
  Py_DECREF(member);
  return res;
  bad:
  Py_XDECREF(member);
  Py_DECREF(res);
  return NULL;
}
static PyObject* __pyx_convert__to_py___pyx_t_7cytimes_5utils_hmsf(__pyx_t_7cytimes_5utils_hmsf s) {
  PyObject* res;
  PyObject* member;
  res = __Pyx_PyDict_NewPresized(4); if (unlikely(!res)) return NULL;
  member = __Pyx_PyLong_From_int(s.hour); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_hour, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.minute); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_minute, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.second); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_second, member) < 0)) goto bad;
  Py_DECREF(member);
  member = __Pyx_PyLong_From_int(s.microsecond); if (unlikely(!member)) goto bad;
  if (unlikely(PyDict_SetItem(res, __pyx_mstate_global->__pyx_n_u_microsecond, member) < 0)) goto bad;
  Py_DECREF(member);
  return res;
  bad:
  Py_XDECREF(member);
  Py_DECREF(res);
  return NULL;
}
/* UnicodeAsUCS4 */
static void __Pyx_PyUnicode_AsPy_UCS4_error(Py_ssize_t length) {
    if (likely(length >= 0)) {
        PyErr_Format(PyExc_ValueError,
                     "only single character unicode strings can be converted to Py_UCS4, "
                     "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
    }
}
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
    Py_ssize_t length = __Pyx_PyUnicode_GET_LENGTH(x);
    if (unlikely(length != 1)) {
        __Pyx_PyUnicode_AsPy_UCS4_error(length);
        return (Py_UCS4)-1;
    }
    return __Pyx_PyUnicode_READ_CHAR(x, 0);
}

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

/* 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_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_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;
}

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

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_npy_int64(npy_int64 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_int64) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_int64) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(npy_int64) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(npy_int64) <= 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_int64),
                                     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_int64));
        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_int64 __Pyx_PyLong_As_npy_int64(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const npy_int64 neg_one = (npy_int64) -1, const_zero = (npy_int64) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        npy_int64 val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (npy_int64) -1;
        val = __Pyx_PyLong_As_npy_int64(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_int64, __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_int64) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) >= 2 * PyLong_SHIFT)) {
                            return (npy_int64) (((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_int64) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) >= 3 * PyLong_SHIFT)) {
                            return (npy_int64) (((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_int64) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) >= 4 * PyLong_SHIFT)) {
                            return (npy_int64) (((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && 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_int64) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(npy_int64) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(npy_int64) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_int64, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(npy_int64, __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_int64) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_int64) (((npy_int64)-1)*(((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(npy_int64) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT)) {
                            return (npy_int64) ((((((npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(npy_int64) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_int64) (((npy_int64)-1)*(((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(npy_int64) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT)) {
                            return (npy_int64) ((((((((npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(npy_int64) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_int64) (((npy_int64)-1)*(((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(npy_int64) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(npy_int64, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(npy_int64) - 1 > 4 * PyLong_SHIFT)) {
                            return (npy_int64) ((((((((((npy_int64)digits[3]) << PyLong_SHIFT) | (npy_int64)digits[2]) << PyLong_SHIFT) | (npy_int64)digits[1]) << PyLong_SHIFT) | (npy_int64)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(npy_int64) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_int64, long, PyLong_AsLong(x))
        } else if ((sizeof(npy_int64) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(npy_int64, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        npy_int64 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_int64) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (npy_int64) -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_int64) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (npy_int64) 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_int64) * 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_int64) 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_int64) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((npy_int64) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((npy_int64) 1) << (sizeof(npy_int64) * 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_int64) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to npy_int64");
    return (npy_int64) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to npy_int64");
    return (npy_int64) -1;
}

/* ObjectAsUCS4 */
static void __Pyx__PyObject_AsPy_UCS4_raise_error(long ival) {
   if (ival < 0) {
       if (!PyErr_Occurred())
           PyErr_SetString(PyExc_OverflowError,
                           "cannot convert negative value to Py_UCS4");
   } else {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to Py_UCS4");
   }
}
static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject* x) {
   long ival;
   ival = __Pyx_PyLong_As_long(x);
   if (unlikely(!__Pyx_is_valid_index(ival, 1114111 + 1))) {
       __Pyx__PyObject_AsPy_UCS4_raise_error(ival);
       return (Py_UCS4)-1;
   }
   return (Py_UCS4)ival;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__18);
    }
    goto done;
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module, *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 */
